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 parameter value will be in the WGS84 projection.

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

  • A large input area and a small Grid Square Size parameter value 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:

    • 10 m grid—Areas larger than approximately 200,000 square meters
    • 25 m grid—Areas larger than approximately 1,250,000 square meters
    • 50 m grid—Areas larger than approximately 5,000,000 square meters
    • 100 m grid—Areas larger than approximately 20,000,000 square meters
    • 1,000 m grid—Areas larger than approximately 2,000,000,000 square meters
    • 10,000 m grid—Areas larger than approximately 200,000,000,000 square meters

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

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 SystemMilitary Grid Reference System will be used. This is the default.
  • United States National GridUnited 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.
  • 100,000 m gridThe size of the grid cells will be 100,000-meter grid squares.
  • 10,000 m gridThe size of the grid cells will be 10,000-meter grid squares.
  • 1,000 m gridThe size of the grid cells will be 1,000-meter grid squares.
  • 100 m gridThe size of the grid cells will be 100-meter grid squares.
  • 50 m gridThe size of the grid cells will be 50-meter grid squares.
  • 25 m gridThe size of the grid cells will be 25-meter grid squares.
  • 10 m 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

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.

  • MGRSMilitary Grid Reference System will be used. This is the default.
  • USNGUnited 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.
  • 50M_GRIDThe size of the grid cells will be 50-meter grid squares.
  • 25M_GRIDThe size of the grid cells will be 25-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.defense.GenerateReferenceSystemGRGFromArea("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.management.SelectLayerByAttribute(airports,
                                                    "NEW_SELECTION",
                                                    whereClause)

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

Licensing information

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

Related topics