transparent roads overlay from OSM in .img?

hi all,

i’ve been trying to find the solution to this for hours, with multiple tools available to me and still don’t have an easy solution.

Problem: i have great, but by now fairly old official Garmin 24K TOPO maps. I have 2 of them because where I live and hike is right on the border of 2 maps. I love the TOPO maps for their overlays, but the roads by now are fairly stale, some of them i don’t think were ever correct. I’m using the OSM maps on my GPSMAP66 and they have all of the roads and trails but are lacking the overall design of the 24K TOPO maps. When I try to enable both of them at once, the OSM map always completely overlays the 24K TOPO and it becomes invisible. I’ve tried modifying the draw priority with GMapTool of these maps but the OSM map always stomps on 24K TOPO.

Idea & Partial solution: i had the idea that if i could just do an edit of OSM map myself, extract only the roads from it, that i could make a road-only .img file that i could overlay on top of 24K TOPO. i got this partially working by downloading a very small region in JOSM, hand deleting all shades, etc., getting down only to the roads and lake outlines, then using mkgmap command with --transparent option and i got a few square blocks to show up on my Garmin overlaying 24K TOPO and showing all the roads that aren’t there. BUT, this is a PIA, JOSM is not a pretty editor and somehow it would still leave golf courses and other buildings even thought i seemed to have deleted all layers but Routes. this was also done maybe on a 2mi^2 area, i’d have to do this to a whole state or two.

Trials: i was looking at some online videos and i discovered that you can download .shp files, so i downloaded them the state of interest and i see that there are roads shapes. JOSM takes forever to open a 130MB file and feezes to hell, eventually when it did open the file and i re-saved it to .osm format it made it 650MB? and mkgmap even though takes a long time to process this .osm file always only creates a 8KB .img file that seems to be a nothing.

I also have ArcMap available and that loads the .shp file without any issues and almost instantly, but i see no way of exporting to .osm or .img out of it.

I also have townloaded GPSMapEdit, and tried saving the shape into the polish format and then converting into .img but when it’s importing the shape it asks me for a bunch of input options that i don’t understand, considering how simply ArcMap can import these roads.

Anyway: what is the best way for me to do this? Can someone please advise the steps i could take to get to just the Roads in any specific state and how do i get them out into a transparent .img file that i can overlay into another map that doesn’t have all the roads? I don’t care about any navigational abilities, i just want the roads available on the map as a reference for hiking, but not navigation.

You can try again the mkgmap approach. Instead of removing all kinds of things in JOSM you can create your own mkgmap style which just renders roads. Create a copy of the default style and start to remove things. You can also try to filter some objects before using osmfilter, JOSM is really not the right tool for that.
OTOH you can also create a topo map with mkgmap, including hill shading.

how would i do that, what would be the explicit commands?

also, the data that i’m downloading is smaller than the OSM region, it’s from geofabrik and is down to the state level but it’s in .osm.bz2 format which mkgmap does not like.

there are some paid tools as Mapwel that advertise that they can do this but don’t want to spend 40$ on a license just to find out that it can’t be done.

anyone else have any other solutions or explicit commands in mkgmap that could help me do this?

You have to understand how the mkgmap style rules work, probably also how splitter works if you want to create a map for a whole country.
I’d prefer to download *.pbf from geofabrik, but splitter is also able to handle *.osm.bz2 (much slower).
Here is a brief starter:

  • Install splitter and mkgmap
  • Create a copy of the directory default that comes with mkgmap /examples/styles/default, I name the copy “roads”
  • remove the files polygons and points from that copy
  • run splitter :
java -Xmx2G -jar d:\mini\splitter-r597\splitter.jar  xyz.osm.bz2

  • run mkgmap :

java -Xmx4G -jar d:\mini\mkgmap-r4479\mkgmap.jar --max-jobs --style-file=d:\mini\roads --gmapsupp --transparent -c template.args

This will create a gmapsupp.img, but still with a few things you don’t want, e.g. rivers.
To remove the rivers you would edit the files roads/lines and remove the lines reg. waterway. I am sure you find out thee rest on your own.

this was amazing, this is exactly what i needed, without even putzing around with the waterways!!! thank you very much, exactly what i was looking for!