[postgis-users] ST_Boundary(geometry) for polyon to line conversion?

Nicolas Ribot nicolas.ribot at gmail.com
Wed Apr 11 00:49:55 PDT 2012


> Hi,
>
> ST_Boundary(geometry)
>
> Is this the function I would use to convert a polygon to a polyline?
>
> yours,
>
>
> Rob

Hi,

Yes, but depends on the shape of the polygon. If it has holes,
st_boundary will return several linestring, for the exterior and for
each hole.
If you need only the exterior shape of the polygon, st_exteriorRing
may suit your needs better.

Nicolas



More information about the postgis-users mailing list