[mkgmap-dev] style options vs. command line options
From Gerd Petermann gpetermann_muenchen at hotmail.com on Tue Apr 23 07:58:11 BST 2013
Hi, sorry, I just learned more about how the levels option works: The style rules use either the levels given in the style options file or a hard coded default which is "0:24, 1:22, 2:20, 3:18, 4:16" (in r2575) Assume your lines style contains highway=path [0x08 road_class=0 level 0] The level value is used to calculate the min and max resolution for the rule. Later, when the OSM data is evaluated, each created MapElement is assigned a min and max resolution based on these values. Now, if you specify the levels option on the command line, it is used to create the map structure, and there is no need that the levels in the style rules match with the levels on the command line. This allows e.g. to throw away a level without the need to modify all style rules. So, forget part 2) of my proposal below, instead it is probably better to enhance the docu. Gerd From: gpetermann_muenchen at hotmail.com To: mkgmap-dev at lists.mkgmap.org.uk Date: Tue, 23 Apr 2013 07:44:13 +0200 Subject: [mkgmap-dev] style options vs. command line options 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 _______________________________________________ mkgmap-dev mailing list mkgmap-dev at lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20130423/6cb73818/attachment-0001.html
- Previous message: [mkgmap-dev] style options vs. command line options
- Next message: [mkgmap-dev] name-tag-list_v1.patch
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list