[postgis-users] spatial query (ST_Intersects)
shreyes shiv
shivshreyes at gmail.com
Tue May 3 05:11:44 PDT 2011
Dear all,
I have loaded two shape files into postgis database.
I am using the ST_Intersects(geom of shape file1, geom of shape file2)
command to see the features that interesects.
Now there are redundant entries created in the table.
I want to pick the unique tuple where the attribute "area" has the maximum
value.
for ex. the following is a outcome of doing the intersects operation on the
two tables.
plot_id area
--------------------------------
S01BAT009 23
S01BAT009 20
S01BAT009 19
S01BAA001 10
S01BAA001 12
S01BAA001 30
I want to select
plot_id area
-------------------------------
S01BAT009 23
S01BAA001 30
from the above table.
How do i write the query please help.
thank you
--
shreyes shiv
email: shivshreyes at gmail.com
phone: 9557975780
IIRS(Indian Institute of Remote Sensing)
No. 4, Kalidas Road, Dehradun-248001, Uttarakhand, India
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110503/4f5b8f99/attachment.html>
More information about the postgis-users
mailing list