Hi George, That is not a multi-part polygon (multipolygon). It is a polygon with a hole, & the hole lies outside the polygon boundary so it is going to give weird results. I'm guessing that what you actually mean to do is not:
psql -d test -c "SELECT st_area(ST_GeomFromText('POLYGON((-1 -1, 2 2, 0 1, -1 -1),(3 3, 5 5, 3 5, 3 3))'));" st_area --------- -0.5 but psql -d test -c "SELECT st_area(ST_GeomFromText('MULTIPOLYGON(((-1 -1, 2 2, 0 1, -1 -1)),((3 3, 5 5, 3 5, 3 3)))'));" st_area --------- 3.5 HTH, Brent Wood --- On Sat, 8/18/12, george young <georgeryo...@gmail.com> wrote: From: george young <georgeryo...@gmail.com> Subject: [postgis-users] st_area yields negative value for multi-part polygon To: postgis-users@postgis.refractions.net Date: Saturday, August 18, 2012, 7:58 AM PostgreSQL 9.1.4 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.4 20100630 (Red Hat 4.4.4-10), 64-bit postgis-2.0.1, libgeos_c.so.1.7.5 gis=# SELECT st_area(ST_GeomFromText('POLYGON((-1 -1, 2 2, 0 1, -1 -1),(3 3, 5 5, 3 5, 3 3))')); st_area --------- -0.5 what does this mean? What is negative area? In general, what are the semantics of polygons with more than one sequence of vertexes? _______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users