Why do the Natural Earth shapefiles like ne_110m_countries_admin_0.shp have a geometry-type POLYGON, while it should be MULTIPOLYGON (at least when I understand Understanding difference between Polygon and Multipolygon for shapefiles in QGIS? correct. E.g. USA48 + Alaska + Hawaii is Multipolygon)


Shapefile specification does not have a geometry type Multipolygon. The closest one is Polygon (with Z or M added). However, the USA is a multi-part polygon indeed meaning that it is represented as a single row in the shapefile yet the geometry itself consists of a few parts.

arcpy code run on shapefile:

> c = [f[0] for f in arcpy.da.SearchCursor("countries", "SHAPE@")][0]
> c.isMultipart`
> c.WKT[:30]
u'MULTIPOLYGON (((-155.581347656'

However, if you import the shapefile into some other more sophisticated storage format, such as PostGIS, the polygons would be stored using Multipolygon geometry type:

Importing with configuration: ne_50m_admin_0_countries, public, geom, C:\GIS\Datasets\ne_50m_admin_0_countries\ne_50m_admin_0_countries.shp, mode=c, dump=1, simple=0, geography=0, index=1, shape=1, srid=4326 Shapefile type: Polygon PostGIS type: MULTIPOLYGON[2] Shapefile import completed.

SQL in PostGIS:

select ST_AsText(Geom) from ne_50m_admin_0_countries
where sov_a3 = 'US1' and type = 'Country'

MULTIPOLYGON(((-155.58134765625 19.01201171875,-155.625634765625...

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