Generate Reference System Grid From Area (Defense)

Summary

Creates Gridded Reference Graphics (GRG) based on Military Grid Reference System (MGRS) or United States National Grid (USNG) reference grids.

Usage

  • An irregularly shaped input will use its bounding envelope to generate the output GRG.

  • The Output Feature Class will be in the WGS84 projection.

  • An input area that is smaller than the Grid Square Size may create a single grid cell that is much larger than the input area.

  • A large input area and a small Grid Square Size may create many small grids in a large GRG.

  • How large grids are handled using the Large Grid Handling parameter is based on the extent area (not actual area) of the input. The following values will cause the tool to stop:

    • Areas larger than approximately 200,000 square meters for 10 m grid.
    • Areas larger than approximately 20,000,000 square meters for 100 m grid.
    • Areas larger than approximately 2,000,000,000 square meters for 1000 m grid.
    • Areas larger than approximately 200,000,000,000 square meters for 10000 m grid.

  • Cell labels will be added to a Grid field in the Output Feature Class.

Parameters

LabelExplanationData Type
Input Feature

The input polygon feature on which the GRG will be based.

Feature Set
Output Feature Class

The output polygon feature class containing the GRG.

Feature Class
Grid Reference System

Specifies the reference system the GRG will use.

  • Military Grid Reference System —The Military Grid Reference System will be used. This is the default.
  • United States National Grid —The United States National Grid will be used.
String
Grid Square Size

Specifies the grid square size that will be used for the cells in the GRG.

  • Grid Zone Designator —The size of the grid cells will be a Grid Zone. This is the default.
  • 100,000 m grid —The size of the grid cells will be 100,000-meter grid squares.
  • 10,000 m grid —The size of the grid cells will be 10,000-meter grid squares.
  • 1,000 m grid —The size of the grid cells will be 1,000-meter grid squares.
  • 100 m grid —The size of the grid cells will be 100-meter grid squares.
  • 10 m grid —The size of the grid cells will be 10-meter grid squares.
String
Large Grid Handling

Specifies how large input areas that may contain many features will be handled.

  • No large grids —Processing will stop when 2000 features are created. This is the default.
  • Allow large grids —Large grids are supported.
String

arcpy.defense.GenerateReferenceSystemGRGFromArea(in_features, output_feature_class, grid_reference_system, grid_square_size, large_grid_handling)
NameExplanationData Type
in_features

The input polygon feature on which the GRG will be based.

Feature Set
output_feature_class

The output polygon feature class containing the GRG.

Feature Class
grid_reference_system

Specifies the reference system the GRG will use.

  • MGRSThe Military Grid Reference System will be used. This is the default.
  • USNGThe United States National Grid will be used.
String
grid_square_size

Specifies the grid square size that will be used for the cells in the GRG.

  • GRID_ZONE_DESIGNATORThe size of the grid cells will be a Grid Zone. This is the default.
  • 100000M_GRIDThe size of the grid cells will be 100,000-meter grid squares.
  • 10000M_GRIDThe size of the grid cells will be 10,000-meter grid squares.
  • 1000M_GRIDThe size of the grid cells will be 1,000-meter grid squares.
  • 100M_GRIDThe size of the grid cells will be 100-meter grid squares.
  • 10M_GRIDThe size of the grid cells will be 10-meter grid squares.
String
large_grid_handling

Specifies how large input areas that may contain many features will be handled.

  • NO_LARGE_GRIDSProcessing will stop when 2000 features are created. This is the default.
  • ALLOW_LARGE_GRIDSLarge grids are supported.
String

Code sample

GenerateReferenceSystemGRGFromArea example 1 (Python window)

The following Python window script demonstrates how to use the GenerateReferenceSystemGRGFromArea function.

import arcpy
arcpy.env.workspace = r"C:/Data.gdb"
arcpy.GenerateReferenceSystemGRGFromArea_defense("airport_areas",
                                                 "GenerateReferenceSystemGRGFromArea",
                                                 "MGRS",
                                                 "GRID_ZONE_DESIGNATOR",
                                                 "NO_LARGE_GRIDS")
GenerateReferenceSystemGRGFromArea example 2 (stand-alone script)

The following example uses the GenerateReferenceSystemGRGFromArea function in a sample workflow script.

# Import system modules
import arcpy

# Set environment settings
arcpy.env.workspace = r"C:/Data.gdb"
arcpy.env.overwriteOutput = True

# Select Charlotte airport from airports layer
airports = "Airports"
whereClause = "airport_code = 'CLT'"
clt_layer = arcpy.SelectLayerByAttribute_management(airports,
                                                    "NEW_SELECTION",
                                                    whereClause)

# Create GRG
arcpy.GenerateReferenceSystemGRGFromArea_defense(clt_layer,
                                                 "GenerateGRGFromArea",
                                                 "MGRS",
                                                 "GRID_ZONE_DESIGNATOR",
                                                 "NO_LARGE_GRIDS")

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics