Problems with multipolygons

I am having an issue with using multipolygons and I do not know whether it is related to my tagging or the rendering.

I have a school that consists of a group of buildings. I have created a relation of type multipolygon and given it the name of the school. I have added each building to the multipolygon with relation type of ‘outer’. Each individual building is tagged building=‘yes’ and has no name.

All seems to render fine in Osmarender, which labels the complex with the name of the school. Mapnik on the other hand labels each building individually which starts to get messy. Which is right?

For a slightly more complex example I have a business centre that consists of four buildings each housing a different company. I have created a relation of type multipolygon and given it the name of the centre. I have added each building to the multipolygon with relation type of ‘outer’. Each individual building is tagged building=‘yes’ and the name of the company that occupies it.

Osmarender labels the centre as a whole but not the individual buildings. Mapnik bizarrely labels each building individually but labels each with the name given to the first building.

Am I doing something wrong or is this a rendering issue? I really don’t what to end up having to tag for the renderer if I can in any way help it.

Andrew

What you try to do (especially the second case) is more identifying a ‘site’ than drawing multipolygons:

(see Proposed/Site at http://wiki.openstreetmap.org/wiki/Relation))

It’s possible that mapnik doesn’t fully support enhanced multipolygons. Personnally, for a school, I draw a simple polygone for the whole area tagged with amenity=school+name=* and each individual building with a simple polygon tagged with building=yes and optionnally with a name when I know for what it is dedicated (classrooms, sports_center, canteen, etc)

I get a sense of going around in circles here :slight_smile:

This is where I started:

http://forum.openstreetmap.org/viewtopic.php?id=8061

It looks like a case of abandoning multipolygons for now and just creating a named area.

Thanks,

Andrew

Drawing a single area encompassing the school grounds and tagging it as amenity=school + name=* is actually the recommended tagging. Individual buildings get building=yes, and possibly their own name=* if they are different from the school name.

That seems to have done the trick (almost). Thanks.

However what is interesting is that while Osmarender seems to show it as expected Mapnik only renders one out of the five buildings. The tagging on each is the same “building=yes” All are wholly within the outer area but only one displays. All five used to display before I changed it. Any ideas?

Andrew

You might want to provide a link to that area.

One area (amenity=school) and five buildings (building=yes). Each independently, no relation involved. You did drop the multipolygon, right? It could be that mapnik needs to refresh that area.

It’s the task of the mapper to describe the object correctly.
It’s the task of the renderer which of the information in the database to use, which objects to draw at different zoom levels and how to draw them. The render rules may and are changing without further notice. Mappers can’t and shouldn’t try to control this.
Currently Mapnik is drawing less and Osmarender more objects. By doing this Mapnik gives a clearer map and Osmarender is showing more. E.g. compare this example by using two browser windows. Mapnik and Osmarender

For anyone interested the area in question is here. Oddly, it is not the largest building that is being rendered which is what leads me to believe that it may be a tagging issue. I have deleted the multi-polygon relation.

Andrew

There’s a large landuse=residential area enclosing many smaller areas including the school “Holmemead Middle School”. Polygons are nested spatially 3 levels: residential - school - building. I recommend to create at least one Multipolygon:


Relation (residential):
  type=multipolygon
  landuse=residential
  outer (outline polygon of residential which has no landuse tag)
  inner (polygon which is tagged school)
  ...
  inner (polygon which is tagged recreation_ground)
  ...
  inner (polygon which is tagged nature_reserve)
  inner (polygon which is tagged sports_centre)
  inner (polygon which is tagged parking)
  ...

It’s not necessary to have a multipolygon for school and its buildings because in general it’s assumed that buildings are above landuse and other areas.
In the wiki there are examples for multipolygons including a similar more complex case Polygons nested 4 levels.

Edit: A landuse=commercial is overlapping the residential at the southwest corner.