[postgis-users] Polygon from MultiPolygon

Leknín Řepánek godzilalalala at gmail.com
Wed Feb 17 12:12:37 PST 2016


Shapefile don`t make difference between multi/single part geometries.

In postgis you can dissolve multipart geometries using ST_Dump.
ST_Dump records record vith geom and path in collection. You should use
somethink like this

SELECT (ST_Dump(geom)).* FROM table

Or ST_GeometryN to obtain n-th geometry from collection/multipart.

ST_GeometryN(geom, 1) returns first geometry of collection/multipart
geometry.

To obtain Exterior Ring of polygon you could use ST_ExterioirRing

for obtain boundary is function ST_Boundary.

On Wed, Feb 17, 2016 at 07:30:26PM +0000, Mustafa Elbehery wrote:
> Hi Folks, 
> 
> I have create a shapeFile using Vector layer in QGIS .. I have chosen polygon 
> type, but the shapeFile contains Multipolygon ..
> 
> I am interested only on the Boundary or the outer polygon .. How to capture
> this from Multipolygon ?!!
> 
> Regards.

> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/postgis-users



More information about the postgis-users mailing list