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

Build Metadata tool (2.14.4; version of 8/21/23): "Start with embedded metadata?" option? #80

Open
alwunder opened this issue Sep 20, 2023 · 4 comments

Comments

@alwunder
Copy link

I noticed after running the Build Metadata tool that the xml output for attributes has not retained the internal metadata definitions that are applied to the database which I build from a XML workspace document. This includes Esri-defined fields (OBJECTID, Shape, etc.) as well as basic GeMS fields.

For example, the OBJECTID field in every feature class in my gdb has the following attr metadata tag:

      <attr>
        <attrlabl>OBJECTID</attrlabl>
        <attrdef>Internal feature number</attrdef>
        <attrdefs>Esri</attrdefs>
        <attrdomv>
          <udom>Sequential unique whole numbers that are automatically generated.</udom>
        </attrdomv>
      </attr>

The metadata tool output shows the following:

     <attr>
       <attrlabl>OBJECTID</attrlabl>
       <attrdef>Internal feature number</attrdef>
       <attrdefs>ESRI</attrdefs>
       <attrdomv>
         <udom>Unrepresentable domain</udom>
       </attrdomv>
     </attr>

I also tested this by commenting out some of the attribute items in my_definitions.py and the metadata tool gave errors that the definitions for those items were missing in the output even though they are defined internally.

I'm not sure how big of an issue this really is, but I wanted to point it out. I have no problem using my_definitions.py as it mirrors the embedded definitions. I don't know how many folks are working with databases that have metadata built in. I've also never used the GeMS Create New Database tool and am not sure if it creates internal metadata for entities and attributes.

@ethoms-usgs
Copy link
Collaborator

Yes, I have been meaning to write new code or a new tool to work better with embedded metadata. As you note, the Build Metadata tool right now doesn't care if there are existing embedded entity and attribute definitions. It builds everything off the definition files but I have been hearing from a few people that they write a lot of metadata in the Catalog editor so I need to better accommodate that workflow.

And, no, the Create Database tool writes no metadata, but I like that idea.

@alwunder
Copy link
Author

I see now after reading on the wiki (https://github.com/DOI-USGS/gems-tools-pro/wiki/GeMS-Tools-Documentation#build-metadata) that only top level embedded metadata are captured from the database using the "Start with embedded metadata?" option. Interestingly, that's the only thing my databases DON'T have... I always did that at the end (or not at all...) and relied on the external metadata since each database is a little different in title, author, methods, etc.

@ethoms-usgs
Copy link
Collaborator

Exactly. This is something I need to address. Either a new tool that migrates table metadata up to the top level or build it into the Build Metadata tool. Probably the latter is better so that the embedded metadata aren't changed, but in that case the external xml file can still be imported manually if the user wants it.

@alwunder
Copy link
Author

Agreed, that seems like the best option to me as well. Hopefully, that makes it on to the list of enhancements!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants