[postgis-users] How obtain the boundary between two polygon
Marc Jansen
jansen at terrestris.de
Thu Jan 21 12:45:39 PST 2010
Hi salas,
ST_Intersection should do the trick:
SELECT ST_AsText(
ST_Intersection(
'POLYGON((0 0, 2 0, 2 2, 0 2, 0 0))'::geometry,
'POLYGON((2 1, 2 4, 4 4, 4 1, 2 1))'::geometry
)
);
==> gives LINESTRING(2 1,2 2)
If you need a multi-geometry, use ST_Multi:
SELECT ST_AsText(
ST_Multi(
'LINESTRING(2 1,2 2)'::geometry
)
);
==> gives MULTILINESTRING((2 1,2 2))
Regards,
Marc
fsalasGeocuba schrieb:
> Hi,
>
> I'ts possible to obtain the boundary between two polygon as polyline ?
>
> thanks ,
>
> salas
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
More information about the postgis-users
mailing list