NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hello, there.

I modeled here a needle-leaved forest parcel in a bigger broad-leaved forest as an inner multipolygon, but this inner parcel is not rendered, as if there was nothing here, a big hole, full of nothing, in the middle of the forest. I'm wondering: did I messed up the modelling, or is the area misrendered?

Awaiting your answers,


asked 27 Sep '16, 08:58

Penegal's gravatar image

accept rate: 0%

This issue has been fixed, and such inner polygons are now rendered correctly.

(05 Apr '18, 18:55) Penegal

Hard to believe but: "Not a bug, it's a feature"
Assume that also means, it's not going to be "fixed" anytime soon.
At least there are workarounds possible, more or less complicated.

As I've learned only recently too, after years of struggling and wasting endless time with this and other "mysterious forest bugs", those empty forest-in-forest inners are not a bug at all. This behavior is fully intentional!

The reason is that otherwise the old legacy style to create multipolygons would not work anymore. Way back when MPs were first invented, things worked completely different: the forest tag HAD to be given on all outers AND all inners too, not in the relation itself. Therefore it was decided, when the "new" method was introduced years later, that if inners contain the same tags as the relation itself, renderers SHALL keep ignoring such "duplicate" tags on inners. To keep compatibility with that legacy method.
And of course that creates all sorts of rendering probs now, especially when people mix up old and new styles in the same relation (like tagging outer ways directly instead of tagging the relation)

Can't remember anymore where exactly this was explained by one of the osm history experts... Have read it on some discussion page, perhaps in a forum or the Talk mailing list. And the wiki contains a giant quotes collection of multipolygon discussions, some 30 pages filled with MP discussions going back some 10 years! Perhaps it was in that huge heap somewhere:

The recommanded workaround for this non-bug with different leaftypes was to either
- create a new MP relation for each forest-in-forest inner, just 1 member, and move the forest tag from the way into the new relation
- or else to create duplicate ways for such inners: way-1 to stamp the hole into the big forest, and way-2 (NOT in any relation) to fill that hole with the smaller forest again. This also seems to be what those Corine-landcover monsters do.

The prob is, hardly anyone is aware of that issue, myself included until only recently, and therefore have occasionally "fixed" such "nonsense 1-member-relations" or "nonsense duplicate ways" :-(

Anyway, the example in the first post above contains 2 mini-forest inners.
Have fixed the 2nd by using the first method, and left the first as is for comparison.

PS: of course this affects not only forests but all sorts of MULTIPOLYGONs, incl. meadows, water etc.

permanent link

answered 04 Oct '16, 21:48

wycbtma's gravatar image

accept rate: 33%

I dont expect to see much difference. Forest areas have a minor casing and the rendering does not distinguish between areas with different leaf_type tags (at least in part because this depends on a major refactoring of the osm2pgsql database schema). At best one might expect However I think you would expect to see narrow green lines outlining the parcels.

SomeoneElse has mapped an area of mixed woodland in Nottinghamshire in detail: You can also view the area in Overpass-turbo here. This area is a useful testbed for creating a reasonably sized data set for extending the cartography, but perhaps more importantly understanding what is involved in mapping such places. You can make out the thin lines separating the different compartments, which should also be there in your case.

permanent link

answered 28 Sep '16, 10:26

SK53's gravatar image

SK53 ♦
accept rate: 22%


My vague recollection is that there's a known issue (possibly historical, possibly with osm2pgsql) with a multipolygon inner having the same area tag as an outer which causes the inner tag to "disappear".

If someone can find the same situation (inner forest or wood polygon within an outer) in the UK or Ireland I can investigate further.

(28 Sep '16, 11:08) SomeoneElse ♦

For info I've reproduced the issue here, with a "mixed" inner in a "broadleaved" outer:

My own rendering, which treats broadleaved wood as different to mixed wood doesn't show the hole (it renders a mixed area inside a broadleaved area) but OSM-Carto does.

Issues have been raised at and . That osm2pgsql issue seems to have been closed because it was an "old-style" multipolygon, which isn't the case in my example. It probably needs raising again at osm2pgsql's github (I can't see a current issue describing it).

A workaround would be to avoid the use of multipolygons where possible (which makes sense from an "ease of mapping" perspective if your dealing with multipolygons that are "most of Thailand" or "most of Quebec") but in a simple example like yours a multipolygon should be a sensible way to map it.

(28 Sep '16, 13:16) SomeoneElse ♦

I didn't expect to see a difference either: I knew that different rendering for broad-leaved and needle-leaved wasn't effective because of some database issue, but I mapped it anyway for the day it will be rendered. Besides, I expected the inner polygon to be rendered, even if it is rendered the same way than the outer one; its disappearance is unexpected, and a bug IMO, as the underlying data is, AFAIK, valid, unless one can explain me why the data is malformed, or unoptimized, and why it causes the rendering bug.

I opened an issue on Github for that:

(28 Sep '16, 15:38) Penegal

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 27 Sep '16, 08:58

question was seen: 3,598 times

last updated: 05 Apr '18, 18:55

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum