Spatial search via OGC CSW

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Spatial search via OGC CSW

Виталий Ерёменко
Hello. I'm having problems when I try to send a GET request using the CSW
interface. If I use a spatial filter, GetRecords request returns an empty
result, and the following information appears in the logs:

=================================
Start log
=================================

2017-07-17 18:22:43,034 DEBUG [geonetwork.csw] - Received CQL:
Date > '2000-01-01T00:00:00Z' and Date < '2017-07-16T14:00:00Z' and
(CROSSES(the_geom, POLYGON((105.2246 17.0453, 105.2246 56.0162, 183.9746
56.0162, 183.9746 17.0453, 105.2246 17.0453))))
2017-07-17 18:22:43,045 DEBUG [geonetwork.csw] - Transformed CQL gives the
following filter:
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc" xmlns:xs="
http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml">
  <ogc:And>
    <ogc:Crosses>
      [ the_geom crosses POLYGON ((105.2246 17.0453, 105.2246 56.0162,
183.9746 56.0162, 183.9746 17.0453, 105.2246 17.0453)) ]
      <ogc:PropertyName>the_geom</ogc:PropertyName>
      <gml:Polygon srsDimension="2">
        <gml:exterior>
          <gml:LinearRing srsDimension="2">
            <gml:posList>105.2246 17.0453 105.2246 56.0162 183.9746 56.0162
183.9746 17.0453 105.2246 17.0453</gml:posList>
          </gml:LinearRing>
        </gml:exterior>
      </gml:Polygon>
    </ogc:Crosses>
    <ogc:And>
      <ogc:PropertyIsGreaterThan matchCase="true">
        <ogc:PropertyName>Date</ogc:PropertyName>
        <ogc:Literal>2000-01-01T00:00:00Z</ogc:Literal>
      </ogc:PropertyIsGreaterThan>
      <ogc:PropertyIsLessThan matchCase="false">
        <ogc:PropertyName>Date</ogc:PropertyName>
        <ogc:Literal>2017-07-16T14:00:00Z</ogc:Literal>
      </ogc:PropertyIsLessThan>
    </ogc:And>
  </ogc:And>
</ogc:Filter>

=================================

2017-07-17 18:22:43,050 DEBUG [geonetwork.search] - Parsing filter
2017-07-17 18:22:43,103 ERROR [geonetwork.search] - Errors occurred when
trying to parse a filter:
2017-07-17 18:22:43,103 ERROR [geonetwork.search] -
----------------------------------------------
2017-07-17 18:22:43,103 ERROR [geonetwork.search] -
org.xml.sax.SAXParseException; lineNumber: 13; columnNumber: 19;
cvc-complex-type.2.3: Element 'ogc:Crosses' cannot have character
[children], because the type's content type is element-only.
2017-07-17 18:22:43,103 ERROR [geonetwork.search] -
----------------------------------------------
2017-07-17 18:22:43,103 DEBUG [geonetwork.search] - Reprojected Filter is [
the_geom crosses POLYGON ((105.2246 17.0453, 105.2246 56.0162, 183.9746
56.0162, 183.9746 17.0453, 105.2246 17.0453)) ]
2017-07-17 18:22:43,103 DEBUG [geonetwork.search] - Filter Envelope is
ReferencedEnvelope[105.2246 : 183.9746, 17.0453 : 56.0162]
2017-07-17 18:22:43,104 DEBUG [geonetwork.search] - Adjusted within Filter
is [ the_geom crosses POLYGON ((105.2246 17.0453, 105.2246 56.0162,
183.9746 56.0162, 183.9746 17.0453, 105.2246 17.0453)) ]

=================================
End log
=================================

I can not understand, why the filter contains this text string after
<ogc:Crosses>: [ the_geom crosses POLYGON ((105.2246 17.0453, 105.2246
56.0162, 183.9746 56.0162, 183.9746 17.0453, 105.2246 17.0453)) ]
If I use search by date, then everything works fine. I used different
versions of GeoNetwork and each time I got the same result.

Example of request:

http://localhost:8080/geonetwork/srv/eng/csw?OUTPUTSCHEMA=http://www.
isotc211.org/2005/gmd&STARTPOSITION=1&MAXRECORDS=10&
REQUEST=GetRecords&RESULTTYPE=results&SORTBY=Date:A&VERSION=
2.0.2&TYPENAMES=gmd:MD_Metadata&ELEMENTSETNAME=full&SERVICE=CSW&
CONSTRAINTLANGUAGE=CQL_TEXT&CONSTRAINT_LANGUAGE_VERSION=1.
1.0&CONSTRAINT=Date > '2000-01-01T00:00:00Z' and Date <
'2017-07-16T14:00:00Z' and (CROSSES(the_geom, POLYGON((105.2246 17.0453,
105.2246 56.0162, 183.9746 56.0162, 183.9746 17.0453, 105.2246 17.0453))))

Thank you in advance.

=============
Best regards,
Vitaliy Eremenko.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Loading...