U.S. Geological Survey

USGS NSDI Training for creation of formal metadata
Workshop session four

Exercise 4: Using FGDCMETA (for ARC/INFO users)

This exercise was developed by Curtis Price, who is the current maintainer of FGDCMETA.AML and  ARC/INFO command-line interfaces to mp, cns, and xtme/tkme.
FGDCMETA is a variant of the USGS/EPA DOCUMENT ARC/INFO AML program that  generates a FGDC metadata file (in text format) from an ARC/INFO coverage with no interaction from the user, extracting all information  that can be extracted from an ARC/INFO data sets. It was originally developed by Dan Nelson of the Illinois Geological Survey. Curtis Price modified the AML to be system independent, extended support to all types of ARC/INFO data sets, and added USGS-specific text to the documentation template. The output of FGDCMETA is a text metadata file that can be used with other metadata tools like xtme, mp and cns.

FGDCMETA.AML and the AML command-line interfaces to mp, cns, and xtme are designed to make it easier for USGS ARC/INFO users to work with FGDC metadata. Not all capabilities of mp and cns are available through this interface, but the tools that are needed by most GIS users are there, with minimal setup required. Basically a single tarfile needs to be installed over your ARC/INFO directory, with all custom AMLs and metadata programs installed in the ARCHOME/locale directory.

In this exercise, you will dump all the information stored in ARC/INFO into a file using the DESCRIBEALL program, generate FGDC metadata using FGDCMETA, and use the AML interfaces to mp and xtme to examine and edit the resulting metadata file.


Color conventions used in this exercise
Green Element names when they are part of the metadata structure
Cyan Menus and menu items, and element names when they are options on the Add menu.
Red Commands you type in the terminal window
  1. Start ARC/INFO and create a simple coverage named box. (This is a tropical study area down near the equator.) Specify a map projection for the coverage.
  2. $ arc
    Arc: arcplot
    Arcplot: create boxcov box 0 0 100 100  ; quit
    Arc: build boxcov; createlabels boxcov; build boxcov
    Arc: projectdefine cover boxcov
    Project: projection utm; zone 11; units meters; parameters
  3. Dump out "DESCRIBE" information on the data set. Bring it up in another window.
  4. Arc: describeall boxcov boxcov.asc
    Arc: &sys xedit boxcov.asc &   /* (or use your favorite text editor)
  5. The file box.asc that you created is a fast dump of everything ARC/INFO "knows" about the dataset, including the contents of the ARC/INFO logfile.  FGDCMETA pulls as much of this information as possible (except the ARC/INFO log file) and writes it into a FGDC metadata file. Try it:
  6. Arc: fgdcmeta boxcov
    Note: By default FGDCMETA will bring up the metadata in an xterm window running the vi text editor.  If you would like to use another text editor, you can set this for your arc session interactively (or in an ".arc" startup file in your home directory).
    Arc: &s .fgdcmeta$editr xed
    Arc: fgdcmeta boxcov edit  /* metadata file box.met will be opened using "xed" editor
    You can also edit the file using a text editor, or xtme/tkme, using the AML command-line interface:
    Arc: &sys vi boxcov.met
    Arc: xtme boxcov.met
  7. Try running the FGDCMETA output though mp; it should come up with no errors. This doesn't mean the file doesn't need editing however, because you need to enter data specific to that data set. The template FGDMETA generates is full of useful pointers to help you in that effort, and of course you can cut and paste data.
  8. Arc: mp boxcov.met
  9. Generate html, and sgml output.
  10. Arc: mp
    Usage: mp <metadata.file> {error.file} {out.file} {TEXT | HTML | SGML | XML}
    Arc: mp boxcov.met # boxcov.html html
    Arc: mp boxcov.met # boxcov.sgml sgml
  11. Notice that when mp runs, you see the actual command line submitted to the "real" mp. This information will help you if you decide down the road to get more technical with using mp. (The AML front-end has a subset of the full functionality of mp). The configuration file used (with the -c option) is customized to do several things--this is the default setup for USGS WRD users. Here is the current config file:

    # configuration file for USGS WRD

    # Keep "Metadata:" tag in mp/cns text output
    # Add USGS-water banner to top of html output and link at end
    # In HTML output, preserve newlines in several narrative
    #   sections of the metadata
    # Curtis Price, 9-98
            top_level keep
                <a href="http://www.usgs.gov/">
                <img src="http://water.usgs.gov/icons/water_banner1.gif"
                alt="USGS" border=0 width=480 height=72></a>
                <p>More <a href="http://water.usgs.gov/lookup/geturl?GIS">
                USGS GIS Data for Water Resources</a>
                Key: Supplemental_Information
                Key: Process_Description
                Key: Entity_and_Attribute_Overview

    EXTRA CREDIT: Modifying FGDCMETA for your use.

  13. If you know how to edit an AML program, you can edit FGDCMETA to meet your particular needs. This is extremely helpful for documenting many data sets that are similar except for a few differences. For example, you can put your name and address into a personal copy of FGDCMETA that you use. There is a copy of FGDCMETA in your current workspace. This is an identical copy of the one you have been using (as an "&atool command").
  14. Arc: &sys vi FGDCMETA.AML
    search for the template routine, in vi this is done by searching for the string "routine TEMPLATE"::
    /routine TEMPLATE
  15. This is the routine that you can edit to change things. Page down toward the end of the routine and change the Metadata record to reflect your contact name and address. Now rerun FGDCMETA and see if the metadata file has the new information you requested. If you messed up the AML, you will find out now.
  16. Arc: &sys rm -i box.met
    Arc: &run fgdcmeta box

This page is <http://geology.usgs.gov/usgs/gdinfo/nsdi/training/4f.html>
Maintained by Peter Schweitzer
Last updated Thursday, 10-May-2012 16:01:22 EDT