Spatial query class to use geotools against the spatial cache
Currently the spatial query is run with a standard metacat squery. Besides being inefficient, it is also inaccurate since it doesn't take into account some fundamental quirks in spatial relationships (the international dateline, multiple polygons representing the same feature, odd shaped polygons or holes).
The idea would be to write a class that, given a spatial query (bbox or point) would use geotools to query the actual spatial cache and return a list of matching docids.
#1 Updated by Matthew Perry about 14 years ago
Added a edu.ucsb.nceas.metacat.spatial.SpatialQuery class to handle this. Given a spatial query (4 bounding cooordinates), it will return a Vector of matching docids. This is accomplished by using geotools to filter the spatial cache (both the polygon and point layers). This process is extremely quick. HOWEVER....
The MetacatServlet (action=spatial) currently takes this list of docids, transforms it into an squery using DocumentIdQuery and passes it to the squery handler. This is painfully slow since it is generating as many queryterms as there are matching docids. The current technique for mapping an squery to a sql query means there will be that many subselects as well.
This performance issue is beyond the scope of this bug, however, so we'll call this one closed.