4

Not sure if is a bug or I'm missing something. Every time i'm creating a new shapefile with "Create shapefile layer" i got a multipolygon instead of a polygon (at least is what I'm expecting).

Also got same issues, when using an import of PostGIS table (with "Polygon" type geometry in db) and trying to add/save the polygons, I got an error with the message of unable to commit because different type inside the database compared to the default type which is created.

I ve tried different versions of QGIS (3.10,3.12,3.16) but seems to have all buggy behaviour. I'm on Windows.

  1. Creating a simple polygon as a Polygon type with rectangle tool enter image description here

  2. Before saving: Getting the type of the polygon displays correctly a Polygon type enter image description here

  3. After saving: The type is changing in Multipolygon without any warning. enter image description here

2

Shapefiles don't distinguish between polygons and multi polygons, but many other programs do so it makes sense to "promote" polygons to multi when exporting them.

3
  • Thank you for your answer, but I do not really understand the meaning of to "promote" polygons to multi when exporting them. – Taras Jan 15 at 13:14
  • A polygon is just a special case of a multi-polygon with only one polygon in it – Ian Turton Jan 15 at 16:45
  • Thank you for clarity ! – Taras Jan 15 at 17:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.