Bug #1718
closedspatial search does not work
0%
Description
Spatial search is not working in metacat. This is probably because of casting
problems, where the nodedata column is being cast to a number to do the <
comparison. Looking at the metadata, it appears that the LAT/LONG values are
sometimes empty, and sometimes have leading spaces. These will not cast
correctly to numeric values.
The simplest fix is to simply eliminate all non-numeric values before doing the
comparisons.
A more complex (and possibly better) approach is to have separate nodevalue
tables for each data type we need to treat differently (e.g., String, Numeric,
Date).
To see some of the offending values in the data, try a SQL command like this:
select nodeid, nodedata from xml_nodes
where nodetype like 'TEXT'
and nodedata like ' %'
and parentnodeid in
(select nodeid from xml_nodes
where nodetype like 'ELEMENT'
and nodename IN ('eastBoundingCoordinate', 'westBoundingCoordinate',
'northBoundingCoordinate', 'southBoundingCoordinate'))
We really need for query performance to be improved for these more complex
searches, so we need to make some design decisions about the overall performace
issues.
Related issues