Actions
Bug #2503
closedMetacat Servlet action=spatial_query returns incorrect results
Start date:
07/31/2006
Due date:
% Done:
0%
Estimated time:
Bugzilla-Id:
2503
Description
It appears that the metacat spatial query (metacat?action=spatial_query) does not return correct results. Based on a few test cases, it appears that only spatial queries which intersect the north-west corner of the geographic coverage return a correct result. This indicates a rather serious error in the spatial intersection logic.
Updated by Matthew Perry over 18 years ago
Test cases can be found at http://pmark.msi.ucsb.edu/spatial_query_bug.pdf
Updated by Matthew Perry over 18 years ago
Fixed:
1) handleSpatialQuery called createSpatialquery w/ parameters in the wrong order
2) createSpatialQuery's logic was wrong; changed to match the logic specified in AdvancedSearch.java:
/*
* Else, if the user does not select the boundaryContained checkbox, use the
* following logical expression. N, S, E, and W are the boundaries of the
* bounding box, while N', S', E', and W' are the boundaries specified in a
* given EML document:
* (N' > S) && (S' < N) && (E' > W) && (W' < E)
*/
Actions