[postgis-users] Select largest polygon of a multipolygon ?
Stephen Woodbridge
woodbri at swoodbridge.com
Tue Jul 11 10:36:46 PDT 2006
Guys,
You are missing the problem. Arnaud is not trying to find the largest
polygon in a table. He is trying to find the largest polygon in a
multipolygon object. So the first step has to be to decompose the
multipolygon into an array of set of polygons and then to search for the
largest one.
-Steve
Nahum Castro wrote:
> --- Arnaud Lesauvage <thewild at freesurf.fr> escribió:
>
>> 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 !
>
> select the area, order by area desc and limit to 1
>
>
>
> --
> Nahum Castro
> Leon, Guanajuato, Mexico
> http://www.leon-linux.com
> e-mail: pedro1_72 [en] yahoo [punto] com
>
>
>
>
>
> ___________________________________________________________
> Do You Yahoo!?
> La mejor conexión a Internet y <b >2GB</b> extra a tu correo por $100 al mes. http://net.yahoo.com.mx
>
> _______________________________________________
> 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