ERDDAP / erddap

ERDDAP is a scientific data server that gives users a simple, consistent way to download subsets of gridded and tabular scientific datasets in common file formats and make graphs and maps. ERDDAP is a Free and Open Source (Apache and Apache-like) Java Servlet from NOAA NMFS SWFSC Environmental Research Division (ERD).
Creative Commons Zero v1.0 Universal
84 stars 58 forks source link

ERDDAP ISO XML included invalid CI_OnLineFunctionCode codelist value 'mapDigital' #210

Open mwengren opened 9 hours ago

mwengren commented 9 hours ago

Describe the bug The current version of ERDDAP ISO XML output provided by ERDDAP uses an invalid codelist value mapDigital for the 'Make-a-graph' link.

This causes some links to not be rendered on metadata catalogs, including NOAA OneStop (currently unavailable due to Helene impacts).

To Reproduce Steps to reproduce the behavior:

  1. Example ISO XML output from ERDDAP (v 2.23) hosted by SECOORA can be found at: http://erddap.secoora.org/erddap/metadata/iso19115/xml/41076-chr60wave-19-nm-se-of-char_iso19115.xml, and is also available via the IOOS Catalog at: https://data.ioos.us/dataset/41076-chr60wave-19-nm-se-of-charleston-harbor-waves10, or in XML form at: https://data.ioos.us/harvest/object/4dc488f2-3125-49a7-a67d-2fba53573e26.

Example XML from the above dataset which uses 'mapDigital' value:

<gmd:MD_DigitalTransferOptions>
<gmd:onLine>
<gmd:CI_OnlineResource>
<gmd:linkage>
<gmd:URL>https://gliders.ioos.us/erddap/tabledap/sbu01-20220805T1532.graph</gmd:URL>
</gmd:linkage>
<gmd:protocol>
<gco:CharacterString>order</gco:CharacterString>
</gmd:protocol>
<gmd:name>
<gco:CharacterString>Make-A-Graph Form</gco:CharacterString>
</gmd:name>
<gmd:description>
<gco:CharacterString>ERDDAP's Make-A-Graph .html web page for this dataset. Create an image with a map or graph of a subset of the data.</gco:CharacterString>
</gmd:description>
<gmd:function>
<gmd:CI_OnLineFunctionCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_OnLineFunctionCode" codeListValue="mapDigital">mapDigital</gmd:CI_OnLineFunctionCode>
</gmd:function>
</gmd:CI_OnlineResource>
</gmd:onLine>
</gmd:MD_DigitalTransferOptions>

Expected behavior Code list values for CI_OnLineFunctionCode in ERDDAP ISO XML metadata should originate from the valid options (available from https://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_OnLineFunctionCode), including:

Screenshots

Server ERDDAP v 2.23 - https://erddap.secoora.org/erddap/index.html

Desktop (please complete the following information):

Additional context

I am not 100% clear on what the allowed values for CI_OnlineFunctionCode are, however tracing the ERDDAP metadata leads to this online codelist reference as a source:

The https://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_OnLineFunctionCode

The NCEI XML metadata handbook also includes an identical list for CI_OnlineFunctionCode allowed values:

https://www.ncei.noaa.gov/sites/default/files/2020-04/ISO%2019115-2%20Workbook_Part%20II%20Extentions%20for%20imagery%20and%20Gridded%20Data.pdf

ESIP resources seem to indicate more options are allowed

https://wiki.esipfed.org/ISO_19115_and_19115-2_CodeList_Dictionaries#CI_OnLineFunctionCode

Perhaps an ISO metadata expert will see this and help clarify what the proper allowed values are. In either case, however, mapDigital is invalid.

rmendels commented 8 hours ago

@mwengren Have you tested with version 2.24? I don't know that the problem isn't there but version 2.23 is not the current version. We really do encourage people to update to the current version not only because of bug fixes but also because of the need to make certain all libraries used do not contain known vulnerabilities.

mwengren commented 8 hours ago

Hi @rmendels, I used @ocefpaf's handy ERDDAP version table at https://github.com/ocefpaf/ERDDAP_VER_CHECK/blob/gh-pages/index.md, then went to PacIOOS' ERDDAP at: https://pae-paha.pacioos.hawaii.edu/erddap/index.html which is 2.24.

Here's a link to an example XML file from PacIOOS that shows the same issue:

https://pae-paha.pacioos.hawaii.edu/erddap/metadata/iso19115/xml/aco_acoustic_iso19115.xml

I think the ISO XML output in ERDDAP likely hasn't changed for some time. There may be other improvements that could be made in addition to fixing this issue.

Dataset licensing and NOAA guidance on standardized/default dataset licensing is one topic that comes to mind. Updating the default dataset license text for ERDDAP datasets that don't override it to match NOAA's requirements would be a good addition.