spatial search does not work
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
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,
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',
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
#1 Updated by Saurabh Garg about 17 years ago
From bug 1703:
the spatial bounding box search dialog in morpho does not return any results
even when it should.
Also: The labels on the lat/long text boxes do not match up with the labels on
the xslt stylesheets for the web site. on the web site, the values are labeled
with directions (e.g. 'west') but then use negative values. the labels in
morpho just have a directional indicator but do not use negative values.
#6 Updated by Saurabh Garg about 17 years ago
Matt, I tried running it again and it runs fine for me.
Did you test against my metacat install? My machine is no longer running the
latest code because I was step by step testing the code that I have changed and
doing cvs checkins. So you can expect it to be slow.
If you didnt receive any results for a geographic query and you used Morpho to
run a geographic query, you might want to check if the query had
in it. Almost all documents on my machine are eml-2.0.1