[GeoNetwork-users] Problem using Bounding box search in CSW from MapInfo 10.5

Hi

I am currently experiencing a problem with MapInfo's CSW search of
Geonetwork the problems seems to be related to the way MapInfo defines
the search bounding box (gml:envelope) in particular the
srsDimensions="2" part.

Here is what I'm getting in my Geonetwork logs

2010-07-15 12:12:35,074 INFO [jeeves.request] - HTML Request (from
192.168.66.116) : /geonetwork/srv/en/csw

2010-07-15 12:12:35,074 DEBUG [jeeves.request] - Method : POST

2010-07-15 12:12:35,074 DEBUG [jeeves.request] - Content type : text/xml

2010-07-15 12:12:35,074 DEBUG [jeeves.request] - Accept : null

2010-07-15 12:12:35,074 DEBUG [jeeves.request] - Session id is
dovt5sfhlz2y

2010-07-15 12:12:35,074 DEBUG [jeeves.request] - Session created for
client : 192.168.66.116

2010-07-15 12:12:35,074 INFO [jeeves.service] - Dispatching : csw

2010-07-15 12:12:35,074 DEBUG [jeeves.service] - -> parameters are :

<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
service="CSW" version="2.0.2" resultType="results"
outputSchema="http://www.isotc211.org/2005/gmd&quot; startPosition="1"
maxRecords="25">

  <csw:Query typeNames="csw:Record gmd:MD_Metadata">

    <csw:ElementSetName>full</csw:ElementSetName>

    <csw:Constraint version="1.1.0">

      <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc&quot;&gt;

        <ogc:BBOX>

          <ogc:PropertyName
xmlns:ows="http://www.opengis.net/ows&quot;&gt;ows:BoundingBox&lt;/ogc:PropertyName

          <gml:Envelope xmlns:gml="http://www.opengis.net/gml&quot;
srsName="epsg:4326" srsDimensions="2">

            <gml:lowerCorner>-39.6801 -64.0383</gml:lowerCorner>

            <gml:upperCorner>163.079 66.1983</gml:upperCorner>

          </gml:Envelope>

        </ogc:BBOX>

      </ogc:Filter>

    </csw:Constraint>

  </csw:Query>

</csw:GetRecords>

2010-07-15 12:12:35,074 INFO [jeeves.webapp.csw] - Received:

<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
service="CSW" version="2.0.2" resultType="results"
outputSchema="http://www.isotc211.org/2005/gmd&quot; startPosition="1"
maxRecords="25">

  <csw:Query typeNames="csw:Record gmd:MD_Metadata">

    <csw:ElementSetName>full</csw:ElementSetName>

    <csw:Constraint version="1.1.0">

      <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc&quot;&gt;

        <ogc:BBOX>

          <ogc:PropertyName
xmlns:ows="http://www.opengis.net/ows&quot;&gt;ows:BoundingBox&lt;/ogc:PropertyName

          <gml:Envelope xmlns:gml="http://www.opengis.net/gml&quot;
srsName="epsg:4326" srsDimensions="2">

            <gml:lowerCorner>-39.6801 -64.0383</gml:lowerCorner>

            <gml:upperCorner>163.079 66.1983</gml:upperCorner>

          </gml:Envelope>

        </ogc:BBOX>

      </ogc:Filter>

    </csw:Constraint>

  </csw:Query>

</csw:GetRecords>

2010-07-15 12:12:35,084 DEBUG [geonetwork.search] - Lucene Query:
_isTemplate:n

2010-07-15 12:12:35,084 DEBUG [geonetwork.search] - Lucene Query: +*:*
+_isTemplate:n

2010-07-15 12:12:35,084 DEBUG [geonetwork.search] - Sorting by :
[relevance,true]

2010-07-15 12:12:35,084 DEBUG [geonetwork.search] - Getting parser

2010-07-15 12:12:35,084 DEBUG [geonetwork.search] - Getting feature
source

2010-07-15 12:12:35,084 DEBUG [geonetwork.search] - Getting index

2010-07-15 12:12:35,084 DEBUG [geonetwork.search] - Creating filter

2010-07-15 12:12:35,084 DEBUG [geonetwork.search] - Filter string is :

<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc&quot;&gt;

  <ogc:BBOX>

    <ogc:PropertyName
xmlns:ows="http://www.opengis.net/ows&quot;&gt;ows:BoundingBox&lt;/ogc:PropertyName

    <gml:Envelope xmlns:gml="http://www.opengis.net/gml&quot;
srsName="epsg:4326" srsDimensions="2">

      <gml:lowerCorner>-39.6801 -64.0383</gml:lowerCorner>

      <gml:upperCorner>163.079 66.1983</gml:upperCorner>

    </gml:Envelope>

  </ogc:BBOX>

</ogc:Filter>

2010-07-15 12:12:35,084 DEBUG [geonetwork.search] - Parsing filter

2010-07-15 12:12:35,204 ERROR [geonetwork.search] - Errors occurred when
trying to parse a filter:

2010-07-15 12:12:35,204 ERROR [geonetwork.search] -
----------------------------------------------

2010-07-15 12:12:35,204 ERROR [geonetwork.search] -
org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute
'srsDimensions' is not allowed to appear in element 'gml:Envelope'.

2010-07-15 12:12:35,204 ERROR [geonetwork.search] -
----------------------------------------------

2010-07-15 12:12:35,204 DEBUG [geonetwork.search] - Reprojected Filter
is [ the_geom bbox POLYGON ((-64.0383 -39.6801, -64.0383 163.079,
66.1983 163.079, 66.1983 -39.6801, -64.0383 -39.6801)) ]

2010-07-15 12:12:35,204 DEBUG [geonetwork.search] - Filter Envelope is
ReferencedEnvelope[-64.0383 : 66.1983, -39.6801 : 163.079]

2010-07-15 12:12:35,204 DEBUG [geonetwork.search] - Setting up the TFC
with numHits 26

2010-07-15 12:12:35,214 INFO [jeeves.service] - -> dispatching to
output for : csw

2010-07-15 12:12:35,214 INFO [jeeves.service] - -> writing xml for
: csw

2010-07-15 12:12:35,214 DEBUG [jeeves.service] - Service xml is :

<csw:GetRecordsResponse xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2
http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd&quot;&gt;

  <csw:SearchStatus timestamp="2010-07-15T12:12:35" />

  <csw:SearchResults numberOfRecordsMatched="0"
numberOfRecordsReturned="0" elementSet="full" nextRecord="0" />

</csw:GetRecordsResponse>

2010-07-15 12:12:35,224 INFO [jeeves.service] - -> output ended for
: csw

2010-07-15 12:12:35,224 INFO [jeeves.service] - -> dispatch ended for
: csw

Now if I send a simple request like

2010-07-15 12:14:10,619 DEBUG [jeeves.service] - -> parameters are :

<GetRecords xmlns="http://www.opengis.net/cat/csw/2.0.2&quot;
xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:ows="http://www.opengis.net/ows&quot;
xmlns:dc="http://purl.org/dc/elements/1.1/&quot;
xmlns:dct="http://purl.org/dc/terms/&quot;
xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; service="CSW"
version="2.0.2" maxRecords="10" startPosition="1" resultType="results"
outputFormat="application/xml"
xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2
../../../csw/2.0.2/CSW-discovery.xsd">

  <Query typeNames="csw:Record">

    <ElementSetName typeNames="csw:Record">full</ElementSetName>

    <Constraint version="1.1.0">

      <ogc:Filter>

        <ogc:BBOX>

          <ogc:PropertyName>ows:BoundingBox</ogc:PropertyName>

          <gml:Envelope>

            <gml:lowerCorner>146.096191 -43.897892</gml:lowerCorner>

            <gml:upperCorner>148.73291 -42.326062</gml:upperCorner>

          </gml:Envelope>

        </ogc:BBOX>

      </ogc:Filter>

    </Constraint>

  </Query>

</GetRecords>

2010-07-15 12:14:10,619 INFO [jeeves.webapp.csw] - Received:

<GetRecords xmlns="http://www.opengis.net/cat/csw/2.0.2&quot;
xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:ows="http://www.opengis.net/ows&quot;
xmlns:dc="http://purl.org/dc/elements/1.1/&quot;
xmlns:dct="http://purl.org/dc/terms/&quot;
xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; service="CSW"
version="2.0.2" maxRecords="10" startPosition="1" resultType="results"
outputFormat="application/xml"
xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2
../../../csw/2.0.2/CSW-discovery.xsd">

  <Query typeNames="csw:Record">

    <ElementSetName typeNames="csw:Record">full</ElementSetName>

    <Constraint version="1.1.0">

      <ogc:Filter>

        <ogc:BBOX>

          <ogc:PropertyName>ows:BoundingBox</ogc:PropertyName>

          <gml:Envelope>

            <gml:lowerCorner>146.096191 -43.897892</gml:lowerCorner>

            <gml:upperCorner>148.73291 -42.326062</gml:upperCorner>

          </gml:Envelope>

        </ogc:BBOX>

      </ogc:Filter>

    </Constraint>

  </Query>

</GetRecords>

Geonetwork gives me the correct results that I would expect

Has anyone come across this problem or know how I might fix it?

Duri Bradshaw

GIS Officer

Insight GIS

www.insightgis.com.au <http://www.insightgis.com.au/&gt;

Hello Duri,

2010-07-15 12:12:35,204 ERROR [geonetwork.search] -
org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute
'srsDimensions' is not allowed to appear in element 'gml:Envelope'.

The optional attribute is "srsDimension" and not "srsDimensions" ....
http://xml.fmi.fi/namespace/meteorology/conceptual-model/meteorological-objects/2009/03/26/docindex19.html

Cheers,

Mathieu
<http://xml.fmi.fi/namespace/meteorology/conceptual-model/meteorological-objects/2009/03/26/docindex19.html&gt;