Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Holes of multipolygon relation not rendered #2082

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 9 comments
Closed

Holes of multipolygon relation not rendered #2082

openstreetmap-trac opened this issue Jul 23, 2021 · 9 comments

Comments

@openstreetmap-trac
Copy link

Reporter: augustus.kling[at]gmail.com
[Submitted to the original trac issue database at 8.08am, Monday, 20th July 2009]

Mapnik does not render inner polygons of the multipolygon relation 172181. It consists of one outer polygon (26940083) tagged as natural=water and multiple inner polygons. The inner polygons are tagged as natural=wood and should be rendered as islands within the lake. Osmarender and JOSM are rendering the multipolygon correctly.

The holes (ways 23493419 and 23493421) in the nearby forest are rendered correctly in Mapnik, too.
Link to the area: http://www.openstreetmap.org/?lat=53.6127&lon=12.257&zoom=14&layers=0B00FTF

The direction of the inner polygons are differing. It seems that multipolygon relations are only rendered correctly if the outer polygon goes clockwise and the inner polygon goes counterclockwise. This behavior is documented in the English and German wiki-pages covering multipolygon relations. The wiki also clearly states that the directions of the polygons does not matter.

In the fixed issue #1113 it is said that the directions should be fixed during the osm2pgsql conversion process. This makes me wonder what causes the wrong rendering described above.

Does the polygon direction still matter for Mapnik?[[BR]]
If yes:[[BR]]

@openstreetmap-trac
Copy link
Author

Author: augustus.kling[at]gmail.com
[Added to the original trac issue at 4.52pm, Monday, 20th July 2009]

The islands within the lake are rendered by Mapnik for zoom level 11 or smaller.

@openstreetmap-trac
Copy link
Author

Author: steve8[at]mdx.ac.uk
[Added to the original trac issue at 9.36pm, Sunday, 9th August 2009]

John - could you have a look at this one. Multipolygon relations boggle my mind.

@openstreetmap-trac
Copy link
Author

Author: Ldp
[Added to the original trac issue at 11.30am, Friday, 11th June 2010]

I believe it currently renders fine and as expected? If agreed, this ticket can be closed.

@openstreetmap-trac
Copy link
Author

Author: augustus.kling[at]gmail.com
[Added to the original trac issue at 1.22pm, Friday, 11th June 2010]

You're right, the originally mentioned example looks great now.

Unfortunately, I found another example where islands don't show up in Mapnik (but look fine in Osmarender and JOSM). See http://www.openstreetmap.org/?lat=47.87375&lon=9.83786&zoom=15&layers=B000FTF
[[BR]]The lake / loch called Rohrsee should have 3 islands. The lake is tagged with area=yes' which could be the problem although it should not matter. It might also help to move the classification 'natural=water to the relation instead of having it on the outer way. However I did not change the tags to have a working (or better not working) example.

Cheers for looking into this.

@openstreetmap-trac
Copy link
Author

Author: steve8[at]mdx.ac.uk
[Added to the original trac issue at 10.56pm, Sunday, 13th June 2010]

I have added natural=land to the three inner parts of the multipolygon for Rohrsee and it seems to have resolved it. This is the way I normally tag multipolygons, and I think tagging the inners is the key.

@openstreetmap-trac
Copy link
Author

Author: augustus.kling[at]gmail.com
[Added to the original trac issue at 1.51pm, Monday, 14th June 2010]

I don't agree that tagging the inner objects resolves the problem. It does fix the rendering, though.[[BR]]
If the inner objects are not tagged at all it is still defined that the outer object has to end where the inner object begins. Within a lake it is quite obvious that there is land where the water ends (like you tagged it). However if we think about, say a forest, it is no longer obvious what is within the inner area. One might want to end the forest (or any other type of outer object) without specifying the content of the inner area (because it is unknown). Therefore Mapnik shouldn't paint within the inner objects' areas even if they remain untagged.

@openstreetmap-trac
Copy link
Author

Author: mdk
[Added to the original trac issue at 9.52am, Friday, 13th January 2012]

I think this problem is generally solved. Mapnik is normally leaving the holes in multipolygons empty. But sometimes it seams, that the mapnik DB is in an inconsistent state. This happens if there are several updates to to the MP and the inner/outer ways. In this case it could happend, that the holes are not correctly rendered. Only deleting and inserting ways and relation solf the problem for me (I run into this problem twice). But I can't tell you which opperations corruptede the mapnik DB.

@openstreetmap-trac
Copy link
Author

Author: joriskofman[at]gmail.com
[Added to the original trac issue at 11.42am, Wednesday, 28th March 2012]

I have spotted this problem in some multipolygons located here:
[http://www.openstreetmap.org/?lat=57.015875&lon=9.979489&zoom=18&layers=M]
I have not been able to spot any problems with the multipolygons, it seems that there are some in this area that render just fine, while others dont.

@openstreetmap-trac
Copy link
Author

Author: Andy Allan
[Added to the original trac issue at 7.08pm, Monday, 9th December 2013]

As far as I'm aware, all multipolyon handling in osm2pgsql is working fine. If there are currently problems with multipolygons, that's the component to add new tickets to.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant