logo separator

[mkgmap-dev] if-then branch ready for merge to trunk?

From Gerd Petermann GPetermann_muenchen at hotmail.com on Sun Mar 26 14:04:32 BST 2017

Hi all,
I'd lile to merge the branch soon and do some more refactoring to simplify the code.

I think the branch is fully backward compatible with trunk, that means,
it should work with existing maps and should produce equal maps.

It brings three changes:
1) It adds if-then-else syntax for styles, might be useful for doing this:
if (mkgmap:option:routing=car) then
	include "inc/car-rules";
end 
2) It adds the new option --style-option :
--style-option
	Provide a semicolon separated list of tags which can be used in the style.
	The intended use is to make a single style more flexible, e.g.
	you may want to use a slightly different set of rules for a map of
	a whole continent. The tags given will be prefixed with "mkgmap:option:".
	If no value is provided the default "true" is used.  
	This option allows to use rules like
	mkgmap:option:light=true & landuse=farmland {remove landuse}
	Example: -- style-option=light;routing=car
	will add the tags mkgmap:option:light=true and mkgmap:option:routing=car
	to each element before style processing happens.  

3) It adds the possibility to add multiple map objects with a singe rule, e.g. two rules using the same expression like 
junction=roundabout & (highway=trunk | highway=trunk_link) [0x0c road_class=4 road_speed=2 resolution 24 continue]
junction=roundabout & (highway=trunk | highway=trunk_link) [0x10801 resolution 18] 
can be written like this:
junction=roundabout & (highway=trunk | highway=trunk_link) [0x0c road_class=4 road_speed=2 resolution 24] [0x10801 resolution 18] 

If I hear no complains I'll do the merge on tuesday.

Gerd


More information about the mkgmap-dev mailing list