Commit: r1189: Remove the priority setting from the GType.

Version 1189 was commited by steve on 2009-09-13 17:12:34 +0100 (Sun, 13 Sep 2009) BRANCH: style Remove the priority setting from the GType. It should be associated with the rule, so that we can order the rules before running them. Add some tests for the ordering rules that I expect to implement.

Moin, svn commit schrieb:
Version 1189 was commited by steve on 2009-09-13 17:12:34 +0100 (Sun, 13 Sep 2009) BRANCH: style
Remove the priority setting from the GType.
It should be associated with the rule, so that we can order the rules before running them.
Will your change also allow the generation of multiple garmin elements from a single OSM element? I would guess so, since if we want to run multiple actions than there shouldn't be anything against multiple conversions. One minor point I noticed in the old style code: Right now a rule with an "or" as the main operator in the tag list is split into two seperate rules. This works ok, if only the first rule with matching tags is applied. If we apply multiple rules, this seperation can result in actions performed twice or the double creation of map elements. Not really a big issue, but when you are in this area anyway, you might want to fix this too. Gruss Torsten

Hi On 14/09/09 15:37, Torsten Leistikow wrote:
Will your change also allow the generation of multiple garmin elements from a single OSM element? I would guess so, since if we want to run multiple actions than there shouldn't be anything against multiple conversions.
No it doesn't. At least not at this stage. I just want to get the stage where there are predictable results from the rules. I would like to know how people use the 'continue' patch. It seems to me that there would be two cases. 1. Where the mapper has used the same way for two different things. A boundary that goes along a road is a common case. In this case I imagine that you would always want to create both features (assuming that you are using them both) and for this to be detected automatically. 2. The styler wants to create two features to give some special effect. In those cases it seems right that it should have to be specified in the style somehow. By using the 'continue' keyword or some other means. This may be less common now that extended types are implemented. ..Steve

Steve Ratcliffe wrote:
Hi
On 14/09/09 15:37, Torsten Leistikow wrote:
Will your change also allow the generation of multiple garmin elements from a single OSM element? I would guess so, since if we want to run multiple actions than there shouldn't be anything against multiple conversions.
No it doesn't. At least not at this stage. I just want to get the stage where there are predictable results from the rules.
I would like to know how people use the 'continue' patch. It seems to me that there would be two cases.
I use it extensively on my maps. The extended types made me even more dependent on the "continue" patch. Basic things I always show on top: bridges, tunnels, routes (mtb, bicycle, hiking, foot), mtb:scale, mtb:scale:uphill, sac_scale, .... However also for cases like a way being tagged both highway=footway and highway=cycleway. or other rare things like boundaries, hedges, fences, etc... Theese are too many combinations to be covered by working with extended styles. So I am your group 1. I would like to have the rules working a bit like the continue patch, so not only in order, but also that commands built upon each other. i.e. if three rules match the same street (e.g. changes to the name attribute) I would like all of them applied in order. As an example take the following: highway=pedestrian, bicycle=no, ref=1234, name=anywhere Now in my rules I would have the following (some other rules in between that don't match) original name: "anywhere" 1. highway=* {name '${ref} ${name}' | '${ref}' | '${name}' } resulting name: "1234 anywhere" 2. highway=pedestrian & {name '${name} pdstr' | 'pdstr' } resulting name: "1234 anywhere pdstr" 3. highway=pedestrian & bicycle=no {name 'xbk ${name}' | 'xbk' } resulting name "xbk 1234 anywhere pdstr" In general I don't need any rule to take out the underlying street from further processing, but of course the finest would be to specify that rules with [continue] leave the underlying street open for further processing, while if no [continue] is given they are taken out. So the following behaviour would be ideal I think: original name: "anywhere" 1. highway=* {name '${ref} ${name}' | '${ref}' | '${name}' } [continue] resulting name: "1234 anywhere" 2. highway=pedestrian & {name '${name} pdstr' | 'pdstr' } resulting name: "1234 anywhere pdstr" 3. highway=pedestrian & bicycle=no {name 'xbk ${name}' | 'xbk' } rule does not apply anymore, because 2. had no [continue] flag set, and thereby removed the whole line from further rule processing. Another interesting idea would be to be able to make passes. so instead of putting [continue] one would put [run1], [run2], and so on. inside each "runX" all rules flagged are run in order. A match excludes it until the next higher run is passed. Then runX+1 run goes over takes the complete output of the runX. Finally to conclude any rule without [run] is run on everything in order.
1. Where the mapper has used the same way for two different things. A boundary that goes along a road is a common case. In this case I imagine that you would always want to create both features (assuming that you are using them both) and for this to be detected automatically.
2. The styler wants to create two features to give some special effect. In those cases it seems right that it should have to be specified in the style somehow. By using the 'continue' keyword or some other means. This may be less common now that extended types are implemented.
..Steve _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Steve Ratcliffe schrieb:
I would like to know how people use the 'continue' patch. It seems to me that there would be two cases.
1. Where the mapper has used the same way for two different things. A boundary that goes along a road is a common case. In this case I imagine that you would always want to create both features (assuming that you are using them both) and for this to be detected automatically.
I think in most cases you want to have both features in the map, so that the "continue" setting could be the default behaviour (beside the backwards compatibility). But there are also some cases, where you want to suppress one element to have a cleaner map display, e.g. to avoid overlapping poi icons. I guess that you can achieve this by extending your style rules, but it is much more simply when you have a "stop" option.
2. The styler wants to create two features to give some special effect. In those cases it seems right that it should have to be specified in the style somehow. By using the 'continue' keyword or some other means. This may be less common now that extended types are implemented.
I do not think, that the extended types really make a difference here (as far, as i have understood them). I use semi-transparent lines for displaying different features of a way, which are not related to each other. E.g. whether it is a bridge or not, whether it is a oneway street or not, whether it is part of a route or not, whether the access is allowed or not. If there is a "continue", I just need a single rule for each feature and a single rule for each road type. If I had to build such a map without a "continue", the number of required rules and line types would grow exponentially. Gruss Torsten
participants (4)
-
Felix Hartmann
-
Steve Ratcliffe
-
svn commit
-
Torsten Leistikow