Select to view content in your preferred language

ArcGIS Pro Metadata - FGDC CSDGM Standards - Enumerated Domain

481
2
09-20-2023 10:50 AM
Labels (1)
Kathleen_Crombez
Occasional Contributor III

I am working on a python script that pulls the domain and subtype information from a feature class (or table) and uses that information to update the attribute and entity portion of the metadata.

We are using the FGDC CSDGM standards.

While testing my code I would manually make edits to a test dataset for validation and export the xml files to view the schema changes.

In the ArcGIS Pro attribute editor this is found under Resource > Fields > Entity and Attribute Details

When I add multiple enumerated domain values to an attribute a validation error pops up “at least one type of attribute domain is required.” And I get a red X on the Fields tab.

Kathleen_Crombez_0-1695232198386.png

 

Kathleen_Crombez_1-1695232198388.png

 

The xml schema it creates for this attribute looks like this:

      <attr>

        <attrlabl>text_field</attrlabl>

        <attrdef>text field definition</attrdef>

        <attrdefs>text field definition source</attrdefs>

        <attrdomv>

          <edom>

            <edomv>v1</edomv>

            <edomvd>value 1</edomvd>

            <edomvds>test definition source</edomvds>

          </edom>

          <edom>

            <edomv>v2</edomv>

            <edomvd>value 2</edomvd>

            <edomvds>test definition source</edomvds>

          </edom>

          <edom>

            <edomv>v3</edomv>

            <edomvd>value 3</edomvd>

            <edomvds>test definition source</edomvds>

          </edom>

        </attrdomv>

There is a single attribute domain value (attrdomv) tag with multiple enumerated domain (edom) tags nested inside of it.

When I run this xml through the USGS metadata validation service (https://www1.usgs.gov/mp/) it reports the following error:

Error

Attribute_Domain_Values (5.1.2.4) permits only one of Enumerated_Domain (5.1.2.4.1) or Range_Domain (5.1.2.4.2) or Codeset_Domain (5.1.2.4.3) or Unrepresentable_Domain (5.1.2.4.4)

 

When I manually alter the schema of the xml file to include multiple attribute domain value (attrdomv) tags each containing a single enumerated domain (edom) tag the error goes away. This is true in both the USGS validator and the built in validator in ArcGIS Pro.

      <attr>

        <attrlabl>text_field</attrlabl>

        <attrdef>text field definition</attrdef>

        <attrdefs>text field definition source</attrdefs>

        <attrdomv>

          <edom>

            <edomv>v1</edomv>

            <edomvd>value 1</edomvd>

            <edomvds>test definition source</edomvds>

          </edom>

        </attrdomv>

        <attrdomv>

          <edom>

            <edomv>v2</edomv>

            <edomvd>value 2</edomvd>

            <edomvds>test definition source</edomvds>

          </edom>

        </attrdomv>

        <attrdomv>

          <edom>

            <edomv>v3</edomv>

            <edomvd>value 3</edomvd>

            <edomvds>test definition source</edomvds>

          </edom>

        </attrdomv>

     

However, the metadata editor now displays strangely for this layer. It is displaying an option to insert a new enumerated domain in between each already established domain.

Kathleen_Crombez_2-1695232198393.png

 

Kathleen_Crombez_3-1695232198394.png

 

Is this a bug in the metadata editor?

I am working with ArcGIS Pro v2.9.6

Lastly, I just want to confirm that the second example is the proper what to do this. Is it correct that each enumerated domain (edom) tag should be nested inside of its own attribute domain value (attrdomv) tag.

 

Thank you,

Kathleen

2 Replies
DanelleMalget1
New Contributor II

I have noticed this too with respect to attempting to delete a single edom entry in the Pro Metadata editor interface and having them all disappear! This is a bit of a sticky situation since, as you noticed, the Pro Metadata editor has nested many edom sections inside one attrdomv section. I'm in Pro 3.1.3!

Reviewing the CSDGM schema documentation supports a repeatability of 'attrdomv' with only one 'edom' inside it - so what you are seeing in the MP errors with your default output from ArcPro is correct. It's not pretty, but it is correct. 

With the display you see in Pro after structuring a new attrdomv section for each individual edom, clicking 'New Enumerated Domain' will have the effect of creating a second edom inside the parent of the prior/above edom section. Oy... the single attrdomv for each edom structure could get messed up pretty quickly if a user were to come in and add additional domain values using the gui. 

I've mapped out the schema and Pro GUI display of the three scenarios that I see... #1 shows one edom per attrdomv, and allows for the next two attrdomv elements to contain their own edom. #2 shows how the Pro editor structures  multiple edoms' within one attrdomv, and #3 shows another variation that seems to be allowed in FGDC-CSDGM where just the edomv/edomvd/edomvds are repeatable inside ONE attrdomv... 

https://www.fgdc.gov/standards/projects/metadata/base-metadata/v2_0698.pdf

Its been awhile since your post - have you made progress on your script to generate the xml output of these domains? I've been looking for any existing resources to help with this data-entry process, since older tools are no longer compatible! 

KathleenCrombez1
New Contributor III

I finalized my script (as good as it is going to get for now) and decided to go with the FGDC-CSDGM format with multiple attrdomv tags.

This does not look correct in the ArcGIS Pro metadata editor window, but in my opinion this is  a bug that ESRI needs to fix.

The script I wrote populates the contact information based off of a template and fills in the entity and attribute information based off of the fields in the layer. It incorporates sub-types and domains associated to the fields. It is not perfect and still requires the manual entry of descriptions. But it gave us a big head start in getting most of the data populated.

There is still work to be done on my script, but I am willing to share my code I have done so far. I have only tested it on ArcGIS Enterprise databases (we don't use shapefiles, file or personal geodatabases for storing our data).

I store the ISO_19115_Topic_Category file I included in a SQL table, so you may need to alter the code for that, depending on how you decide to retrieve the data. The metadata template I provided only includes the items we decided to use. You can create your own metadata template file to include more tags, or just alter the one attached for your use.