geonetwork / core-geonetwork

GeoNetwork is a catalog application to manage spatially referenced resources. It provides powerful metadata editing and search functions as well as an interactive web map viewer. It is currently used in numerous Spatial Data Infrastructure initiatives across the world.
http://geonetwork-opensource.org/
GNU General Public License v2.0
428 stars 489 forks source link

failing alternative CRS definition and axis order in CSW search #5319

Closed pvgenuchten closed 3 years ago

pvgenuchten commented 3 years ago

The analyses by @agiudiceandrea in https://github.com/qgis/QGIS/pull/40785#issuecomment-753383352 seems to indicatate that mostly geonetwork implementation fail for the issue mentioned there

In CSW search, geonetwork seems to only cover the cases no srsName bbox lon-lat and EPSG::4326 bbox lat-lon, but fails on OGC:1.3:CRS84 bbox lon-lat and EPSG::4326 bbox lon-lat

pvgenuchten commented 3 years ago

see also https://github.com/qgis/QGIS/issues/40778 seems the error is caused by geotools parsing the filter

https://github.com/geonetwork/core-geonetwork/blob/f062ee1753db31d32f832aeb1464af000feec12a/core/src/main/java/org/fao/geonet/kernel/search/spatial/OgcGenericFilters.java#L116-L132

duplicates #4072, which seems resolved by upgrading to geotools 23 (arriving in upcoming 3.12 release)

agiudiceandrea commented 3 years ago

Hi @pvgenuchten, thank you for looking at the srsName issue! What about the axis order issue?

The maintainer of the MetaSearch Catalog Client QGIS core plugin has chosen to workaround in the meantime the srsName issue substituting the urn:ogc:def:crs:OGC:1.3:CRS84 srsName with the urn:ogc:def:crs:EPSG::4326 srsName and switching the bbox axis order accordingly from lon-lat to lat-lon in the GetRecords requests.

Anyway, while the srsName issue was fixed for 9 CSW, there are 4 CSW servers [1] that don't give a correct result using urn:ogc:def:crs:EPSG::4326, because it seems they incorrectly interpret the bbox axis order as lon-lat, although the correct axis order for urn:ogc:def:crs:EPSG::4326 is lat-lon.

Do you think these CSW servers are also using GeoNetwork?

[1] Italy National CSW http://www.pcn.minambiente.it/geoportal/csw Italy RNDT https://geodati.gov.it/RNDT/csw Norway National CSW http://www.geonorge.no/geonetwork/srv/no/csw Spain CNIG http://www.ign.es/csw-inspire/srv/spa/csw

pvgenuchten commented 3 years ago

Hi Andrea, consider that from the 4 instances you mention, 2 are not GeoNetwork and 2 (norway and spain) are quite old versions of geonetwork. I would strongly advice them to update to a more recent version. I will try the issue against latest master version to verify any irregularities in this scope.

Thank you for flagging this aspect, regards Paul

On 11 Jan 2021, at 18:10, Andrea Giudiceandrea notifications@github.com wrote:

Hi @pvgenuchten https://github.com/pvgenuchten, thank you for looking at the srsName issue! What about the axis order issue?

The maintainer of the MetaSearch Catalog Client QGIS core plugin has chosen to workaround in the meantime the srsName issue substituting the urn:ogc:def:crs:OGC:1.3:CRS84 srsName with the urn:ogc:def:crs:EPSG::4326 srsName and switching the bbox axis order accordingly from lon-lat to lat-lon in the GetRecords requests.

Anyway, while the srsName issue was fixed for 9 CSW, there are 4 CSW servers [1] that don't give a correct result using urn:ogc:def:crs:EPSG::4326, because it seems they incorrectly interpret the bbox axis order as lon-lat, although the correct axis order for urn:ogc:def:crs:EPSG::4326 is lat-lon.

Do you think these CSW servers are also using GeoNetwork?

[1] Italy National CSW http://www.pcn.minambiente.it/geoportal/csw http://www.pcn.minambiente.it/geoportal/csw Italy RNDT https://geodati.gov.it/RNDT/csw https://geodati.gov.it/RNDT/csw Norway National CSW http://www.geonorge.no/geonetwork/srv/no/csw http://www.geonorge.no/geonetwork/srv/no/csw Spain CNIG http://www.ign.es/csw-inspire/srv/spa/csw http://www.ign.es/csw-inspire/srv/spa/csw — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/geonetwork/core-geonetwork/issues/5319#issuecomment-758093300, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACJGNLHUOSCNLGQWV56PETSZMWIHANCNFSM4V2CW7JQ.