[postgis-users] species diversity query....

Horacio Samaniego horacio.samaniego at gmail.com
Wed Sep 9 06:34:25 PDT 2009


Hi, 
I've been trying to devise a way to make this simple query, with no
success. Any help will be appreciated.

I have a table with multipoligons and need to generate a unique poligon
with the count of polys. To be specific, I'm looking to generate a layer
with species diversity based on the count of individual species
distribution stored in a table as multipoligons.

I have been trying


SELECT count(DISTINCT id),the_geom into BIODIVERSITY FROM pigs WHERE
the_geom && the_geom GROUP BY the_geom


however, this obviously doesn't work...

any hint from experiences queriers would be appreciated!!






More information about the postgis-users mailing list