Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 2023.01.xx] #9030 improve metadata display interoperability with mapserver/mapproxy (#7865) #9059

Merged

Conversation

allyoucanmap
Copy link
Contributor

Description

Rather small PR but fixing many different bugs in the original implementation in #5190 (which was probably only tested against geoserver), cf georchestra/mapstore2-georchestra#300

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Bugfix
  • Feature

Issue

What is the current behavior?

georchestra/mapstore2-georchestra#300

What is the new behavior?

with this (and #7851), i'm able to display metadatas (provided CORS is properly configured in mapstore and geonetwork, still working on that on my production setup) from various geonetworks via metadataUrl entries from GetCapabilities documents returned https://wms.craig.fr/ortho (mapserver), https://tiles.craig.fr/ortho/service (mapproxy, multiple layers) and https://tiles.craig.fr/pci/service (mapproxy, one layer) - all those 3 were previously failing with various different problems described in the issue.

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • Yes, and I documented them in migration notes
  • No

loading metadata pointed at by geoserver getcapabilities should still work.

Other useful information

locally i have this diff to web/client/epics/catalog.js for printing exceptions, dunno if acceptable:

@@ -408,7 +408,8 @@ export default (API) => ({
                     .startWith(
                         showLayerMetadata({}, true)
                     )
-                    .catch(() => {
+                    .catch((e) => {
+                        console.log(e);
                         return Rx.Observable.of(error({
                             title: "notification.warning",
                             message: "toc.layerMetadata.notification.warnigGetMetadataRecordById",

to be probably discussed (feedback from developers more than welcome):

  • i havent added tests because i dont have the setup to run them and i wouldnt know where to start
  • dunno if reusing removeWorkspace from an epic is a good idea, maybe the function should be moved elsewhere ?
  • dunno if web/client/utils/ogc/ is the right directory for the mapserver schema
  • i've relaxed the iso19115:2003 type being hardcoded to also accept TC211, because even if the WMS 1.3.0 spec says:
The “type” attribute indicates the standard to which the metadata complies.
Two “type” attribute values are defined by this International Standard: 
 - the value “ISO 19115:2003” refers to ISO 19115:2003
 - the value “FGDC:1998” refers to FGDC-STD-001-1998

it also says An information community may define meanings for other “type” attribute values. , and mapserver hardcodes/defaults to TC211 in its generated GetMetadata links, cf https://github.com/MapServer/MapServer/blob/main/mapmetadata.c#L928 and https://mapserver.org/development/rfc/ms-rfc-82.html - that's also one of the values pushed by geonetwork to geoserver, cf https://github.com/georchestra/geonetwork/blob/georchestra-gn4-4.x/services/src/main/java/org/fao/geonet/api/mapservers/GeoServerRest.java#L573 (im trying to get that fixed cf georchestra/geonetwork#197)

…osolutions-it#7865)


Co-authored-by: allyoucanmap <stefano.bovio@geosolutionsgroup.com>
@tdipisa tdipisa merged commit aa3619d into geosolutions-it:2023.01.xx Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MS Fails to display metadata links from !geoserver
3 participants