Skip to main content
2 of 2
edited body; edited tags; edited title
Taras
  • 34.1k
  • 4
  • 73
  • 148

Converting from MultiPolygon to Polygon in PostGIS

I have a table in PostGIS, where the data is currently stored as a MultiPolygon. Each Multipolygon has only a single Polygon in it.

How do I query and get the containing Polygon, and not MultiPolygon? I am ok ignoring the Edge case where there are Multiple Polygons in the Multi-Polygon Geometry. All I need is the first or only Polygon in that Geometry.

Devdatta Tengshe
  • 41.6k
  • 35
  • 144
  • 263