USGS MP Metadata Translator (Conversion)

License Level:BasicStandardAdvanced

Summary

Uses the USGS metadata parser utility, known as mp, to export or validate FGDC metadata content. The mp utility is created and maintained by the USGS for managing metadata that follows the FGDC Content Standard for Digital Geospatial Metadata (CSDGM). A version of mp is provided with ArcGIS.

NoteNote:

This tool only uses metadata elements in an item's metadata or a stand-alone metadata XML file that follow the FGDC CSDGM metadata format. FGDC content may exist in an ArcGIS item's metadata. For example, if the metadata was created in ArcGIS Desktop 9.3.1 or earlier using the FGDC metadata editor or created in the current version of ArcGIS for Desktop using the FGDC metadata editor add-in, the item's metadata will include elements that follow the FGDC XML format. This tool only exports these FGDC XML metadata elements—the information displayed in the FGDC Metadata (read-only) section in the Description tab if you are using a metadata style that provides access to an item's complete metadata.

If an item's metadata only contains information edited in the Description tab it won't contain any XML elements that can be exported using this tool. After selecting the FGDC CSDGM Metadata style you can export ArcGIS metadata to the FGDC XML format. Use this tool with the exported FGDC XML file to generate the HTML, text, and SGML files that are commonly associated with FGDC metadata.

Usage

Syntax

USGSMPTranslator_conversion (source, {config}, {conversion}, {output}, {errors})
ParameterExplanationData Type
source

The item whose metadata will be converted or a stand-alone XML file that will be converted.

Data Element; Layer
config
(Optional)

A file that defines custom parameters that mp will consider when processing the metadata.

To export metadata without using a configuration file, provide # instead of a file name.

File
conversion
(Optional)

The type of conversion that will take place.

  • NONENo conversion will be performed.
  • XMLAn XML file will be created as output.
  • HTMLAn HTML file will be created as output.
  • TEXTA text file will be created as output.
  • FAQAn HTML file in FAQ format will be created as output.
  • SGMLAn SGML file will be created as output.
  • DIFA text file in DIF format will be created as output.

By default, the "XML" conversion will be performed.

String
output
(Optional)

A file that will be created containing the converted metadata.

The type of file created is defined by the conversion type.

To check for problems in the FGDC metadata using mp and not produce a output file, provide # instead of a file name.

File
errors
(Optional)

A text file that will be created listing the warnings and errors that occurred during the conversion process.

To export metadata without producing a log file, provide the pound sign (#) instead of a file name.

File

Code Sample

Export an ArcGIS item's existing FGDC metadata

Exports information in an ArcGIS item's metadata that is formatted according to the FGDC CSDGM standard to an HTML file.

import arcpy
from arcpy import env
env.workspace = "C:/data"
arcpy.USGSMPTranslator_conversion("yellowstone.mxd", "#", "HTML", 
    "yellowstone_map.html", "yellowstone_map.log")

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Yes
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
3/3/2014