[postgis-users] Select largest polygon of a multipolygon ?

Ing. Carlos Eucario carlos.eucario at gmail.com
Tue Jul 11 07:10:28 PDT 2006


Yes,

select the_geom
from mgm2000
where area(the_geom) in
(
 select max(area(the_geom))
 from mgm2000
)

where mgm2000 is a polygon table..., and the_geom is the geometry column

-- see U

Carlos Eucario

2006/7/11, Arnaud Lesauvage <thewild at freesurf.fr>:
>
> Hi List !
>
> Is there a simple way to get the largest polygon (largest area) of
> a multipolygon geometry, just with an SQL query ?
>
> If not, I can write a simple perl function to do that, but if this
> function already existed that would be better.
>
> Thanks !
>
> --
> Aranud
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>



-- 


Carlos Eucario
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20060711/8fc9074f/attachment.html>


More information about the postgis-users mailing list