Label | Explanation | Data 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.
| String |
Grid Square Size
| Specifies the grid square size that will be used for the cells in the GRG.
| String |
Large Grid Handling
| Specifies how large input areas that may contain many features will be handled.
| String |
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
arcpy.defense.GenerateReferenceSystemGRGFromArea(in_features, output_feature_class, grid_reference_system, grid_square_size, large_grid_handling)
Name | Explanation | Data 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.
| String |
grid_square_size | Specifies the grid square size that will be used for the cells in the GRG.
| String |
large_grid_handling | Specifies how large input areas that may contain many features will be handled.
| String |
Code sample
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")
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")