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

Nahum Castro pedro1_72 at yahoo.com
Tue Jul 11 10:04:47 PDT 2006


 --- 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 




More information about the postgis-users mailing list