| Label | Explanation | Data Type | 
| Input Feature	
 | The center point for the GRG starting point. | Feature Set | 
| Output Feature Class
 | The output polygon feature class containing the GRG to be created. | Feature Class | 
| Number of Rows
 (Optional) | The number of horizontal grid cells. | Long | 
| Number of Columns
 (Optional) | The number of vertical grid cells. | Long | 
| Cell Width
 (Optional) | The width of the cells. Measurement units are specified by the Cell Units parameter. | Double | 
| Cell Height
 (Optional) | The height of the cells. Measurement units are specified by the Cell Units parameter. | Double | 
| Cell Units
 (Optional) | Specifies the measurement units for cell width and height. 
 | String | 
| Label Start Position
 (Optional) | Specifies the grid cell where labelling will start. 
 | String | 
| Label Format
 (Optional) | Specifies the labeling type for each grid cell. 
 | String | 
| Label Separator
 (Optional) | Specifies the separator to be used between x- and y-values when the Label Format parameter is set to Alpha-alpha, for example, A-A, A-AA, AA-A. 
 | String | 
| Grid Rotation Angle
 (Optional) | The angle used to rotate the grid. | Double | 
| Grid Rotation Angular Units
 (Optional) | The angular units for grid rotation. 
 | String | 
Summary
Generates a Gridded Reference Graphic (GRG) as a polygon feature class over a specified area with a custom size.
Usage
- The output grid is centered on the input start location. 
- Cell labels will be added to a Grid field in the Output Feature Class parameter value. 
- The grid cells are labeled with sequential letters or numbers. 
- The output is in the Web Mercator coordinate system. 
Parameters
arcpy.defense.GenerateGRGFromPoint(in_feature, out_feature_class, {horizontal_cells}, {vertical_cells}, {cell_width}, {cell_height}, {cell_units}, {label_start_position}, {label_format}, {label_separator}, {grid_angle}, {grid_angle_units})| Name | Explanation | Data Type | 
| in_feature | The center point for the GRG starting point. | Feature Set | 
| out_feature_class | The output polygon feature class containing the GRG to be created. | Feature Class | 
| horizontal_cells (Optional) | The number of horizontal grid cells. | Long | 
| vertical_cells (Optional) | The number of vertical grid cells. | Long | 
| cell_width (Optional) | The width of the cells. Measurement units are specified by the Cell Units parameter. | Double | 
| cell_height (Optional) | The height of the cells. Measurement units are specified by the Cell Units parameter. | Double | 
| cell_units (Optional) | Specifies the measurement units for cell width and height. 
 | String | 
| label_start_position (Optional) | Specifies the grid cell where labelling will start. 
 | String | 
| label_format (Optional) | Specifies the labeling type for each grid cell. 
 | String | 
| label_separator (Optional) | Specifies the separator to be used between x- and y-values when the label_format parameter is set to ALPHA_ALPHA, for example, A-A, A-AA, AA-A. 
 | String | 
| grid_angle (Optional) | The angle used to rotate the grid. | Double | 
| grid_angle_units (Optional) | The angular units for grid rotation. 
 | String | 
Code sample
The following Python window script demonstrates how to use the GenerateGRGFromPoint function.
import arcpy
arcpy.env.workspace = r"C:/Data.gdb"
arcpy.defense.GenerateGRGFromPoint(r"Points_layer",
                                   r"GenerateGRGFromPoint",
                                   10, 10, 1000, 1000,
                                   "METERS",
                                   "UPPER_LEFT",
                                   "ALPHA_NUMERIC",
                                   "-",
                                   0,"DEGREES")The following example uses the GenerateGRGFromPoint 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 the needed airport from airports layer
airports = "Airports"
whereClause = "airport_code = 'CLT'"
clt_layer = arcpy.management.SelectLayerByAttribute(airports,
                                                    "NEW_SELECTION",
                                                    whereClause)
# Create GRG
arcpy.defense.GenerateGRGFromPoint(clt_layer,"GenerateGRGFromPoint",
                                   10, 10, 1000, 1000,
                                   "METERS",
                                   "UPPER_LEFT",
                                   "ALPHA_NUMERIC",
                                   "-",
                                   0, "DEGREES")Environments
Licensing information
- Basic: No
- Standard: No
- Advanced: Yes