Summary
Updates metadata to contain the most current properties of the ArcGIS item before processing the metadata and finally exporting it to an XML file that conforms to a standard metadata format.
Initial processing is performed to produce the best results when exporting information to a standard metadata format. Afterwards, the metadata is exported using the ESRI Metadata Translator.
Usage
A new metadata translator is provided with the current release of ArcGIS Desktop—the ArcGIS to ISO 19139 translator, ARCGIS2ISO19139.xml. All ISO-based metadata styles have been updated to use this translator. Any geoprocessing models or Python scripts that export metadata to the ISO 19139 format should be updated to use this translator as well.
The earlier ArcGIS or ESRI-ISO to ISO 19139 translator, ESRI_ISO2ISO19139.xml, continues to be provided; however, there are several known issues with this translator that can't be resolved. Any existing 9.3.1 metadata in the ESRI-ISO format must be upgraded to the ArcGIS metadata format to successfully export the item's metadata content to the ISO 19139 format with the ArcGIS to ISO 19139 translator, ARCGIS2ISO19139.xml.
The output files produced by this tool can't be stored in a geodatabase. If the Current workspace environment is set to a geodatabase, the output files will be stored in a different location, as described below.
- If Current workspace is set to a file or personal geodatabase, the output files will be stored in the folder in which the geodatabase is stored.
- If Current workspace is set to an enterprise or workgroup geodatabase, the output files will be stored in the location defined by the system TEMP environment variable.
The Source Metadata parameter has a complex data type. If you use this tool in a model, create a variable for the Source Metadata parameter in ModelBuilder by right-clicking the tool, pointing to Make Variable, pointing to From Parameter, and then clicking Source Metadata.
Syntax
arcpy.conversion.ExportMetadata(Source_Metadata, Translator, {Output_File})
Parameter | Explanation | Data Type |
Source_Metadata | The item whose metadata will be converted or a stand-alone XML file that will be converted. | Data Element; Layer |
Translator | An XML file that defines the conversion that will be performed. The translator files provided with ArcGIS Desktop can be found in the <ArcGIS Installation Location>\Metadata\Translator folder. The following translators are provided:
| File |
Output_File (Optional) | A stand-alone XML file that will be created containing the converted metadata. | File |
Code sample
ExportMetadata Example (Python Window)
Updates and exports ArcGIS metadata to an XML file that is formatted correctly for the ISO 19139 metadata standard.
import arcpy
from arcpy import env
env.workspace = "C:/data"
#set local variables
dir = arcpy.GetInstallInfo("desktop")["InstallDir"]
translator = dir + "Metadata/Translator/ESRI_ISO2ISO19139.xml"
arcpy.ExportMetadata_conversion ("data.gdb/roads", translator,
"roads_19139.xml")
Environments
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes