logo separator

[mkgmap-dev] Suggestions: improvements to mkgmap --style-file= and --list-styles options

From Charlie Ferrero charlie at cferrero.net on Sun Aug 9 18:41:00 BST 2009

1. Currently, if you invoke mkgmap with the --style-file= tag and point 
to a non-existent style file (or incorrect path), mkgmap continues 
regardless (and applies the inbuilt default style, afaict).  Can I 
suggest a patch to mkgmap that at least makes it clear that no style 
file was found in this circumstance?  Sadly I lack the programming 
skills to do this, but hopefully it's a relatively trivial thing to change.

2. Secondly it seems to me that mkgmap has three inbuilt styles 
(default, noname, test) that you cannot change by editing the files in 
the resources folder.

Viz: as a new user, it confused me that I though was editing the points 
file in the resources/default folder and invoking mkgmap with 
--style=default I could not see any effect on the map output.

By trial and error I found that only by specifying 
--style-file=resources/default when invoking mkgmap would my changes to 
the style file be reflected in the map.  This implies to me that the 
"default" style rules must be inbuilt into mkgmap.  Indeed, running java 
-jar mkgmap.jar --list-styles suggests that there are 3 different 
inbuilt styles.  Because there was nothing to say otherwise, I had 
assumed that I could just invoke mkgmap with --style=default (having 
edited the style files in the resources/default folder) and directly 
affect the output map.

It might therefore be less confusing to rename the subfolders in 
resources (or rename the output of --list-styles).  Or best of all, make 
it clear in the documentation that mkgmap has inbuilt styles that you 
can see if you use --list-styles, but cannot edit.  If you want to 
create your own style you need to edit the files in the resources folder 
and then invoke the file with --style-file= instead.

Charlie




More information about the mkgmap-dev mailing list