[mkgmap] beginners questions

Hi everyone!

Sorry if this has been answered before, but I tried to figure it out on my own and couldn’t find answers, so I’m asking here.

  1. Style, TYP and map content
    Here are some statements, this is how I understood things work. A simple yes or no (maybe the latter with an explanation) is enough :smiley:
  • style determines what is displayed on which zoom level; correct?
  • TYP determines how things look like; correct?
    Question: Does style actually change content of the map, e.g. if I don’t have a style for a certain Element, it won’t be compiled in the resulting .IMG files?

Question: If I want to change a certain format (i.e.: change the TYP file) and don’t know how to reference it, what is the easiest way? For now, I’m using the OSM editor, search for the element and look at its properties. Isn’t there an easier way? For example, I couldn’t figure out yet how to change the behaviour of POI symbols, they always appear on the highest zoom levels (most zoomed “in”).

Question: Is it OK to keep my formatting (TYP) similar (or even identical) to the original mapsource styles (given I don’t copy styles from them, creating them on my own) if I plan to publish my maps? I want to create a map that “feels” like a City Navigator so you won’t have to adapt too much.

  1. Coastline
    No matter what I do, coastline always looks “edgy” in wider zoom levels. If you zoom in enough, everything looks OK. I tried to use precompiled sea from navmaps.eu but it didn’t chage anything. Is this a normal behaviour?

  2. Sea tiles
    There are always gaps between sea tiles… sometimes just a line, but the gaps are there. - Is this OK?

  3. Workflow / Tools
    For now, I work like this:

  • Change style
  • Compile IMG
  • Make .gmapi from IMG
  • Install .gmapi
  • Check results in BaseCamp
  • (edit TYP, if applicable; restart BaseCamp and check again)
  • if not done yet, start over from the beginning

Isn’t there a more straightforward approach? Like some sort of WYSIWYG-Editor that would allow you to test your settings (on a small sample) on the fly?
Or are there sample maps that contain (almost) all elements and compile very quickly so you can at least minimize compiling time?

Unfortunately, I couldn’t find either of those.

  1. Map information
    I’m missing every information about my map on my Garmin Oregon 450. I’ve set all descriptive options (like almost all *name options and copyright-message), but nothing is displayed on the Garmin, not even the map name. This is OK if you have only one OSM map, but if you have several OSM maps, you can’t distinguish them.

Sorry for all those questions. I’m excited about the possibilities, but also a little lost in the complexity of the tools. :frowning:

Regards
Steffen

*1. Style, TYP and map content
Here are some statements, this is how I understood things work. A simple yes or no (maybe the latter with an explanation) is enough :smiley:

  • style determines what is displayed on which zoom level; correct?

Yes. it does the mapping OSM to Garmin-Codes. Note that some zoom levels are hardcoded. For example, railway (type 0x14)
is limited to zoom 200m on most garmin devices.

- TYP determines how things look like; correct?

Yes.

Question: Does style actually change content of the map, e.g. if I don’t have a style for a certain Element, it won’t be compiled in the resulting .IMG files?

Yes.

*Question: Is it OK to keep my formatting (TYP) similar (or even identical) to the original mapsource styles (given I don’t copy styles from them, creating them on my own) if I plan to publish my maps? I want to create a map that “feels” like a City Navigator so you won’t have to adapt too much.
*
Depends what you want to achieve. Of course you can keep the Garmin standards, but you can also change everything.

*2. Coastline
No matter what I do, coastline always looks “edgy” in wider zoom levels. If you zoom in enough, everything looks OK. I tried to use precompiled sea from navmaps.eu but it didn’t chage anything. Is this a normal behaviour?
*

Screenshot?

*3. Sea tiles
There are always gaps between sea tiles… sometimes just a line, but the gaps are there. - Is this OK?
*
That’s “normal”. There are 2 diffent generate-sea options. You could try the other one.

*4. Workflow / Tools
For now, I work like this:

  • Change style
  • Compile IMG
  • Make .gmapi from IMG
  • Install .gmapi
  • Check results in BaseCamp
  • (edit TYP, if applicable; restart BaseCamp and check again)
  • if not done yet, start over from the beginning

I don’t use steps 2 and 3.

*5. Map information
I’m missing every information about my map on my Garmin Oregon 450. I’ve set all descriptive options (like almost all *name options and copyright-message), but nothing is displayed on the Garmin, not even the map name. This is OK if you have only one OSM map, but if you have several OSM maps, you can’t distinguish them.
*
Checkout mkgmap-options:

description=mymapname
series-name=mymapname
family-name=mymapname

Garmin distibguishes the maps on their IDs. That means: compile a family ID into your maps.

Do you have a documentation about this at hand? That sounds as might save me from some serious headaches I got while working on railways… :confused:

My question was more of legal nature than of technical :smiley:

Sure :slight_smile: This is what I mean: http://bebef.de/foo/zoom.png

How do you get to a map after changing the styles without making an IMG out of it?

I think I did that. Heres what my configuration looks like:

#mapname:80000001
code-page:932
#charset:latin1
lower-case
country-name:JAPAN
region-name:JAPAN
region-abbr:JP1
country-abbr:JP
overview-mapname:63240000
overview-mapnumber:63240000
family-id:1500
family-name:Japan OSM Family
series-name:Japan OSM Series
description:Japan OSM kanji
area-name:Japan
copyright-message:Japan Garmin map from OSM made with mkgmap. OSM uses ODbL.
route
drive-on-left
remove-short-arcs
adjust-turn-headings
add-pois-to-areas
#coastlinefile:japan.coastline.osm
precomp-sea:sea
#generate-sea:extend-sea-sectors,close-gaps=6000
bounds:bounds_20130220
style-file:CF_Mapsource
#style-file:mkgmap-style-toponew
#style-file:mystyle
#gmapsupp
index 
tdbfile
nsis

Okay, seems it was a codepage related issue. I created a map with the “wrong” codepage (for this map) and I can see the description now.

Sorry, I meant steps 3 and 4. :wink:

Okay, that makes more sense :slight_smile:

What about the edgy sea and about how to identify map elements to reference them in the style file?

About the japanese characters: I think my device just won’t display them and that’s that. I’ll compile a new map with “–name-tag-list:ja_rm” instead. :frowning:

I’ve never seen this before. Maybe the precompiled sea-data is some kind of simplified/filtered.

The rendering could be improved by setting the optimization options lower


--reduce-point-density=NUM
	Simplifies the ways with the Douglas Peucker algorithm.
	NUM is the maximal allowed error distance, by which the resulting
	way may differ from the original one.
	This distance gets shifted with lower zoom levels. 
	Recommended setting is 4, this should lead to only small differences
	(Default is 2.6, which should lead to invisible changes)

--reduce-point-density-polygon=NUM
	Allows to set the maximal allowed error distance for the DP algorythm
	to be applied against polygons. Recommended setting is 8.

--merge-lines
	Try to merge lines. This helps the simplify filter to straighten out
	longer chunks at lower zoom levels. Decreases file size more.
	Increases paint speed at low zoom levels.
	At the moment this option causes routing errors. Use only if routing 
	is not needed in your map.
	
--min-size-polygon=NUM
  Removes all polygons smaller than NUM from the map.
  This reduces map size and speeds up redrawing of maps. 
  Recommended value is 8 to 15, default is 8.

That sounds good, I’ll give it a try :slight_smile: Thanks