logo separator

[mkgmap-dev] Strict ordering of action in a style rule file.

From Steve Ratcliffe steve at parabola.me.uk on Fri Sep 18 14:21:32 BST 2009

Hi

I have now made the change to introduce strict ordering to the
action in a style rule file.

Previously the actions where not triggered in any particular order and
they were all run before any matching took place.  In the new code,
the actions are run strictly in the order that they occur in the file.
Actions only affect matching of rules later in the file, never
rules earlier.

So for example if you have an element with highway=primary then the
following set of rules will result in 0x2 and not 0x1 which would be
the case currently.

highway=primary {set marker=1}
marker=2 [0x1]
highway=primary {set marker=2}
marker=2 [0x2]

I've not looked at the performance and have one thing to do to
possibly improve it, but the functionality is working as far
as I can tell with some simple test.

For everyone with complex rules, could you please give it a go.
It is on the style branch in subversion, or you can download
one I prepared earlier here:

	http://www.mkgmap.org.uk/snapshots/mkgmap-style.jar

If you see any case where the rules and actions do not appear to run
in the order that they appear in the file is a bug and should be
reported.

..Steve



More information about the mkgmap-dev mailing list