I have an issue on how some multipolygons are processed by imposm or osm2pqsql.

The problem arises for rendering mixed leaf type forests mapped with a MP. Let's consider such a MP as:

  • relation: landuse=forest, leaf_type=broadleaved, leaf_cycle=deciduous, type=multipolygon
  • outer: no tags
  • inner1: landuse=forest, leaf_type=needleleaved, leaf_cycle=evergreen
  • inner2: landuse=meadow
  • inner3: natural=water, water=pond

Examples of this kind of MP live in OSM here and here.

I'm using imposm2 for importing OSM data to make some paper maps using a custom mapping aimed at rendering the leaf_type. However, with this kind of MP, I got blank holes in the forest for inner rings of type "inner1" that specify a different leaf_type than the relation. Inners like inner2 or inner3 are well rendered. This is not really a Mapnik problem since actually the inners of type "inner1" are not imported in my PostGIS DB using imposm2.

Actually, I'm not the only one to face problem with these kind of MP, since the Transport, the Humanitarian and the OpenCycleMap renderings also show these holes in the MP. I though of a limitation of imposm2 but the Humanitarian rendering is supposed to use osm2pgsql. I didn't check for OpenCycleMap nor the Transport Map.

The questions:

  • Is it a limitation of both imposm2 and (a old version) of osm2pgsql? Can it be circumvented by a pre-processing of the raw osm data*?

  • Is there a better mapping practice for these MP (that does not trigger JOSM warning)?

Thanks for the support,

EDIT: https://help.openstreetmap.org/questions/52242/needleleaved-inner-forest-polygon-not-rendered-rendering-or-modelling-problem is a related question


* Actually if I manually delete the inners of type "inner1" from the relation, it works, but I'd like to find a automatic and better solution!

asked 04 Oct '18, 11:16

juminet's gravatar image

accept rate: 0%

edited 05 Oct '18, 08:36

This is a bit difficult to answer here. If you think that some software isn't doing the right thing, you should open tickets with those pieces of software.

There was a big change recently moving away from "old-style" multipolygons. The problems you are seeing might be related to that. Either people are using old versions of the software or haven't reimported the data or something like it. But that can not be answered in a general fashion, you have to ask the people developing or running this software.

permanent link

answered 04 Oct '18, 17:27

Jochen%20Topf's gravatar image

Jochen Topf
accept rate: 32%

Hi, there are some link about this "... big change recently moving away from 'old-style' multipolygons"? It is only a osm2pgsql news or a general OSM community decision?

(03 Nov '18, 12:17) ppKrauss

This is a general thing, not osm2pgsql specific. You can read about this here: http://area.jochentopf.com/

(03 Nov '18, 14:09) Jochen Topf

The fact that the Standard rendering does render these inners, but as you wrote Humanitarian / Cycle Map / Transport not, does make it likely this is an issue of older versions of osm2pgsql being used.

Contacting the developers is probably only really sensible if you know the exact versions of the software being used by the renderings that fail.

I would definitely not change your tagging / mapping practice to suite a specific renderer or (older) version of an import tool, unless the MP are simply broken and invalid in JOSM, in which case you need to fix them. That doesn't seem likely here though, considering they do render fine in Standard style.

The solution in your case seems to upgrade your own software stack.

permanent link

answered 04 Oct '18, 22:10

mboeringa's gravatar image

accept rate: 12%

edited 04 Oct '18, 22:15

Side note: using a totally different import and rendering software stack based on ArcGIS, I don't see any issue with holes in these multipolygons, this is another indication that the MPs are sound.

(04 Oct '18, 22:15) mboeringa
Your answer
toggle preview

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](http://url.com/ "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: 04 Oct '18, 11:16

question was seen: 336 times

last updated: 03 Nov '18, 14:09

powered by OSQA