Creating my first map - problem with sea and towns/cities

Hello, I’m trying to create topographic map of Sardinia for Garmin Oregon GPS and I’m having some problems, so I’d like to ask for help.

Here’s what I do:
(1) at first I download osm-files for the area - I use OpenStreetMap API, therefore I download it by 0.25x0.25 tiles.
(2) then I use srtm2osm program to download osm-file containing contours (contours.osm) of the coresponding area
(3) I convert contours.osm into contours.img by “mkgmap contours.osm”
(4) I convert all osm-tiles by “mkgmap --generate-sea:extend-sea-sectors 7*.osm” - I use the option to generate sea
(5) Finally I generate gmapsupp.img file by “mkgmap --family-id=1705 --gmapsupp 7*.img contours.img M00006A9.TYP” command. I use custom TYP file, among other things it contains definition of sea color (0x28).

By doing these steps, I can create the map successfully (I’m able to copy it to GPS and see it there), I just have two problems (and one question):
(A) As you can see, in step (2) I try to generate sea during conversion - it works quite OK, but some of my tiles, that contains just sea/ocean (+ only ferry route or international boundary) are green, not blue… it doesn’t look good, is there anything I can do with it?
(B) If I look at the OpenStreetMap e.g. in Mapnik, I can see that (residential) area of cities is displayed in gray. However, on my GPS, it’s just green like the rest of land… I can’t figure out what to do to display it, e.g. what surface to define in *.typ file.
(C) This is not a problem, I’d just like to ask if you now some very good *.typ file for topographic maps?

Thanks in advance for help, I’m sorry if these questions are too basic for this forum, but I’m really beginner and this is just the first map I try to create.

These are certainly not basic questions. On the contrary, quite interesting to see how this works out…



FWIW, I use the command


I use the following rule in my polygon style file:

landuse=residential [0x02 resolution 16]

and my TYP file defines the 0x02 polygon as a uniform grey colour

My TYP isn’t particularly customised for topographic maps (though it does include definitions for contour lines) but you can take a look to see how I defined the residential polygon (and draw order): NB you will need to use the associated style for this TYP to work properly:

Thanks a lot for the advice, adding “landuse=residential …” rule helped me with the problem (B), but I still got problem with the sea generation.

I tried the both options you suggested and I still have the tiles that contain no land green… I think it’s understandable, since if these tiles contains no coastline, mkgmap can’t know if it’s whole land or sea - I still don’t know what to do with it? Isn’t it necessary to somehow combine the .osm files rather than converting each of them individually into *.img (which means also that sea is generated for each file individually)?
Also should my mkgmap custom file contain something special to support the sea generation?

Are you using the no-mp option? This fills every tile with a sea polygon, then overlays a land polygon on top where it finds natural=coastline. Thus even tiles with no land on should contain a sea polygon.

You could try manually adjusting the split tiles, so that each one contains some land. You would need to edit splitter’s areas.list file to do this (it’s a painful process, as you need to convert lat/long into Garmin coordinate system).

To support sea generation with the no-mp option, you need a couple of custom definitions in your polygons style file and your TYP file.

natural=land [0x010100 resolution 12]
natural=sea [0x32 resolution 12]

and have appropriate polygons defined in your TYP file to match these. You may also need this if you use the mp option but I can’t remember.

PS As a test, try creating the map using my style files, mkgmap option file and TYP file and see if this solves the problem or not.

OK, I can’t try it at the moment but will try it in the evening; just to make sure I do it correctly: If I want to use e.g. your TYP file and mkgmap style and options, I should call mkgmap for each “tile.osm” file by

mkgmap --generate-sea:no-mp,no-sea-sectors,extend-sea-sectors,close-gaps=1000 tile.osm

and then to use the TYP file when combining all tile files into gmapsupp.img - is it correct or am I missing something else?

Thanks again for your help.

I’m not sure if the style file will work unless you unzip it (because it contains other files other than style files) but you can try. You will also need to make sure the family ID is set to 1400 (–family-id=1400)

Unless there’s a particular reason why you compile each tile separately, I’d use

mkgmap --gmapsupp --style-file=path/to/my/stylefile/charlie --family-id=1400 --generate-sea:no-mp,no-sea-sectors,extend-sea-sectors,close-gaps=1000 *.osm CF1400.TYP 

I tried to create the map using your style and TYP file, and unfortunately result is still the same:-/

For generating I used the following bash script (I have OS Windows + cygwin installed):

alias mkgmap='java -Xmx512m -enableassertions -jar "C:\OpenStreetMap\programs\mkgmap\mkgmap.jar" --draw-priority=10000 --transparent'
mkgmap --gmapsupp --style-file="C:\OpenStreetMap\OSM_SARDINIA\charlie" --family-id=1400 --generate-sea:no-mp,no-sea-sectors,extend-sea-sectors,close-gaps=1000 *.osm CF1400.TYP

Hmmm. Don’t know. But I did notice that you set draw-priority to 10000: this value can only vary between 1 and 30. I doubt this is the problem though.

The fact that you are making the map transparent might have something to do with it…try removing that option.

I generate my own map of the whole of Italy and I’ve never noticed this issue, but when I’m next back in front of my home computer I’ll take a more careful look.

I removed it but nothing changed… I’ve used that option just by accident, it was recommended on for converting OSM-file containing just contours… and I just by mistake used that alias again even for converting classical map tiles…

One more thing: I tried to use mkgmap-r1625 and mkgmap-r1654 - couldn’t be there some problem with the sea generation in the latest mkgmap versions? (just a desperate idea… )

Here’s a high-level view of Sardinia from a map I compiled based on a 1st July 2010 Italy extract from Geofabrik:
Apart from the horizontal blue artifact about half-way up the island, there are no problems with tiles that aren’t coloured properly.