Available with Geostatistical Analyst license.

## Summary

Exports a geostatistical layer to one or multiple rasters.

Learn more about creating a raster from a geostatistical layer

## Usage

The primary purpose of this tool is to be able to export geostatistical layers to multiple different output types. For example, a geostatistical layer made from Empirical Bayesian Kriging can be exported into a prediction raster, standard error raster, quantile raster, and probability raster with a single run of this tool. Prior to the introduction of this tool, to get these four output rasters, you had to run empirical Bayesian kriging four times with different output settings.

Using this tool is the only way to create standard error, quantile, or probability maps from the EBK Regression Prediction tool. To get these outputs, create a geostatistical layer using EBK Regression Prediction, and provide the geostatistical layer as input into this tool.

If the Input geostatistical layer represents an Indicator, Probability, or Disjunctive kriging method, you can only use the threshold value that was used to create the geostatistical layer. For these methods, the semivariogram is calculated for that particular threshold, and it cannot be recalculated for any other threshold value.

## Syntax

GALayerToRasters_ga (in_geostat_layer, out_raster, {output_type}, {quantile_probability_value}, {cell_size}, {points_per_block_horz}, {points_per_block_vert}, {additional_rasters})

Parameter | Explanation | Data Type |

in_geostat_layer | The geostatistical layer to be analyzed. | Geostatistical Layer |

out_raster | The primary output raster to be created. Additional rasters can be created with the Additional output rasters parameter. | Raster Dataset |

output_type (Optional) | The surface type of the output raster. For more information, see What output surface types can the interpolation models generate? - PREDICTION —A raster of predicted values.
- PREDICTION_STANDARD_ERROR —A raster of standard errors of prediction.
- PROBABILITY —A raster predicting the probability that a threshold is exceeded.
- QUANTILE —A raster predicting the quantile of the predicted value.
- STANDARD_ERROR_INDICATORS —A raster of standard errors of indicators.
- CONDITION_NUMBER —A raster showing the condition number for predictions in Local Polynomial Interpolation. The condition number surface indicates the stability of calculations at a particular location. The larger the condition number, the more unstable the prediction, so locations with large condition numbers may be prone to artifacts and erratic predicted values.
| String |

quantile_probability_value (Optional) | If the Output surface type is set to Quantile, use this parameter to enter the requested quantile. If the Output surface type is set to Probability, use this parameter to enter the requested threshold value, then the probability that the threshold is exceeded will be calculated. | Double |

cell_size (Optional) | The cell size of the output rasters. This value will be shared by the Output raster and the Additional output rasters parameters. | Analysis cell size |

points_per_block_horz (Optional) | The number of predictions for each cell in the horizontal direction for block interpolation. | Long |

points_per_block_vert (Optional) | The number of predictions for each cell in the vertical direction for block interpolation. | Long |

additional_rasters [[out_raster, output_type, quantile_probability_value],...] (Optional) | Provide the name, output type, and quantile or probability value for each additional output raster. See the descriptions of parameters above for more information. These additional rasters will be saved in the same location as the Output raster. | Value Table |

## Code sample

##### GALayerToRasters example 1 (Python window)

Convert a geostatistical layer into a raster.

```
import arcpy
arcpy.GALayerToRasters_ga("ebk", "C:/gapyexamples/output/ras_predict",
"PREDICTION", None, "5000", 1, 1, "")
```

##### GALayerToRasters example 2 (stand-alone script)

Convert a geostatistical layer into multiple rasters.

```
# Name: GALayerToRaster_Example_02.py
# Description: Exports a geostatistical layer to a
# - prediction raster
# - standard error of prediction raster
# - quantile raster
# Requirements: Geostatistical Analyst Extension
# Import system modules
import arcpy
# Set environment settings
arcpy.env.workspace = "C:/gapyexamples/output"
# Set local variables
inLayer = "C:/gapyexamples/data/ebk.lyr"
outPredict = "ras_predict"
cellSize = 5000
cellptsHor = 1
cellptsVer = 1
# Execute GALayerToRasters
arcpy.GALayerToRasters_ga(inLayer, outPredict, "PREDICTION", None, cellSize,
cellptsHor, cellptsVer,
"ras_se PREDICTION_STANDARD_ERROR #;ras_quantile QUANTILE 0.67")
```

## Environments

## Licensing information

- ArcGIS Desktop Basic: Requires Geostatistical Analyst
- ArcGIS Desktop Standard: Requires Geostatistical Analyst
- ArcGIS Desktop Advanced: Requires Geostatistical Analyst