Komяpa wrote:
Hi everyone,
Thinking of casings/polygons problem.
Imagine a linear road that finishes as asphalted surface inside a
forest. Let the road be highway=service; the asphalted surface -
highway=service area=yes, and forest - landuse=forest.
Currently, we draw:
- forest as green;
- highway=service area=yes polygon as white
- casings for both highways. The casing for linear service overlaps
with white area's polygon.
- linear fill for highway.
I don't understand completely. I assume the casing for the linear way is grey
and it is filled white. What do you mean by casing of the area? Is this a
simple line style that uses the same way as the area? What is it's colour, is
it grey?
That leads to rendering artifacts. We can omit them by rendering first
casings, then polygons - but that leads to roads being casingsless in
forests.
What I propose:
- add background-*, same as fill-*, rendered before casings;
- render fill-* in the same loop with lines.
Any objections / better ideas?
Can't this be solved with explicit z-index?
JOSM assigns as default z-index:
area -1000
line casing -100
line pattern -1
line 0
line text 2
node 1000
untagged node 1000+epsilon
offset for selected objects: +700
offset for members of a selected relation: +600
All objects are in one rendering loop, because:
* Nodes are much more common than ways, so performance wise, there is no
difference sorting only /nodes/ compared to /all objects/ by z-index.
* Sometimes it is useful to render node styles below line styles, e.g. if you like to
mark the modified objects with a "halo".
Now, you probably want to draw the asphalted area on top of the way casing, so
you could raise the area to a z-index of -50.
Regards, Paul
_______________________________________________
Mapcss mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/mapcss