5

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

1

1 Answer 1

4

Shapefiles don't distinguish between Polygons and MultiPolygons, but many other programs do so it makes sense to "promote" polygons to multi (making simple Polygons into a MultiPolygon with one polygon in it) when exporting them.

2
  • Thank you for your answer, but I do not really understand the meaning of to "promote" polygons to multi when exporting them. Commented Jan 15, 2021 at 13:14
  • A polygon is just a special case of a multi-polygon with only one polygon in it Commented Jan 15, 2021 at 16:45

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.