Issues with SHP_POLYGONZ shapefile type 2

Hi @jerryfaust, @pmeems,

I noticed another interesting thing.
I order to save the shapefile from previous topic for the ShpfileType input of the Shapefile.CreateNew method, I am using:
MapWinGIS.ShpfileType.SHP_POLYGONZ

However, when such .shp file is opened in QGIS, it shows that it is Polygon (MultiPolygonZM) shape type. Why is that so?

By googling I found out that unlike PolygonZ shapefile type, Polygon (MultiPolygonZM) also contains M information in addition to X,Y,Z coordinates. So it is essentially not the SHP_POLYGONZ that I defined initially.

Here is the shapefile again (if it is useful for some reason). shapefile_polygonZ.zip (925 Bytes)

Here’s an interesting read on the QGIS GitHub site:

Polygon Shapefile loaded as Multipolygon #26684

I shouldn’t speculate too much without doing more research, but my initial take is that the Shapefile specification is a relatively simple specification by today’s standards. There is no MultiPolygon shape type in the ESRI specification.

However, those who write drivers for all of the various database engines, etc, need to support a wide variety of geometry types, and some will expand the capabilities of their Shapefile driver to be more consistent with their other drivers. You can read here about the GDAL/OGR Shapefile driver, which we use for non-Shapefile data types, and I believe is also used by QGIS.

Thank you for the reply and links Jerry.
The upper screenshot is from QGIS 3.10.
When I opened the same shapefile in QGIS 2.18 I get “PolygonZM”, as per links you attached: