0

I have a large gpx, it covers most major roads and some secondary roads of the British isles, I intend to use the coordinates to display a rudimentary road map on a device with low memory, I currently am successful at getting the points to display without tripping a memory error. This works by dividing the gpx points coords up into arrays of coords according to their locations, if you are in Dublin for example, only points within one degree of latitude and longitude from your position are called from the JSON array (coded by another person). However in order to be read properly as a map I need to connect these points with lines.

The problem is that one or more points shown may not even be connected to any of the other points shown which can cause haywire as the order of the points gets all mixed up. The way I see it is I have two options. I can either attempt to show the whole gpx by fiddling with the conversion code written by someone else and expand the 1 degree limit to however large I need it but this risks memory troubles. My other option is to divide the gpx up grid like and create multiple mini routes to be used but I don't know where to begin with that. Is there a way to go about this that I'm missing?

P.S: I suppose there is the last option of just adding more points between the current points along each stretch of road used in the gpx in a program such as qgis (to give the impression of joined roads or make it more visible which roads are connected at least) but that risks storage and potentially memory problems. I've tried this method using densify but I couldn't quite figure that out.

3
  • I'm not sure I follow your question 100%, but you could map the roads as a directed (or undirected) graph, where you only show intersections and lines between them with a disclaimer to indicate you have done this. Jul 23 at 16:43
  • I will look into directed graphs, thanks.
    – IceBear123
    Jul 24 at 14:01
  • Feel free to chat me if you'd like more help Jul 24 at 14:32

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.