[OSM-talk] Mulltipolygons and Mapnik

Jon Burgess jburgess777 at googlemail.com
Sat May 31 22:07:16 BST 2008


On Sat, 2008-05-31 at 22:05 +0200, Cartinus wrote:
> On Saturday 31 May 2008 21:26:53 Jon Burgess wrote:
> > On Sat, 2008-05-31 at 20:08 +0200, Cartinus wrote:
> > > I forgot to mention:
> > >
> > > A hole filled with something else IOW different tags on the outer and
> > > inner polygons only works in T at H/Osmarender
> > >
> > > http://tile.openstreetmap.nl/?zoom=17&lat=52.06243&lon=5.10283&layers=000
> > >000BF
> > > http://tile.openstreetmap.nl/?zoom=17&lat=52.06243&lon=5.10283&layers=000
> > >00B0F
> > > http://tile.openstreetmap.nl/?zoom=17&lat=52.06243&lon=5.10283&layers=B00
> > >0000F
> >
> > I'm not certain which polygons you are talking about here. If you are
> > talking about the ones to the NW, then those look like they are marked
> > with area=yes. Support for area=yes was only recently added to the
> > osm2pgsql code and the rendering styles have not been implemented yet.
> >
> > Mapnik will render inner areas with different tags. It uses the area of
> > the polygons to figure out the render ordering. Smaller areas always
> > render on top of larger areas of the same layer. If the layer tags
> > differ then this will take precedence.
> >
> > 	Jon
> 
> The area=yes stuff has nothing to do with multipolygons. There is only one 
> multipolygon in the view I linked to. (relationID=9214; name=Meubelboulevard)
> 
> Click on the first link. Right in the middle you'll see a park surrounded by a 
> retail area.
> 
> Now switch to either of the two Mapnik renders. At the western end of where 
> the park showed in the Osmarender view (just below the parking icon) you can 
> see some edgeline between retail and retail (except the inner retail should 
> be park). Around the rest of the park this is obscured by roads.

OK I see it now. The multipolygon is for the outer retail area and the
inner 'hole' way is tagged for the park. As you say, this does not work
with Mapnik. It is still basing its assumptions on the inner holes being
tagged the same as the outer ring. If you need to put a park into the
hole then this needs to a another way (even it it uses the same nodes).

Avoiding this duplication of ways was the aim of the suggestion as
documented on the wiki that tags on the inner ways should always be
ignored. As you say, this does not work with Mapnik at present.

	Jon






More information about the talk mailing list