GAIT (Topographic Production)

Summary

Validates data using the Geospatial Analysis Integrity Tool (GAIT) to check geometry, feature codes, attribute values and domains, and metadata.

Usage

  • You must have Cygwin and GAIT installed to use this tool.

  • The tool writes its results to a table in the specified workspace.

  • GAIT can run using data in the Multinational Geospatial Co-production Program (MGCP) and Topographic Data Store (TDS) data models.

  • The attribution schema must match the schema of the input feature layer.

  • The inspection profile represents a set of checks to run during GAIT and depends on the data model set in the Attribution Schema parameter. Valid domain values are included in the tool messages.

  • When a workspace is defined, a table will be created every time this tool runs.

  • The values of the Metadata Mapping Table parameter depend on the attribution schema. Valid domain values are included in the tool messages.

  • The Metadata Mapping Table parameter value must correspond to the data model of the input feature layer and the attribution schema.

  • The results of the tool are stored in two log files: GAITStdError.txt and GAITStdOutput.txt. The log files are located at C:\Users\<user_name>\AppData\Roaming\ESRI.

Parameters

LabelExplanationData Type
Input Features

The features that will be validated.

Feature Layer; Table View
GAIT Executable

The path to the GAIT.exe file.

File
Output Directory

The shapefile export directory.

Folder
Attribution Schema

The data model that corresponds to the data displayed in the input feature layer.

String
Project Name

The name of the project. The project contains validation information, such as the checks run on the data and the results.

String
Inspection Profile

The set of checks that will be run on the data. This is specific to the data model listed in the attribution schema.

String
Metadata Mapping Table

Specifies the table that will be used to map the metadata for validation.

  • Esri metadataAn Esri metadata table will be used.
  • Intergraph metadataAn Intergraph metadata table will be used
  • MGCP NGA metadataAn MGCP NGA metadata table will be used.
String
Run Silent

Specifies the verbosity of the output messages that will be returned from the GAIT.exe file.

  • Checked—The messages from the GAIT.exe file will be limited. This is the default.
  • Unchecked—The messages from the GAIT.exe file will be verbose.
Boolean
Error Workspace
(Optional)

The workspace where the output features will be written. Each resulting record will be written to a table in this workspace.

Workspace
Custom Inspection File
(Optional)

A file that defines the custom checks.

File
GAIT Output Layer
(Optional)

A layer file that contains the GAIT errors.

Layer File

Derived Output

LabelExplanationData Type
Output Feature Layers

The feature layers that have been validated through GAIT.

Table View; Feature Layer

arcpy.topographic.GAIT(in_features, gait_exe, folder, schema, project, format, metadata, silent, {reviewer_workspace}, {specfile}, {out_gaitlayer})
NameExplanationData Type
in_features
[in_features,...]

The features that will be validated.

Feature Layer; Table View
gait_exe

The path to the GAIT.exe file.

File
folder

The shapefile export directory.

Folder
schema

The data model that corresponds to the data displayed in the input feature layer.

String
project

The name of the project. The project contains validation information, such as the checks run on the data and the results.

String
format

The set of checks that will be run on the data. This is specific to the data model listed in the attribution schema.

String
metadata

Specifies the table that will be used to map the metadata for validation.

  • META_ESRIAn Esri metadata table will be used.
  • META_INGRAn Intergraph metadata table will be used
  • META_MGCPNGAAn MGCP NGA metadata table will be used.
String
silent

Specifies the verbosity of the output messages that will be returned from the GAIT.exe file.

  • SILENTThe messages from the GAIT.exe file will be limited. This is the default.
  • VERBOSEThe messages from the GAIT.exe file will be verbose.
Boolean
reviewer_workspace
(Optional)

The workspace where the output features will be written. Each resulting record will be written to a table in this workspace.

Workspace
specfile
(Optional)

A file that defines the custom checks.

File
out_gaitlayer
(Optional)

A layer file that contains the GAIT errors.

Layer File

Derived Output

NameExplanationData Type
out_featurelayers

The feature layers that have been validated through GAIT.

Table View; Feature Layer

Code sample

GAIT example (stand-alone script)

This stand-alone script demonstrates running the GAIT function to validate MGCP topographic data using industry standards.

# Name: GAIT_sample.py
# Description: Use the GAIT tool to validate topographic data against industry standards

# Import System Modules
import arcpy
import os

# Check Out Extensions
arcpy.CheckOutExtension('Defense')

# Setting Local Variables
workspace = r'C:\Data\GAIT\TDS_6_1.gdb'
gait_exe = r'C:\Program Files\GAIT-WINDOWS-28\gait28.exe'
project_folder = r'C:\Data\GAIT'
project_name = 'GAIT_TEST_1'
out_gaitlayer = r'C:\Data\GAIT\GAIT_TDS_6_1.lyrx'

# Generate list of features to validate
in_features = []
for dir_path, dir_names, file_names in arcpy.da.Walk(workspace, datatype='FeatureClass'):
    for file_name in file_names:
        in_features.append(os.path.join(dir_path, file_name))

# Create error workspace to manage GAIT errors
reviewer_workspace = arcpy.management.CreateFileGDB(project_folder, project_name + '_EW', 'CURRENT').getOutput(0)

# Use the GAIT tool to validate topographic data
arcpy.topographic.GAIT(in_features, gait_exe, project_folder, 'TDS6', project_name, 'USE_TDSMASTER', 'META_ESRI', 'SILENT', reviewer_workspace, '', out_gaitlayer)

# Check In Extensions
arcpy.CheckInExtension('Defense')

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: No
  • Standard: Requires Defense Mapping
  • Advanced: Requires Defense Mapping

Related topics