[postgis-users] Area calculation oh two polygon that they are overlapping

Josh Livni josh at umbrellaconsulting.com
Thu Jan 10 07:29:10 PST 2008


Not sure if this is the recommended solution, but I sometimes do a 
buffer(geom,0) in this type of situation.

SELECT Area(ST_Buffer(GeomFromText('MultiPolygon( ((0 0,0 3,3 3,3 0,0 
0)),((1 1,1 4,4
4,4 1,1 1)))'),0))

 -Josh


olivier.amram at free.fr wrote:
> Hi,
>
> I'd like to compute the total area of polygon that intersects with another
> polygon
>
> Polygon(0 0,0 3,3 3,3 0,0 0)
> Polygon(1 1,4 1,4 4,1 4,1 1)
>
> The total area is 14 but I don't find a solution to compute this value.
>
> e.g. SELECT Area(GeomFromText('MultiPolygon( ((0 0,0 3,3 3,3 0,0 0)),((1 1,1 4,4
> 4,4 1,1 1)))')) --> 18
>
> Have you any idea ?
>
> Thank,
>
> Olivier.
>
> _______________________________________________
> 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