<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><br>Hi George,<br><br>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:<br><br>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))'));"<br> st_area <br>---------<br> -0.5<br><br><br>but <br><br>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)))'));"<br> st_area <br>---------<br> 3.5<br><br><br>HTH,<br><br> Brent Wood<br><br><br>--- On <b>Sat, 8/18/12, george young <i><georgeryoung@gmail.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From:
george young <georgeryoung@gmail.com><br>Subject: [postgis-users] st_area yields negative value for multi-part polygon<br>To: postgis-users@postgis.refractions.net<br>Date: Saturday, August 18, 2012, 7:58 AM<br><br><div class="plainMail">PostgreSQL 9.1.4 on x86_64-unknown-linux-gnu, compiled by gcc (GCC)<br>4.4.4 20100630 (Red Hat 4.4.4-10), 64-bit<br>postgis-2.0.1, libgeos_c.so.1.7.5<br><br>gis=# SELECT st_area(ST_GeomFromText('POLYGON((-1 -1, 2 2, 0 1, -1<br>-1),(3 3, 5 5, 3 5, 3 3))'));<br> st_area<br>---------<br> -0.5<br><br>what does this mean? What is negative area?<br>In general, what are the semantics of polygons with more than one<br>sequence of vertexes?<br>_______________________________________________<br>postgis-users mailing list<br><a ymailto="mailto:postgis-users@postgis.refractions.net" href="/mc/compose?to=postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br><a
href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br></div></blockquote></td></tr></table>