Make Defense Grids and Graticules (Defense Mapping)
Simplifies the grids creation workflow for Esri Defense Mapping by creating the grid feature dataset as well as the annotation mask features.
Grid templates can be found in the <ArcGIS install directory>\GridTemplates\DefenseMapping directory.
Input Area of Interest can only be a single polygon feature from a single feature layer. With a stand-alone script, you must use the Select Layer By Attribute tool.
You can create a new feature dataset in the target workspace if the input Feature Dataset does not already exist. You can also browse to an existing feature dataset.
When specifying a grid name that already exists in the output location, the existing grid will be overwritten.
The Primary Coordinate System is predefined in all Defense Mapping grid templates.
The Ancillary Coordinate System is often predefined in Defense Mapping grid templates. Dual grid templates require you to manually select the appropriate projected coordinate system.
During execution, this tool calls another geoprocessing tool, Feature Outline Masks. This creates a mask used to hide features along the edge of the grid. The mask improves cartographic display of annotation along the grid's edge. The output of Feature Outline Masks is added to the grid Feature Dataset.
The XML grid definition template stores the specification's graphic properties for each grid layer. In addition to the graphic properties, which cannot be altered before execution, the definition has specific default values and behavior that can be modified before execution, exposed as parameters.
You can create new templates using the Grids and Graticules Designer which is part of Esri Production Mapping.
The feature layer that contains the selected feature used to determine the extent of the grid layer.
The feature dataset that will store the features. Grid-specific feature classes will 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.
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.
The name of the field from in_aoi_layer 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.
The name for the cartographic grid created that allows for distinction between grids that are stored in the same feature dataset and set of feature classes.
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.
A secondary coordinate system in which grid components can be created.
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 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.
Feature class that contains the annotation masks.
This following Python window script demonstrates how to use the DefenseGrids tool.
import arcpy # check out a Defense Mapping license arcpy.CheckOutExtension('defense') # import the Defense Mapping toolbox - you may have to change this path arcpy.ImportToolbox(r'C:\Program Files\ArcGIS\Desktop10.0\ArcToolbox\Toolboxes\Defense Mapping Tools.tbx') # Local variables in_layer_or_view = "TLM50_Index" in_template = "C:\Program Files\ArcGIS\Desktop10.0\GridTemplates\DefenseMapping\TLM50_Single.xml" in_aoi_layer = "TLM50_Index" in_dataset = "C:\SampleData\10\Defense\Grids.gdb\TLM50D" in_out_feature_class = "C:\SampleData\10\Defense\Grids.gdb\TLM50D\ANO_TLM50D_Masks_V795X22561" # Select a feature in which to create the grid arcpy.SelectLayerByAttribute_management("in_layer_or_view","NEW_SELECTION", "[NRN] = 'V795X22561' " # Generate grid arcpy.DefenseGrids_defense(in_template, in_aoi_layer, in_dataset, "FIELD", "NRN", "V795X22561", "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", "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", 250, "50 Meters", in_out_feature_class)