Overlay GPX tracks as Vector Map
I want to display 250 GPX tracks covering a large portion of California as a VECTOR map layer, not individual GPX files. Actively displaying that many tracks at once slows the app down significantly. In the Garmin ecosystem, there's an app that can convert all 250 GPX tracks into a Garmin .IMG map file (IMGfromGPX). The resulting VECTOR map for Garmin contains all the data, and only takes up 3 MB of space.
I copied the .IMG file to /data/menion.android.locus.pro/Locus/mapsVector. The map displays fine, with all the GPX tracks showing as green lines. The problem I'm facing is that the .IMG format does not allow any customization for Locus. I use four colors for the tracks to indicate the type of road or trail each track represents.
I'm looking for a way to build this map in a native .map or other format that is truly a vector map for Locus. I've been struggling with Mapsforge and QGIS for several days and I just can't seem to find a way to do this.
I don't want to calibrate a PNG/PDF file or use any other tile-based raster option. I want a true vector map like the .IMG file that allows me to color-code the tracks and overlay it on my active map.
Do you have any ideas or suggestions that can help?
Hi,
we are sorry but this request is way beyond the scope of the app support.
Hi,
we are sorry but this request is way beyond the scope of the app support.
Ask in the Openandromaps forum. Maybe someone there can help you.
Ask in the Openandromaps forum. Maybe someone there can help you.
Mr.Smith: what is the purpose of having those 250 GPXs displayed?
Always, going forward?
Producing screenshots from time to time?
Anything else?
Mr.Smith: what is the purpose of having those 250 GPXs displayed?
Always, going forward?
Producing screenshots from time to time?
Anything else?
Well, it's not necessarily the purpose of a smartphone app. - My view.
However, I see a way you'll get what you want:
- GPSbabel can convert GPS to OSM (OPenStreetMap) format (never used it - conclusion from quick web search)
- osmosis can turn an OSM file into a .map file (vector) that Locus can handle
Just my 2c.
Good luck and cheers
Michael
PS: as memory is a nobrainer today, I would not rule out a raster tile based approach, BTW.
The tooling differs from step 2 on, however:
- use Maperitive to produce - from an OSM file - a folder structure with the raster tiles with (only) the tracks (one tree per zoom level; a clip level will omit empty tiles)
- use MOBAC to turn such a folder "forest" into an sqliteDB for Locus.
Well, it's not necessarily the purpose of a smartphone app. - My view.
However, I see a way you'll get what you want:
- GPSbabel can convert GPS to OSM (OPenStreetMap) format (never used it - conclusion from quick web search)
- osmosis can turn an OSM file into a .map file (vector) that Locus can handle
Just my 2c.
Good luck and cheers
Michael
PS: as memory is a nobrainer today, I would not rule out a raster tile based approach, BTW.
The tooling differs from step 2 on, however:
- use Maperitive to produce - from an OSM file - a folder structure with the raster tiles with (only) the tracks (one tree per zoom level; a clip level will omit empty tiles)
- use MOBAC to turn such a folder "forest" into an sqliteDB for Locus.
Consider this tutorial by rudy chung, https://www.youtube.com/watch?v=5V7dJPsjE64
The repo in the tutorial is https://github.com/alpha-rudy/taiwan-topo.
It's better to combine the gpx routes using built in routes combination method in some mobile apps if you are downloading from those apps.
--JOSM
using JOSM convert to data layer and then modifies the tag values of type:way, reomve other waypoints and tags if you don't need them. Store it as .osm file.
-- OSMIUM
Then use osmium renumber to set the id in .osm from negative to positive. Use osmium merge if you need to merge multiple osm files, you need to add the id number in the following merged osm files to avoid conflict. The output format from merge would be pbf.
--OSMOSIS
Use osmosis comand with mapsforge plugins and some parameters to convert the pbf file into mapsforge. You can find the detailed comand in the repo's Makefile
--STYLE
You may need to modify the style files to show the .map routes network in locus map, just follow the track or routes rules in the style file, add the rule of the tag you defined for the gpx routes in JOSM.
I think the first JOSM step can be replaced using scripts from Michael Bechtold, so that the whole procedure can be finished autmatically in shell scritp if you only combines those ways to route network.
Consider this tutorial by rudy chung, https://www.youtube.com/watch?v=5V7dJPsjE64
The repo in the tutorial is https://github.com/alpha-rudy/taiwan-topo.
It's better to combine the gpx routes using built in routes combination method in some mobile apps if you are downloading from those apps.
--JOSM
using JOSM convert to data layer and then modifies the tag values of type:way, reomve other waypoints and tags if you don't need them. Store it as .osm file.
-- OSMIUM
Then use osmium renumber to set the id in .osm from negative to positive. Use osmium merge if you need to merge multiple osm files, you need to add the id number in the following merged osm files to avoid conflict. The output format from merge would be pbf.
--OSMOSIS
Use osmosis comand with mapsforge plugins and some parameters to convert the pbf file into mapsforge. You can find the detailed comand in the repo's Makefile
--STYLE
You may need to modify the style files to show the .map routes network in locus map, just follow the track or routes rules in the style file, add the rule of the tag you defined for the gpx routes in JOSM.
I think the first JOSM step can be replaced using scripts from Michael Bechtold, so that the whole procedure can be finished autmatically in shell scritp if you only combines those ways to route network.
If you just want to show a lot of tracks. Then copy them all into one folder and fade them in. This way you can also quickly fade them in and out.
I do it the same way. I have 3000 MTB trails in one folder. And then show the first 200 around the center of the screen.
If you just want to show a lot of tracks. Then copy them all into one folder and fade them in. This way you can also quickly fade them in and out.
I do it the same way. I have 3000 MTB trails in one folder. And then show the first 200 around the center of the screen.
I modified GPX2OSM.awk from Michael Bechtold and write some scripts from rudy chung's tutorial, it's easy now to convert multiple gpx files to vector mapsforge.
https://github.com/eldertiger/gpx_to_mapsforge/tree/main
I modified GPX2OSM.awk from Michael Bechtold and write some scripts from rudy chung's tutorial, it's easy now to convert multiple gpx files to vector mapsforge.
https://github.com/eldertiger/gpx_to_mapsforge/tree/main
Replies have been locked on this page!