Hi,
I am using Geonetwork server from svn branch 2.4.x and having this error
with the OGC CSW 2.0.2 test (http://cite.opengeospatial.org/teamengine/), I
appreciate any help:
Request:
Request d1e3414_1:
Method: POST
URL: http://128.183.164.19:80/geonetwork/srv/en/csw
Body:
<csw:GetRecords xmlns="http://www.occamlab.com/ctl"
xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
xmlns:ctl="http://www.occamlab.com/ctl"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dct="http://purl.org/dc/terms/"
xmlns:gml="http://www.opengis.net/gml"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:ows="http://www.opengis.net/ows"
xmlns:p="http://teamengine.sourceforge.net/parsers"
xmlns:parsers="http://www.occamlab.com/te/parsers"
xmlns:saxon="http://saxon.sf.net/"
xmlns:te="http://www.occamlab.com/te"
xmlns:tec="java:com.occamlab.te.TECore"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
resultType="results"
service="CSW"
version="2.0.2">
<csw:Query typeNames="csw:Record">
<csw:ElementName>dc:identifier</csw:ElementName>
<csw:ElementName>ows:BoundingBox</csw:ElementName>
<csw:Constraint version="1.1.0">
<ogc:Filter>
<ogc:BBOX>
<ogc:PropertyName>/ows:BoundingBox</ogc:PropertyName>
<gml:Envelope srsName="urn:x-ogc:def:crs:EPSG:6.11:4326">
<gml:lowerCorner>47.0 -4.5</gml:lowerCorner>
<gml:upperCorner>52.0 1.0</gml:upperCorner>
</gml:Envelope>
</ogc:BBOX>
</ogc:Filter>
</csw:Constraint>
</csw:Query>
</csw:GetRecords>
Response:
<ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/ows
http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd">
<ows:Exception exceptionCode="NoApplicableCode">
<ows:ExceptionText>Raised exception while searching metadata :
org.fao.geonet.csw.common.exceptions.NoApplicableCodeEx:
code=NoApplicableCode, locator=null, message=Error when parsing spatial
filter (version: 1.1.0):<ogc:Filter
xmlns:ogc="http://www.opengis.net/ogc"&gt;&\#xD;
<ogc:BBOX>
<ogc:PropertyName>/ows:BoundingBox</ogc:PropertyName>
<gml:Envelope xmlns:gml="http://www.opengis.net/gml"
srsName="urn:x-ogc:def:crs:EPSG:6.11:4326">
<gml:lowerCorner>47.0 -4.5</gml:lowerCorner>
<gml:upperCorner>52.0 1.0</gml:upperCorner>
</gml:Envelope>
</ogc:BBOX>
</ogc:Filter>. Error is: java.lang.RuntimeException: Parsing failed
for Envelope: java.lang.RuntimeException: Could not create crs:
urn:x-ogc:def:crs:EPSG:6.11:4326</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
Thanks,
Hoan-Vu Tran-Ho.
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/CSW-2-0-2-problem-with-GetRecords-when-attribute-srsName-in-gml-Envelope-tp5042222p5042222.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.
Copy in an epsg source from the geotools 2.5.1 release? The hsqldb one works: gt-epsg-hsql-2.5.1.jar and hsqldb-1.8.0.7.jar
Cheers,
Simon
hvtranho wrote:
Hi,
I am using Geonetwork server from svn branch 2.4.x and having this error
with the OGC CSW 2.0.2 test (http://cite.opengeospatial.org/teamengine/), I
appreciate any help:
Request:
Request d1e3414_1:
Method: POST
URL: http://128.183.164.19:80/geonetwork/srv/en/csw
Body: <csw:GetRecords xmlns="http://www.occamlab.com/ctl"
xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
xmlns:ctl="http://www.occamlab.com/ctl"
xmlns:dc="DCMI: DCMI Metadata Terms;
xmlns:dct="DCMI: DCMI Metadata Terms;
xmlns:gml="http://www.opengis.net/gml"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:ows="http://www.opengis.net/ows"
xmlns:p="http://teamengine.sourceforge.net/parsers"
xmlns:parsers="http://www.occamlab.com/te/parsers"
xmlns:saxon="http://saxon.sf.net/"
xmlns:te="http://www.occamlab.com/te"
xmlns:tec="java:com.occamlab.te.TECore"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
resultType="results"
service="CSW"
version="2.0.2">
<csw:Query typeNames="csw:Record">
<csw:ElementName>dc:identifier</csw:ElementName>
<csw:ElementName>ows:BoundingBox</csw:ElementName>
<csw:Constraint version="1.1.0">
<ogc:Filter>
<ogc:BBOX>
<ogc:PropertyName>/ows:BoundingBox</ogc:PropertyName>
<gml:Envelope srsName="urn:x-ogc:def:crs:EPSG:6.11:4326">
<gml:lowerCorner>47.0 -4.5</gml:lowerCorner>
<gml:upperCorner>52.0 1.0</gml:upperCorner>
</gml:Envelope>
</ogc:BBOX>
</ogc:Filter>
</csw:Constraint>
</csw:Query>
</csw:GetRecords>
Response:
<ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/ows
http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd">
<ows:Exception exceptionCode="NoApplicableCode">
<ows:ExceptionText>Raised exception while searching metadata :
org.fao.geonet.csw.common.exceptions.NoApplicableCodeEx:
code=NoApplicableCode, locator=null, message=Error when parsing spatial
filter (version: 1.1.0):<ogc:Filter
xmlns:ogc="http://www.opengis.net/ogc"&gt;&\#xD;
<ogc:BBOX>
<ogc:PropertyName>/ows:BoundingBox</ogc:PropertyName>
<gml:Envelope xmlns:gml="http://www.opengis.net/gml"
srsName="urn:x-ogc:def:crs:EPSG:6.11:4326">
<gml:lowerCorner>47.0 -4.5</gml:lowerCorner>
<gml:upperCorner>52.0 1.0</gml:upperCorner>
</gml:Envelope>
</ogc:BBOX>
</ogc:Filter>. Error is: java.lang.RuntimeException: Parsing failed
for Envelope: java.lang.RuntimeException: Could not create crs:
urn:x-ogc:def:crs:EPSG:6.11:4326</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
Thanks,
Hoan-Vu Tran-Ho.
Simon,
thanks for your help, the RuntimeException is gone. But the corresponding
test still failed because test result does not contain data records
expected.
Best Regards,
Hoan-Vu Tran-Ho
gcmd.gsfc.nasa.gov
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/CSW-2-0-2-problem-with-GetRecords-when-attribute-srsName-in-gml-Envelope-tp5042222p5070481.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.
hvtranho wrote:
Simon,
thanks for your help, the RuntimeException is gone. But the corresponding
test still failed because test result does not contain data records
expected.
Best Regards,
Hoan-Vu Tran-Ho
gcmd.gsfc.nasa.gov
Looks like that test is using lat/lon ordering (as correctly advised by the srs) when I think lon/lat ordering is expected eg. when the Envelope of the entire filter is calculated using the ExtractBoundsFilter visitor (see src/org/fao/geonet/kernel/search/spatial/OgcGenericFilters.java).
Cheers,
Simon
Actually this can be fixed it seems by using the GeoTools ReprojectingFilterVisitor on the Filter specified in the CSW query to reproject any geometry it contains to the desired long/lat ordering (WGS84) used by GeoNetwork.
This will also allow other spatial referencing systems to be used for geometries in the CSW Filter queries (eg. tested using coordinates in MGA Australia, Zone 55, EPSG:28355).
I've implemented this for BlueNetMEST and will commit it also for trunk 2.5.1. (May need to cache these reprojected queries if there is too much overhead?)
Cheers,
Simon
Simon Pigot wrote:
hvtranho wrote:
Simon,
thanks for your help, the RuntimeException is gone. But the corresponding
test still failed because test result does not contain data records
expected.
Best Regards,
Hoan-Vu Tran-Ho
gcmd.gsfc.nasa.gov
Looks like that test is using lat/lon ordering (as correctly advised by the srs) when I think lon/lat ordering is expected eg. when the Envelope of the entire filter is calculated using the ExtractBoundsFilter visitor (see src/org/fao/geonet/kernel/search/spatial/OgcGenericFilters.java).
Cheers,
Simon
------------------------------------------------------------------------------
_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
geonetwork-devel List Signup and Options
GeoNetwork OpenSource is maintained at GeoNetwork - Geographic Metadata Catalog download | SourceForge.net