Make Defense Grids and Graticules (Defense Mapping)

License Level:BasicStandardAdvanced

Summary

Generates a grids and graticules layer for Esri Defense Mapping products. This tool supports the creation of single, dual, and zipper zone grids. It simplifies grid creation by automatically populating several parameters based on a selected feature and an input grid type. It determines zone type and the correct grid .xml template used to generate the grids and graticules layer. It also determines a grid's primary and ancillary coordinate system and estimates reference scale and annotation mask margin.

Usage

Syntax

DefenseGrids_defense (in_aoi_features, grid_type, template, in_workspace, in_dataset, use_field, grid_field, grid_string, primary_coord, ancillary_coord, reference_scale, mask_margin, anno_feature_class, {update_data_frame})
ParameterExplanationData Type
in_aoi_features

The feature layer that contains the selected feature used to determine the extent of the grid layer. The grid is created within this extent.

Layer
grid_type

Indicates the type of Defense Mapping cartographic product that will include the grid.

  • NONECustom grid type. Choose this option for a custom Grid Template .xml file.
  • ICM_5K+Grids for 5K–7.5K ICMs
  • ICM_10K+Grids for 10K–15K ICMs
  • LPC50Grids for 50K LPCs
  • JOGAGrids for JOG-A
  • TLM50Grids for 50K TLMs
  • TLM100Grids for 100K TLMs
  • TLM50_ELEVATION GUIDEGrids for the TLM50 Elevation Guide
  • TLM100_ELEVATION GUIDEGrids for the TLM100 Elevation Guide
String
template

Path to a grid .xml definition template. These templates store graphic properties for each grid layer. You can create new templates using the Production Mapping Grids and Graticules Designer or use existing templates located in the ArcGIS installation directory.

File
in_workspace

Workspace used in conjunction with the input Feature Dataset.

Workspace
in_dataset

The feature dataset that will store the features. This tool will create the feature dataset if it does not exist. Grid-specific feature classes will also be created if they do not already exist. If they already exist, and a grid with the same name and type as the one being created also exists, it will be overwritten.

String
use_field

Indicates whether a field name or string is appended to the end of the name of each feature class in the feature dataset. This allows you to store multiple grids in the same feature dataset.

  • FIELDA field name from in_aoi_layer can be used as the grid name.
  • STRINGA custom string can be defined for the grid name.
Boolean
grid_field

The name of the field from in_aoi_features whose value is used as the grid name. This value is appended to the name of each feature class in the grid dataset. It is recommended that the NRN field be used.

Field
grid_string

The name for the cartographic grid created that allows for distinction between grids stored in the same feature dataset and set of feature classes.

String
primary_coord

Coordinate system for the grid layer being created. Typically, it will be the coordinate system of the final product or data frame. This coordinate system must be a projected coordinate system.

Spatial Reference
ancillary_coord

A secondary coordinate system in which grid components can be created.

Spatial Reference
reference_scale

The scale at which the grid is created and should be viewed. When the reference scale from the XML grid definition file is defined as Use Environment, the reference scale is derived in the following order:

  • The geoprocessing Reference Scale environment setting
  • The active data frame's reference scale
  • The active data frame's scale
  • The value from the XML grid definition file

Double
mask_margin

The amount of space that exists between the side of the annotation and the mask polygon feature. The units can be defined in page or map units. The value is composed of a number and unit of measurement.

Linear unit
anno_feature_class

Name for the annotation mask feature class.

String
update_data_frame
(Optional)

Indicates if the tool will update the data frame and layout using the grid settings.

  • NO_CONFIGURELAYOUTDo not configure the data frame and layout. This is the default.
  • CONFIGURELAYOUTConfigure the data frame and layout.
Boolean

Code Sample

DefenseGrids example (Python window)

This following Python window script demonstrates how to use the DefenseGrids tool.

# Set gp environment
gridsWorkspace="c:/data/grids.gdb"
arcpy.env.workspace=gridsWorkspace
arcpy.env.addOutputsToMap=True

# variables for tools
idx="C:/Program Files (x86)/ArcGIS/EsriDefenseMapping/Desktop10.2/ReferenceData/MapIndex.mdb/MapIndex/TLM50_Index"
idxLayer = "TLM50_Index"
product="TLM50"
inTemplate="C:/Program Files (x86)/ArcGIS/Desktop10.2/GridTemplates/DefenseMapping/TLM50_Single.xml"
inDataset = "TLM50D"
outFeatures = "ANO_TLM50D_Masks_V795X22561"
useField="FIELD"
gridField="NRN"
coordsys="PROJCS['GCS WGS 1984 UTM Zone 11N (Calculated)',GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',-117.0],PARAMETER['Scale_Factor',0.9996],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]];IsHighPrecision"
ancillaryCoord="GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]];-400 -400 1000000000;-100000 10000;-100000 10000;8.98315284119521E-09;0.001;0.001;IsHighPrecision"
refScale=50000
maskMargin="50 Meters"
where="[NRN] = 'V795X22561'"

# Make a feature layer from the TLM50_Index feature class
arcpy.MakeFeatureLayer_management(idx,idxLayer)

# Select a feature in which to create the grid
arcpy.SelectLayerByAttribute_management(idxLayer,"NEW_SELECTION", where)

# Generate grid
arcpy.DefenseGrids_defense(idxLayer, product, inTemplate, gridsWorkspace, inDataset, useField, gridField, "", coordsys, ancillaryCoord, refScale, maskMargin, outFeatures)

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: No
ArcGIS for Desktop Standard: No
ArcGIS for Desktop Advanced: Requires Defense Mapping
11/30/2015