How to import a gpx.track into pure maps/Unav?
-
Is there a way to import gpx tracks to use them with pure maps (or unav)? I can't find anything in the settings, can't open the track with either application from the filemanager. Is it possible?
-
Yes it is possible, just open pure maps, open the navigation menu (third icon at the bottom), then tap on the three dots on the top right hand corner and open the first line popping up which should be something like "using Stadia maps",
change it for GPX, and you are good to go,
now instead of a point A To point B in navigation you are offered to open a GPX file stored on your device -
@NoelFlantier
Thanks! What a perfectly hidden feature! I knew I had seen something about gpx, but couldn't find it. It works, now I can get on tour with my bicycle -
I suspect that I need to make a website for Pure Maps to show features like that. If you use Pure Maps with offline maps server, you have access to "GPX Smart" router as well. The smart version will take your GPX, feed it to the router in OSM Scout Server for processing, and will give you back GPX trace matched to the route network (for bikes should be paths) and instructions (as turn left/right/...).
-
@rinigus
Very good idea!"GPX smart" works great if the route is just "one-way"; when I try to render a gpx-track which consists of routes that are circular or include alternative ways only a part is shown, which unfortunatly isn't very smart ;-). Perhaps you could have a look into that? Or should I open an issue someplace?
-
Please open an issue at https://github.com/rinigus/pure-maps
Navigation part I would like to rewrite, in part started already. Sounds like it's related.
-
@rinigus
I found the reason, at least for some of the problems. gpx smart fails when it encounters an "impossible" situation (e.g. the gpx track leads across a street which is not supposed to be crossed; or wants to lead through a one-way-street in the wrong direction; older tracks might have small errors because streets have changed, or an u-turn wasn't corrected after a wrong turn had occurred when recording the original gpx-track ; a round trip had the start and end point overlapping, so gpx smart just connected the short distance between those two points ). So the solution here could be a more tolerant error handling.I was able to fix some tracks using GpsPrune, but that is really cumbersome...
-
The way GPX smart works is that it is using Valhalla's map matching - demo at https://www.mapzen.com/products/mobility/map-matching/
Which is it's strength and, as you have seen, weakness in some conditions. For it to work, you are expected to give correct mode of transportation (you can walk in the both directions along one-way street, but don't do it while driving).
In this respect I think it works as expected.As for a use of older tracks where street direction has changed, not sure it is of such use for driving then either. I would say that there is no need to be tolerant in this respect and lead to the situation where you are driving and guided to do illegal turn...
-
As an additional note: not sure what is the status of GPX viewers on UT. From one POV, I would like to keep Pure Maps focussed and as simple as possible. Maybe some other app can be used for general GPX viewing or do the users expect to have such functionality from maps app?
-
@rinigus
Please keep the gpx-features, its just great for hiking or bicycle trips. Right now I'm planing bicycle trips, which works ok, as long as the tracks don't include cross country parts on fields or similar.Correcting tracks is an option to use older tracks (as provided by my android ADFC bicycle map app, which is able to export the tracks).
-
I will, sure as it is now. Let's see if there will be requests and use cases to extend it. But that would have to be discussed before implementing.
-
@rinigus: I would love to use it for offline navigation for mountain biking in the mountains.
Have a lot of GPX tracks from friends and I am thinking of creating some kind of Supertrail maps where all the nice biketrails are visible in offline mode.
Not sure if here is the right place to ask, but would it be possible to overlay all stored gpx files over a map with height lines (opentopomap.org) or should I render them somehow into a hi-res map and then load this custom map? Any hints are very welcome. -
@magdesign That's a bit more sophisticated than usual.
In principle, it is possible, but you will have to get your hands dirty. Overall, you will have to
- convert GPX tracks to something that the map widget can load natively (GeoJSON)
- serve that GeoJSON via local HTTP server (python simplehttp?)
- create new style that is using GeoJSON and serve it via the same server
- add new map to Pure Maps as a custom map
As OSM Scout Server does not have height lines, you would have to either look how to add isolines data to these maps via your style or download tiles from opentopomap and serve via your server as well.
Not very trivial, but possible. All depends on how much time do you want to invest into it. As a nice side effect, you will learn how it works and could contribute to the map data import and style development.
-
This is somehow similar to the "autoload" of gpx tracks we discussed on github:
The program Cachebox for example has a folder called "Autoload". All gpx files that are in this folder are loaded at program start and shown on the map. It has no UI for the "Autoload" folder, only shows the tracks as an overlay over the map. Each track has a different colour to distinguish them from each other.
-
@herr-b, that would solve the problem as described by @magdesign. Any developers around wishing to write it?
-
-
@magdesign If you are going to work on https://github.com/rinigus/pure-maps/issues/408, that would resolve most of your issue with only remaining part being isolines. But for isolines we could maybe find some better solution
-
-