I am trying to create a descriptive database catalog by implementing the great solution described here. This user's solution creates a csv file that identifies a geodatabase's content, including elements from its metadata. In the
GetMetadataItems function of this user's script, the abstract and purpose metadata items are accessed by using the elements as "idinfo/descript/abstract" and "idinfo/descript/purpose", as shown below in a portion of user's script.
def GetMetadataItems(dataset): """Retrieves certain metadata text elements from the specified dataset""" tree = GetMetadataElementTree(dataset) originator = GetElementText(tree, "idinfo/citation/citeinfo/origin") # Originator pocorg = GetFirstElementText(tree, ("idinfo/ptcontac/cntinfo/cntperp/cntorg", # Point of contact organization (person primary contact) "idinfo/ptcontac/cntinfo/cntorgp/cntorg")) # Point of contact organization (organization primary contact) abstract = GetElementText(tree, "idinfo/descript/abstract") # Abstract purpose = GetElementText(tree, "idinfo/descript/purpose") # Purpose searchkeys = ListElementsText(tree, "dataIdInfo/searchKeys/keyword") # Search keywords themekeys = ListElementsText(tree, "idinfo/keywords/theme/themekey") # Theme keywords del tree metadataItems = (originator, pocorg, abstract, purpose, searchkeys, themekeys) return metadataItems
When I run this script, however, most of the values for the purpose and abstract columns are blank. I have tried to change these strings to read
"ItemDescription/idCitation/idPurp" as well as
"idCitation/idPurp" My guess is that this tool is not working for me because of this portion of the script. How can I make sure the script is able to access these metadata items in my geodatabase?
Perhaps I need to ensure the definitions in the
GetMetadataItems function adhere to the specific metadata format of my geodatabase.