logo separator

[mkgmap-dev] style options vs. command line options

From Gerd Petermann gpetermann_muenchen at hotmail.com on Tue Apr 23 06:44:13 BST 2013



Hi all,

during the last days I tried to find a proper way to handle the options
"levels", "name-tag-list", and "extra-used-tags" which can appear
in the options file of a style.

The current implementation in trunk (r2575) handles each of the three options
in a completely different way:
1) If name-tag-list is given on the command-line, it overrides the setting in the style,
if not, parts of the program use the style option, parts use a hard coded default.
2) If levels is given on the command line, it overrides the setting in the style, but
not in the routines that evaluate the style rules.
3) extra-used-tags can't be overwritten because there is no such option, which 
is - in my eyes - correct .

I plan to add further options for the configuration of the overview map, so  
I tried to find a common method to handle the way how argument overriding is done.

To be honest, I found none. Some methods use the static method 
LocatorUtil.getNameTags() which doesn't know the style and evaluates only the command 
line args, and I also found no easy way to copy the option coded in the style to the list of 
command line args.

So, my proposal is this:
1) the option name-tag-list in the style options is unusable and should be removed. A 
warning should be printed when the option is found in the style, but not on the command
line and the style specifies a value different to the hard coded default which is just  "name".
2) the option levels on the command line should completely override the setting in the style options file.
I think that a test should be performed to make sure that the resulting style is usable.

If someone has a better idea, please let me know.

Gerd





 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20130423/2d2c3030/attachment.html 


More information about the mkgmap-dev mailing list