FGDCMETA.AML is an extremely simplified variant of DOCUMENT.AML that generates metadata files in ASCII text from Arc/Info geo_datasets in a UNIX or NT environment. File structure and content conform with the FGDC Content Standard for Digital Geospatial Metadata. The output template is intended to be customized to the individual user's needs (which requires rudimentary knowledge of AML). Resulting files are intended for use with other metadata tools that conform to the FGDC metadata standard (such as xtme, tkme and mp).
Virtually all the improvements included in version 1.2 were programmed by Curtis V. Price, U.S. Geological Survey, Rapid City, SD.
Purpose
FGDCMETA.AML generates metadata files in ASCII text; file structure and content conforms to FGDC metadata standards. The output template is designed to be customized to the individual user's needs. Resulting files are intended for use with other FGDC metadata tools such as xtme, tkme and mp.
The CREATE option: (this is the default)
Creates a new metadata text file named <geo_dataset>.met in the
current workspace, but it will not overwrite an existing <geo_dataset>.met.
The indicated <geo_dataset> can be located in a different workspace, but the output metadata file will still be written to the current workspace.
The new text file is in a generic format which can be customized by editing
the template section of the AML. If you edit the template, you should use
mp (the Metadata Parser from FGDC) to insure that the format remains
compliant with the FGDC metadata standard, formally known as the Content
Standards for Digital Geospatial Metadata (CSDGM).
TEMPLATE is the default switch for the CREATE option. It creates a field in the metadata text file for several metadata elements common to many GIS data sets. Metadata fields contain either a value extracted from Arc/Info or a generic statement in parentheses that prompts the user for the nature of the information to be entered. Generic statements, for example Use Constraints and Distribution Liability, can be customized as necessary by editing the template section of the AML.
The MINIMUM switch for the CREATE option generates an output file that requires minimal additional information to be added by the user. It includes only the Identification and Metadata sections (sections 1 and 7) of the CSDGM, plus any other information that can be automatically generated. This option should only be used by those who are very familiar with the CSDGM and wish to build a custom metadata file by hand. Raw output alone from this option is not sufficient as a complete metadata file.
The EDIT option:
This option opens an existing metadata file in the default text editor.
It checks for metadata files in the following order:
Only the <geo_dataset>.met file is displayed. If <geo_dataset>.met does not exist in the current workspace, then the program checks for the existence of a <geo_dataset>.nar file that may have been previously created with DOCUMENT.AML. A message will indicate the presence of a narrative file from DOCUMENT.AML, but DOCUMENT.AML must be invoked to view the file.
Discussion
FGDCMETA.AML is a hacked variant of DOCUMENT.AML that gets rid of all the bells and whistles and simply creates or displays an FGDC compliant metadata text file. It is primarily intended to be used as the first step in generating new FGDC metadata. When used to create new metadata it will:
The editor used is set in the AML code. You can override this by setting the AML global variable .fgdcmeta$editr during your arc session or in a file named ".arc" in your home directory, for example:
These files are intended to be used with the FGDC metadata tools xtme, tkme and mp, which rely heavily on proper indentation. Proper indentation allows xtme and mp to parse metadata files and perform automated checks of format and metadata content. This in turn allows the metadata to be indexed and searched, which is one of its primary purposes. When creating new metadata, please refer to existing metadata files for examples. Many examples are available from the FGDC.
Notes
It is better if a <geo_dataset> has a projection defined before running FGDCMETA. FGDCMETA.AML has powerful projection extraction and spatial domain (areal extent) calculation functions (that were retained from DOCUMENT.AML) that are rendered useless if no projection is defined.
The NAD27 datum will be assumed if the horizontal datum is not specifically defined in the Arc/Info data set.
FGDCMETA.AML will run as is (we hope), so there is no actual installation required. However, you will probably want to customize the AML code for your organization. There are two things to customize:
First make a back-up copy of the AML, then open fgdcmeta.aml in the text editor of your choice.
Go to the SETVARIABLES routine of FGDCMETA.AML. This routine starts on or about line 289. The variable editr sets the system command that launches a text editor for the metadata file you want to CREATE or EDIT. Set this variable to the full system command needed to launch the text editor of choice. You may want to use a UNIX system text editor such as textedit, emacs or vi, or a PC editor such as notepad.exe, or you may want to directly specify xtme.
For example, to launch textedit on a UNIX system, the command would be similar to the following:
&sv editr = /usr/openwin/bin/texteditOr, to launch vi on a UNIX system, set the variable like this. Note the extra command line parameters.
&sv editr = xterm -e viOr, to launch xtme instead, the command may look like this:
&sv editr = xtmeThis default example sets xtme for UNIX and notepad.exe for Windows NT:
&if [extract 1 [show &os]] cn 'NT' &then &sv editr notepad.exeThe exact string will depend on your system setup.
&else &sv editr xtme
Once you have set the editr variable, save the file and test it (by creating a new metadata file) to make sure there are no problems when the AML opens the text editor.
This is a little more involved. It's not terribly difficult, but it requires that you have a good grasp of AML script writing and that you have a good understanding of how the FGDC Content Standard for Digital Geospatial Metadata (CSDGM) production rules work.
You are urged to use the FGDC metadata tools mp (Metadata Parser) and xtme (Xt Metadata Editor) or tkme (NT users) to assist you in this operation. These tools will help you build a properly ordered, formatted and indented template.
Go to the TEMPLATE routine of FGDCMETA.AML. This routine starts on or about line 899. Once you have determined how you want you output from FGDCMETA.AML to look, simply remove from the existing template the text you don't want, and replace it with the text you do want. Here are some hints to keep in mind:
The general form of a line without a variable is:
&s ok [write %txtunit% [format %iN% 'Some sort of text goes here.']]
The general form of a line that includes a variable is:
&s ok [write %txtunit% [format %iN% [quote A_Heading: [locase %.some$variable%]]]]
(The N in "%iN%" is the indentation level as set in the block of indentation variables starting on or about line 945.)
It is suggested that you note the differences and conform to these conventions for two reasons:
Document.aml is a metadata generation tool for Arc/Info that was created by staff of the Water Resources Division of the USGS and subsequently included with recent releases of Arc/Info. For the purposes of this section, it is assumed that the reader has some familiarity with the Arc/Info document atool.
Over the last three years, the Illinois State Geological Survey has used Document.aml as its primary metadata collection tool. In this time there have been five or six generations of the tool: USGS ver. 2.0.2; Arc/Info vers. 7.0.2, 7.0.3, and 7.0.4; Blmdoc from the BLM; and the most recent USGS release. (ESRI version 7.1.1 has subsequently been released but is not included in this review.) The concept of Document.aml is excellent and the program has proven useful for creating on-line documentation for individual Arc/Info data sets. However, the mechanics of the program have shown several problems, especially in generating FGDC formatted metadata. These problems can be attributed to three primary causes:
Some of the specific problems encountered are:
In addition, we understand that ESRI is developing a new metadata tool, which casts some doubt on the future development and support of Document.aml. Because of these problems, the ISGS has chosen not to continue using Document.aml for the collection of FGDC metadata. Document.aml does have, however, some impressive functions including:
Not wanting to forego the convenience of these functions, Document.aml was used as a template to develop a related AML called Fgdcmeta.aml. This tool retains the excellent automatic data gathering routines of Document.aml, but discards entirely any manual data entry within Arc/Info. All data entry is done in xtme or another editor. The new aml consists of line commands only; the several menus and forms have been removed. The main function is described in four steps:
The approach used in Fgdcmeta.aml has the following advantages over Document.aml:
There are disadvantages to using Fgdcmeta.aml. It is not as robust as Document.aml. In its current form, it only supports a one-time query of DESCRIBE data from coverages, grids, and tins for the purposes of generating FGDC compliant metadata outside of Arc/Info. It does not write the metadata to an INFO file or directly support update of an existing metadata file.
Some sections of the FGDC metadata standard that were included in DOCUMENT.AML are not included in FGDCMETA.AML.
Feel free to contact me by fax or email.
Daniel O. Nelson
Associate Staff Geologist
Illinois State Geological Survey
615 East Peabody Drive
Champaign, Illinois 61821
USA
Fax: 217-333-2830
Email: nelson@isgs.uiuc.edu