Output Spatial Grid 1, 2, 3 (Environment setting)
Tools that honor the Output Spatial Grid 1, 2, and 3 environments will create feature classes that have the specified spatial index grids if those feature classes support spatial index grids.
- One to three grids will be created for output feature classes, depending on the type of geodatabase and geometry storage type.
- The first, or lowest, grid level has the smallest cell size.
- If you only want one grid, set all others to zero (0).
- If more than one grid is used, each successive grid must be set at least three times larger than the previous level.
If you are unfamiliar with creating spatial index grids, use the default value provided, as creating a poorly defined grid will increase the time needed to complete a spatial search.
- Output Spatial Grid 1—A numeric value for the grid cell size 1
- Output Spatial Grid 2—A numeric value for the grid cell size 2
- Output Spatial Grid 3—A numeric value for the grid cell size 3
arcpy.env.spatialGrid1 = cellsize_value
arcpy.env.spatialGrid2 = cellsize_value
arcpy.env.spatialGrid3 = cellsize_value
A numeric value for the grid cell size
import arcpy # Set the spatialGrid1, spatialGrid2 and spatialGrid3 environments arcpy.env.spatialGrid1 = 50 arcpy.env.spatialGrid2 = 200 arcpy.env.spatialGrid3 = 0