adiwg / mdTranslator

Metadata translation tool built using Ruby
https://www.adiwg.org/mdTranslator/
The Unlicense
14 stars 12 forks source link

CSDGM Writer - Attribute Domain Value missing #378

Open hmaier-fws opened 2 months ago

hmaier-fws commented 2 months ago

When exporting to CSDGM the attribute domain values are not exported for an "Unrepresentable Domain". Export seems to function properly if a domain is associated with the attribute and for export to mdJSON and ISO 19110.

Steps to reproduce:

  1. Import a mdEditor recordset (e.g. CapeHatteras_NWI_mdEditor-valid.json)
  2. Translate to CSDGM (see output: CapeHatteras_translate)
  3. Validate the CSDGM file using the USGS Geospatial Metadata Validation Service (Version: mp 2.9.52)

The file fails validation with several "Attribute_Domain_Values is required in Attribute" errors.

Expected results

The CSDGM produced by the translator contains (lines 209-213):

<attr>
  <attrlabl>Acres</attrlabl>
  <attrdef>Area of polygonal feature that create polygon in acres (U.S.).</attrdef>
  <attrdefs>Esri</attrdefs>
</attr>

The output should contain the "Unrepresentable Domain" information (udom tag) in addition to the above. For example see fgdc_demo.xml (Lines 438-444).

The value for the "Unrepresentable Domain" should be the data type as represented in the mdJSON. For example:

<attr>
  <attrlabl>Acres</attrlabl>
  <attrdef>Area of polygonal feature that create polygon in acres (U.S.).</attrdef>
  <attrdefs>Esri</attrdefs>
  <attrdomv>
    <udom>dataType: float</udomv>
  </attrdomv>
</attr>