How to import a gpx.track into pure maps/Unav?



  • 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...



  • @hankschwie

    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

    1. convert GPX tracks to something that the map widget can load natively (GeoJSON)
    2. serve that GeoJSON via local HTTP server (python simplehttp?)
    3. create new style that is using GeoJSON and serve it via the same server
    4. 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?



  • @rinigus :Thanks for the summary of steps.
    Since I will never go back to android I think I must spend time for solving this problem.

    @herr-b : this sounds like a great solution.



  • @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


Log in to reply