[postgis-users] GIS functions

El Nico nicky666 at gmail.com
Thu May 5 13:43:15 PDT 2005


> >  2) Given two polygons that touch or maybe overlap somewhat, I want to find
> > the polygon representing the perimeter of the shape as if both polygons were
> > welded together.
> >
> 
> Just make the intersection of the 2 polygons. If polygons don't touch,
> the intersection will be empty, otherwise, the result will depend on
> the shape of the 2 input polygons:
> 

Oooops !!
It seems i'm a little bit tired tonight !!
To get what you want, use the union() function, not intersection, of course:

select asText(geomUnion(
 polygonFromText('POLYGON((1 1, 4 1, 3 5, 1 1))'),
 polygonFromText('POLYGON((1 3, 6 3, 1 7, 1 3))')
));

Sorry,
Nico



More information about the postgis-users mailing list