Note: This is the first in a series of posts describing the metadata tools in ArcGIS.
ArcGIS contains several tools for metadata creation, editing, and transformations. They are found in Conversion Tools - Metadata. This post reviews the Synchronize Metadata tool. Esri's official definition of the tool is: "Automatically updates an ArcGIS item's metadata with the current properties of the item." This tool is often referred to in terms of updating a file if its metadata has changed. However, for this project, we are also interested in the tool because it can fill in missing information.
Many of the metadata files we are working with do not include technical information such as Geometry Type, Spatial Reference, Extents, or an Attribute Table. However, his information can be created if we download the dataset, open it in ArcGIS, and run the Synchronize Metadata tool.
Part 1: Creating technical metadata for a shapefile when there is no ArcGIS metadata format file available.
ArcGIS metadata format file
ArcGIS stores metadata with a dataset as an XML file using a custom structure known as "ArcGIS metadata format." Typically, a user exports an ArcGIS metadata format file to an external FGDC or ISO XML file for inclusion in a geoportal. As a result, a downloaded shapefile may contain more than one XML files in its directory. The ArcGIS metadata format file can be identified by its extension of shp.xml. Occasionally, a downloaded shapefile does not contain a shp.xml file. The Synchronize Metadata tool will create an ArcGIS metadata format file.
The following screenshot shows the contents of a shapefile that was downloaded from a state GIS clearinghouse. It does not contain a metadata file:
ArcCatalog Description tab
If you open the Counties.shp file in ArcCatalog and click on the Description tab, you see a blank template:
Synchronize Metadata tool
Run the Synchronize Metadata tool on this shapefile. There are several Synchronize Type parameters to choose from, but since a new file is being created, it is fine to leave it on the default of "ALWAYS":
After the tool finishes, a new file appears in the shapefile folder: Counties.shp.xml
Return to ArcCatalog, click on the Description tab, and note that quite a bit of information has been identified and inserted into the metadata file
Part 2: Adding technical metadata to a shapefile when the ArcGIS metadata format file is incomplete.
Before Synchronize | After Synchronize ( parameter 'ALWAYS') | Changes |
| ||
|
| |
|
| |
|
| |
| ||
|
| |
|
|
Batch Script
To Synchronize Metadata for a batch of shapefiles, use the following script. Copy the code into the Python window in ArcCatalog:
>>> import arcpy
>>> from arcpy import
env
>>>
env.workspace = "the path to your folder of shapefiles"
>>> fcList =
arcpy.ListFeatureClasses()
>>> for fc in
fcList:
...
arcpy.SynchronizeMetadata_conversion(fc,"NOT_CREATED")
Notes
- The CIC Geospatial Data Discovery Project in the midst of migrating metadata formats from FGDC to (ArcGIS to) ISO . Some of the FGDC technical metadata does not always translate to ISO, and there is risk of data loss, in particular the Attribute Table, and, occasionally, the extents. The Synchronize Metadata tool can potentially ensure that this technical data does not get lost in the transformation.
- The actual dataset is required for this tool, so you cannot work with only the metadata files. From ArcGIS's help pages: "XML files do not support metadata synchronization. If you try to synchronize a stand-alone metadata XML file, the tool will complete successfully but the XML file will remain unchanged.