Label | Explanation | Data Type |
Input geostatistical layer | The geostatistical layer to be analyzed. | Geostatistical Layer |
Output surface raster | The raster to be created. | Raster Dataset |
Output cell size (Optional) | The cell size at which the output raster will be created. This value can be explicitly set in the Environments by the Cell Size parameter. If not set, it is the shorter of the width or the height of the extent of the input point features, in the input spatial reference, divided by 250. | Analysis Cell Size |
Number of points in the cell (horizontal) (Optional) | The number of predictions for each cell in the horizontal direction for block interpolation. The default is 1. | Long |
Number of points in the cell (vertical) (Optional) | The number of predictions for each cell in the vertical direction for block interpolation. The default is 1. | Long |
Available with Geostatistical Analyst license.
Summary
Exports a Geostatistical layer to a raster.
Learn more about the fundamentals of creating a raster from a geostatistical layer
Usage
Select the number of predictions to make for each cell in the horizontal and vertical directions. The value assigned to each output raster cell will be the average of all predictions in that cell.
The GA Layer To Rasters tool can also be used to export a geostatistical layer to one or multiple rasters.
The name you give to the output raster determines the format in which it is created. When not saving to a geodatabase, specify an extension of .tif for a TIFF raster format, .img for ERDAS IMAGINE format, or no extension for an Esri Grid raster format.
Parameters
arcpy.ga.GALayerToGrid(in_geostat_layer, out_surface_grid, {cell_size}, {points_per_block_horz}, {points_per_block_vert})
Name | Explanation | Data Type |
in_geostat_layer | The geostatistical layer to be analyzed. | Geostatistical Layer |
out_surface_grid | The raster to be created. | Raster Dataset |
cell_size (Optional) | The cell size at which the output raster will be created. This value can be explicitly set in the Environments by the Cell Size parameter. If not set, it is the shorter of the width or the height of the extent of the input point features, in the input spatial reference, divided by 250. | Analysis Cell Size |
points_per_block_horz (Optional) | The number of predictions for each cell in the horizontal direction for block interpolation. The default is 1. | Long |
points_per_block_vert (Optional) | The number of predictions for each cell in the vertical direction for block interpolation. The default is 1. | Long |
Code sample
Convert a geostatistical layer to a raster.
import arcpy
from arcpy import env
arcpy.GALayerToGrid_ga("C:/gapyexamples/data/kriging.lyr",
"C:/gapyexamples/output/krig_grid", "2000", "1", "1")
Convert a geostatistical layer to a raster.
# Name: GALayerToGrid_Example_02.py
# Description: Exports a geostatistical layer to grid.
# Requirements: Geostatistical Analyst Extension
# Import system modules
import arcpy
# Set environment settings
arcpy.env.workspace = "C:/gapyexamples/data"
# Set local variables
inLayer = "C:/gapyexamples/data/kriging.lyr"
outGrid = "C:/gapyexamples/output/krig_grid"
cellSize = 2000
cellptsHor = 1
cellptsVer = 1
# Execute GALayerToGrid
arcpy.GALayerToGrid_ga(inLayer, outGrid, cellSize, cellptsHor, cellptsVer)
Environments
Licensing information
- Basic: Requires Geostatistical Analyst
- Standard: Requires Geostatistical Analyst
- Advanced: Requires Geostatistical Analyst