On Tue, Mar 4, 2008 at 7:42 AM, Robert Vollmert <[EMAIL PROTECTED]> wrote:
>
>  On Mar 3, 2008, at 22:45, Sven Grüner wrote:
>  > Robert Vollmert schrieb:
>
> >> I think not. I'm pretty sure for osmarender, but may not have had
>  >> enough patience to test out the various combinations with mapnik.
>  >
>
>  I was wrong about osmarender: What I remembered is actually code from
>  mapnik (or rather, osm2pgsql):
>
>  static int pgsql_out_way
>  [...]
>      const char *multipolygon = getItem(tags, "multipolygon");
>
>      // If the way has been part of a multipolygon then skip
>      if (multipolygon)
>          return 0;
>
>  The "multipolygon" tag is set in pgsql_out_relation for ways with
>  role=inner. Furthermore, pgsql_out_relation appears to aggregate tags
>  of all ways involved, so you should end up with
>  landuse=forest,natural=water on the multipolygon. I wonder what
>  happens when both have differing natural= tags?
>
>  Or am I reading this all wrong? I haven't really been able to test
>  because so far, my mapnik install doesn't appear to render any areas...
>
>
>  > Nah, that island is just natural=water and role=inner in a
>  > multipolygon.
>  > The green comes from the park encasing the lake. But it only works
>  > when
>  > drawn counter-clockwise.
>  >
>  > http://www.informationfreeway.org/?lat=52.249&lon=10.52656&zoom=17
>
>  And it also works in mapnik! Maybe you're just lucky with the drawing
>  order? :)

I think a lot of this is just people being lucky, one way or another!
Eventually I'm going to implement a style that has semi-transparent,
patterned areas, and then we'll see which are being drawn as
polygons-with-holes, and which are just convenient coincidences that
render as expected when every area is completely opaque.

Take, for example,
http://www.gravitystorm.co.uk/osm/?zoom=13&lat=6238960.87976&lon=973750.20154&layers=0B0
- looks fine on mapnik, right? Forest with holes, right?

But switch on the contours at
http://www.gravitystorm.co.uk/osm/?zoom=13&lat=6238960.87976&lon=973750.20154&layers=B00
and you'll realise that there's no holes in the forest, just more land
areas painted over the top. Sure, I can fix this in the rendering by
drawing contours one step higher in the stack, but if the forest was
semi-transparent and the land was too then there'd be a muddy patch in
these clearings with land, forest and more land all blending over the
top of one another.

The most important thing from this is to tag things accurately. No
layer=1 to get a lake rendering above a forest. No reliance on
natural=land rendering over the top of a forest to make clearings. If
there's no forest a given location, then it mustn't be within a forest
area. Simple, straightforward, accurate.

Cheers,
Andy

_______________________________________________
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk

Reply via email to