[GeoNetwork-devel] CSW spatial queries and axis order

Hi

I have a question about coordinate order axis in CSW so if you know:

One of the INSPIRE tests has this filter in GetRecords:

ogc:Intersects
ogc:PropertyNameapiso:BoundingBox</ogc:PropertyName>
<gml:Envelope srsName=“urn:ogc:def:crs:EPSG:7.4:4326”>
gml:lowerCorner8.10 50.00</gml:lowerCorner>
gml:upperCorner8.50 51.00</gml:upperCorner>
</gml:Envelope>
</ogc:Intersects>

The metadata to retrieve has this:

gmd:extent
gmd:EX_Extent
gmd:geographicElement
gmd:EX_GeographicBoundingBox
gmd:westBoundLongitude
gco:Decimal8.11</gco:Decimal>
</gmd:westBoundLongitude>
gmd:southBoundLatitude
gco:Decimal49.97</gco:Decimal>
</gmd:southBoundLatitude>
gmd:eastBoundLongitude
gco:Decimal8.38</gco:Decimal>
</gmd:eastBoundLongitude>
gmd:northBoundLatitude
gco:Decimal50.16</gco:Decimal>
</gmd:northBoundLatitude>
</gmd:EX_GeographicBoundingBox>
</gmd:geographicElement>
</gmd:EX_Extent>
</gmd:extent>

The filter sends lon/lat order and doesn’t retrieve anything. Changing filter to lat/lon works.

ogc:Intersects
ogc:PropertyNameapiso:BoundingBox</ogc:PropertyName>
<gml:Envelope srsName=“urn:ogc:def:crs:EPSG:7.4:4326”>
gml:lowerCorner50.00 8.10</gml:lowerCorner>
gml:upperCorner51.00 8.50</gml:upperCorner>
</gml:Envelope>
</ogc:Intersects>

Also the original filter if removed srsName works ok using lon/lat.

The srs urn:ogc:def:crs:EPSG:7.4:4326 seem defines axis order as lat/lon, so that should be the reason that makes it work as GeoNetwork uses Geotools and it uses srs axis order by default.

I didn’t find anything in CSW spec about axis order, so in this case the srs axis order should be used I think?

In that case the INSPIRE test seem incorrect? or we should force in geotools to use always lon/lat?

Thanks for feedback.

Regards,
Jose García


GeoCat Bridge for ArcGIS allows instant publishing of data and metadata on GeoServer and GeoNetwork. Visit http://geocat.net for details.


Jose García
GeoCat bv
Veenderweg 13
6721 WD Bennekom
The Netherlands
http://GeoCat.net

There is a system property that can be set to force geotools to use lat/long vs lon/lat. by default it uses lat/long. In geocat I often force the use of latlong because I have found that it is the more common configuration.

···

On Thu, Dec 13, 2012 at 9:36 AM, Jose Garcia <jose.garcia@anonymised.com> wrote:

Hi

I have a question about coordinate order axis in CSW so if you know:

One of the INSPIRE tests has this filter in GetRecords:

ogc:Intersects
ogc:PropertyNameapiso:BoundingBox</ogc:PropertyName>
<gml:Envelope srsName=“urn:ogc:def:crs:EPSG:7.4:4326”>
gml:lowerCorner8.10 50.00</gml:lowerCorner>
gml:upperCorner8.50 51.00</gml:upperCorner>
</gml:Envelope>
</ogc:Intersects>

The metadata to retrieve has this:

gmd:extent
gmd:EX_Extent
gmd:geographicElement
gmd:EX_GeographicBoundingBox
gmd:westBoundLongitude
gco:Decimal8.11</gco:Decimal>
</gmd:westBoundLongitude>
gmd:southBoundLatitude
gco:Decimal49.97</gco:Decimal>
</gmd:southBoundLatitude>
gmd:eastBoundLongitude
gco:Decimal8.38</gco:Decimal>
</gmd:eastBoundLongitude>
gmd:northBoundLatitude
gco:Decimal50.16</gco:Decimal>
</gmd:northBoundLatitude>
</gmd:EX_GeographicBoundingBox>
</gmd:geographicElement>
</gmd:EX_Extent>
</gmd:extent>

The filter sends lon/lat order and doesn’t retrieve anything. Changing filter to lat/lon works.

ogc:Intersects
ogc:PropertyNameapiso:BoundingBox</ogc:PropertyName>
<gml:Envelope srsName=“urn:ogc:def:crs:EPSG:7.4:4326”>
gml:lowerCorner50.00 8.10</gml:lowerCorner>
gml:upperCorner51.00 8.50</gml:upperCorner>
</gml:Envelope>
</ogc:Intersects>

Also the original filter if removed srsName works ok using lon/lat.

The srs urn:ogc:def:crs:EPSG:7.4:4326 seem defines axis order as lat/lon, so that should be the reason that makes it work as GeoNetwork uses Geotools and it uses srs axis order by default.

I didn’t find anything in CSW spec about axis order, so in this case the srs axis order should be used I think?

In that case the INSPIRE test seem incorrect? or we should force in geotools to use always lon/lat?

Thanks for feedback.

Regards,
Jose García


GeoCat Bridge for ArcGIS allows instant publishing of data and metadata on GeoServer and GeoNetwork. Visit http://geocat.net for details.


Jose García
GeoCat bv
Veenderweg 13
6721 WD Bennekom
The Netherlands
http://GeoCat.net


LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d


GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

Hi Jesse

I know, but no clear if CSW spec or maybe the Filter spec mandates something about the order or we can force in GeoNetwork to use always specific order (seem at least in INSPIRE tests they use lon/lat) and be compliant with specs?

Regards,
Jose García

On Thu, Dec 13, 2012 at 9:48 AM, Jesse Eichar <jesse.eichar@anonymised.com> wrote:

There is a system pro


GeoCat Bridge for ArcGIS allows instant publishing of data and metadata on GeoServer and GeoNetwork. Visit http://geocat.net for details.


Jose García
GeoCat bv
Veenderweg 13
6721 WD Bennekom
The Netherlands
http://GeoCat.net

fwiw, here is how pycsw interprets this issue (after much frustration!) to comply

if srsName is specified [1]
- process the Crs with OWSLib [2]. This logic handles all the CRS/SRS notations/formats
else
- assume 4326 with an axis order of lat/lon

..Tom

[1] https://github.com/geopython/pycsw/blob/master/pycsw/gml.py#L61
[2] https://github.com/geopython/OWSLib/blob/master/owslib/crs.py#L1720

From: Jose Garcia [mailto:jose.garcia@…437…]
Sent: Thursday, December 13, 2012 03:57
To: Jesse Eichar
Cc: Devel geonetwork-devel@lists.sourceforge.net
Subject: Re: [GeoNetwork-devel] CSW spatial queries and axis order

Hi Jesse

I know, but no clear if CSW spec or maybe the Filter spec mandates something about the order or we can force in GeoNetwork to use always specific order (seem at least in INSPIRE tests they use lon/lat) and be compliant with specs?

Regards,
Jose García

On Thu, Dec 13, 2012 at 9:48 AM, Jesse Eichar <jesse.eichar@...189...> wrote:
There is a system pro

--
GeoCat Bridge for ArcGIS allows instant publishing of data and metadata on GeoServer and GeoNetwork. Visit http://geocat.net for details.
_________________________
Jose García
GeoCat bv
Veenderweg 13
6721 WD Bennekom
The Netherlands
http://GeoCat.net

On Thu, Dec 13, 2012 at 2:16 PM, Kralidis,Tom [Ontario] <Tom.Kralidis@…61…> wrote:

fwiw, here is how pycsw interprets this issue (after much frustration!) to comply

if srsName is specified [1]

  • process the Crs with OWSLib [2]. This logic handles all the CRS/SRS notations/formats
    else
  • assume 4326 with an axis order of lat/lon

Similar choice for the GeoServer CSW module, though we don’t have white/black lists like the above,
we just use the EPSG default order unless the EPSG:xyws notation is in use, in which
case we force east/north order. And of course we assume lat/lon order if not specified, since
the returned records use the urn notation for the bboxes (as such, it’s implied that the native
order is that one, given that CSW has no reprojection abilities).

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


Hi guys

Thanks a lot for the feedback. I’ll check in coming days to update CSW implementation in GeoNetwork.

Regards,
Jose García

On Thu, Dec 13, 2012 at 2:31 PM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Thu, Dec 13, 2012 at 2:16 PM, Kralidis,Tom [Ontario] <Tom.Kralidis@anonymised.com> wrote:

fwiw, here is how pycsw interprets this issue (after much frustration!) to comply

if srsName is specified [1]

  • process the Crs with OWSLib [2]. This logic handles all the CRS/SRS notations/formats
    else
  • assume 4326 with an axis order of lat/lon

Similar choice for the GeoServer CSW module, though we don’t have white/black lists like the above,
we just use the EPSG default order unless the EPSG:xyws notation is in use, in which
case we force east/north order. And of course we assume lat/lon order if not specified, since
the returned records use the urn notation for the bboxes (as such, it’s implied that the native
order is that one, given that CSW has no reprojection abilities).

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it



GeoCat Bridge for ArcGIS allows instant publishing of data and metadata on GeoServer and GeoNetwork. Visit http://geocat.net for details.


Jose García
GeoCat bv
Veenderweg 13
6721 WD Bennekom
The Netherlands
http://GeoCat.net