How would I return a list of the latest events for a particular lat/lon region? More precisely, how would a return a result set with the greatest event times with polygons that don't intersect any other polygon in the result set?
Any help would be greatly appreciated, Dave
Are you using PostGIS? Assuming yes, try something like:
select * from theTable a cross join theTable b on not (a.lat_lon && b.lat_lon) order by event_time
Also try the postgis news group, there are people there with more experience with the postGIS functions.
Your two questions dont seem to be asking the same thing, though. One asks for a particular region. The second for a region that doesn't intersect with any other's. I went for the second, cross joining the table to itself, so every record with be compared to every other record, which is gonna be a huge number of comparisons. So it'll be slow.
-Andy
-- David Waddy Waddy & Colpitts Ltd. 99 Milky Way Colpitts Settlement, NB E4J 0B6 Canada tel: 506-372-4564 http://www.littleriver.ca