GA Layer 3D To NetCDF (Geostatistical Analyst)

Available with Geostatistical Analyst license.

Summary

Exports one or more 3D geostatistical layers created using the Empirical Bayesian Kriging 3D tool to netCDF format (*.nc file). The output file is displayed as a voxel layer in a local scene.

Learn more about voxel layers

Illustration

GA Layer 3D To NetCDF tool illustration
The voxel layer displays the results of a 3D interpolation.

Usage

  • If the tool is run in a local scene with the same horizontal and vertical coordinate systems as the input features, a voxel layer will be added to the scene allowing you to interactively explore the results. You can also add the output netCDF file as a voxel layer using the Make Multidimensional Voxel Layer tool or the Add Multidimensional Voxel Layer dialog box.

    You can convert the output netCDF file to a multidimensional raster using the Copy Raster tool. You can also add it to a map as a feature or raster layer using the Make NetCDF Feature Layer tool or Make NetCDF Raster Layer tool, respectively.

  • All input geostatistical layers must be 3D geostatistical layers created using Empirical Bayesian Kriging 3D.

  • You can choose locations to predict and export in either of the following ways:

    • Predict to 3D gridded points—Predictions will be exported to gridded points in 3D. To use this option, specify 3D gridded points for the Export locations parameter. The X spacing, Y spacing, and Elevation spacing parameters specify the distance between each gridded point in the x, y, and z (elevation) dimensions.
    • Predict to custom 3D locations—Predictions will be exported to custom 3D locations defined by 3D point features. To use this option, specify Custom 3D points for the Export locations parameter, and provide 3D point features in the 3D point locations parameter to specify the locations to predict.
      Tip:

      You can use the Feature To 3D By Attribute tool to create 3D points from 2D points with an elevation field.

  • The default output extent of the output netCDF file is the union of the extents of all input 3D geostatistical layers.

  • The Input study area polygons, Minimum elevation clipping raster, and Maximum elevation clipping raster parameters can be used to limit the analysis within a specific study area and between two elevation surfaces. Any voxels outside these bounds will have no value and will not display. For example, if the points are located within a marine preserve, you can create a voxel layer that displays only within a polygon of the preserve (study area), above the ocean floor (minimum elevation raster), and below the thermocline (maximum elevation raster).

    There are various considerations for using elevation surfaces as minimum or maximum elevation rasters. Image services, web elevation layers, and web imagery layers will have the slowest performance and errors may occur for large numbers of queries. Rasters saved as local files on disk will have the fastest performance and are recommended when creating high-resolution voxel layers over large spatial extents.

  • When laying out the 3D grid of points that will represent the voxels, the first point is created at the minimum x-, minimum y-, and minimum z-coordinate of the output extent (by default, the extent of the input features). The remaining points are created by iterating the X spacing, Y spacing, and Elevation spacing parameter distances through the dimensions of the output extent. If any of the spacing distances do not evenly divide the corresponding dimension of the output extent, one row or column of points will be created beyond the output extent. For example, if the output extent for x is specified as 0 through 10 and the X spacing parameter is specified as 3, the output will have five rows in the x-extent: 0, 3, 6, 9, and 12. Similarly, an additional row or column of points will be created if the spacing distances do not evenly divide the y- or z-extents.

  • The minimum and maximum elevation clipping rasters must be in a projected coordinate system. If the points or rasters have a geographic coordinate system with latitude and longitude coordinates, they must be projected to a projected coordinate system using the Project or Project Raster tool.

  • If input study area polygons are provided, the extent of the study area will be used as the default output extent, and the X spacing and Y spacing parameter values will recalculate based on this extent. This ensures that the output will fill the entirety of the study area by default.

Parameters

LabelExplanationData Type
Input 3D geostatistical layers

The 3D geostatistical layers that will be exported to an output netCDF file.

Geostatistical Layer
Output netCDF file

The output netCDF file containing the exported values from the input geostatistical layers. The results of each geostatistical layer are saved as different variables in the netCDF file.

File
Export locations
(Optional)

Specifies the locations to export from the Input 3D geostatistical layers parameter value. If you choose the 3D gridded points option, you must provide values for the X spacing, Y spacing, and Elevation spacing parameters that represent the distance between each gridded point in all dimensions. If you choose the Custom 3D points option, you must provide 3D point features in the 3D point locations parameter representing the locations to export.

  • 3D gridded pointsPrediction locations are 3D gridded points. This is the default.
  • Custom 3D pointsPrediction locations are defined by custom 3D point features.
String
X spacing
(Optional)

The spacing between each gridded point in the x-dimension. The default value creates 40 points along the output x-extent.

Linear Unit
Y spacing
(Optional)

The spacing between each gridded point in the y-dimension. The default value creates 40 points along the output y-extent.

Linear Unit
Elevation spacing
(Optional)

The spacing between each gridded point in the elevation (z) dimension. The default value creates 40 points along the output z-extent.

Linear Unit
3D point locations
(Optional)

The 3D point features representing locations to export. The point features must have their elevations stored in the Shape.Z geometry attribute.

Feature Layer
Output variables
(Optional)

Specifies the output types for the Input 3D geostatistical layers values. You can specify one or more output types for each of the layers or you can apply an output type to all input geostatistical layers. By default, the predictions for all layers will be exported.

To export other output types, specify the layer to export (or choose All to specify all layers) in the first entry of the value table. Specify the output type in the second entry of the value table. If you choose Probability or Quantile as the output type, specify the threshold value (for probability) or the quantile value (for quantile) in the third entry of the value table. If you choose Prediction or Prediction standard error as the output type, you can leave the third entry in the value table empty.

Learn more about geostatistical output types

Value Table
Input study area polygons
(Optional)

The polygon features that represent the study area. Only points that are within the study area are saved in the output netCDF file. When visualized as a voxel layer, only voxels within the study area will display in the scene. Points are determined to be inside or outside the study area using only their x- and y-coordinates.

Feature Layer
Minimum elevation clipping raster
(Optional)

The elevation raster that will be used to clip the bottom of the voxel layer. Only voxels above this elevation raster will be assigned predictions. For example, if you use a ground elevation raster, the voxel layer will only display above the ground. It can also be used for bedrock surfaces or the bottom of a shale deposit.

The raster must be in a projected coordinate system, and the elevation values must be in the same unit as the vertical unit of the raster.

Raster Layer
Maximum elevation clipping raster
(Optional)

The elevation raster that will be used to clip the top of the voxel layer. Only voxels below this elevation raster will be assigned predictions. For example, if you use a ground elevation raster, the voxel layer will only display below the ground. It can also be used to clip voxels to the top of a restricted airspace.

The raster must be in a projected coordinate system, and the elevation values must be in the same unit as the vertical unit of the raster.

Raster Layer

Derived Output

LabelExplanationData Type
Output voxel layer

A voxel layer of the predicted values.

Voxel Layer

arcpy.ga.GALayer3DToNetCDF(in_3d_geostat_layers, out_netcdf_file, {export_locations}, {x_spacing}, {y_spacing}, {elevation_spacing}, {in_points_3d}, {output_variables}, {in_study_area}, {min_elev_raster}, {max_elev_raster})
NameExplanationData Type
in_3d_geostat_layers
[in_3d_geostat_layers,...]

The 3D geostatistical layers that will be exported to an output netCDF file.

Geostatistical Layer
out_netcdf_file

The output netCDF file containing the exported values from the input geostatistical layers. The results of each geostatistical layer are saved as different variables in the netCDF file.

File
export_locations
(Optional)

Specifies the locations to export from the in_3d_geostat_layers parameter value. If you choose the 3D_GRIDDED_POINTS option, you must provide values for the x_spacing, u_spacing, and elevation_spacing parameters that represent the distance between each gridded point in all dimensions. If you choose the CUSTOM_3D_POINTS option, you must provide 3D point features in the in_points_3d parameter representing the locations to export.

  • 3D_GRIDDED_POINTSPrediction locations are 3D gridded points. This is the default.
  • CUSTOM_3D_POINTSPrediction locations are defined by custom 3D point features.
String
x_spacing
(Optional)

The spacing between each gridded point in the x-dimension. The default value creates 40 points along the output x-extent.

Linear Unit
y_spacing
(Optional)

The spacing between each gridded point in the y-dimension. The default value creates 40 points along the output y-extent.

Linear Unit
elevation_spacing
(Optional)

The spacing between each gridded point in the elevation (z) dimension. The default value creates 40 points along the output z-extent.

Linear Unit
in_points_3d
(Optional)

The 3D point features representing locations to export. The point features must have their elevations stored in the Shape.Z geometry attribute.

Feature Layer
output_variables
[[layer_name, output_type, quantile_probability_value],...]
(Optional)

Specifies the output types for the Input 3D geostatistical layers values. You can specify one or more output types for each of the layers or you can apply an output type to all input geostatistical layers. By default, the predictions for all layers will be exported.

To export other output types, specify the layer to export (or choose All to specify all layers) in the first entry of the value table. Specify the output type in the second entry of the value table. If you choose Probability or Quantile as the output type, specify the threshold value (for probability) or the quantile value (for quantile) in the third entry of the value table. If you choose Prediction or Prediction standard error as the output type, you can leave the third entry in the value table empty.

Learn more about geostatistical output types

Value Table
in_study_area
(Optional)

The polygon features that represent the study area. Only points that are within the study area are saved in the output netCDF file. When visualized as a voxel layer, only voxels within the study area will display in the scene. Points are determined to be inside or outside the study area using only their x- and y-coordinates.

Feature Layer
min_elev_raster
(Optional)

The elevation raster that will be used to clip the bottom of the voxel layer. Only voxels above this elevation raster will be assigned predictions. For example, if you use a ground elevation raster, the voxel layer will only display above the ground. It can also be used for bedrock surfaces or the bottom of a shale deposit.

The raster must be in a projected coordinate system, and the elevation values must be in the same unit as the vertical unit of the raster.

Raster Layer
max_elev_raster
(Optional)

The elevation raster that will be used to clip the top of the voxel layer. Only voxels below this elevation raster will be assigned predictions. For example, if you use a ground elevation raster, the voxel layer will only display below the ground. It can also be used to clip voxels to the top of a restricted airspace.

The raster must be in a projected coordinate system, and the elevation values must be in the same unit as the vertical unit of the raster.

Raster Layer

Derived Output

NameExplanationData Type
out_voxel_layer

A voxel layer of the predicted values.

Voxel Layer

Code sample

GALayer3DToNetCDF example 1 (Python window)

Interpolate 3D points twice and convert the outputs to a multivariate netCDF file.

import arcpy
arcpy.ga.EmpiricalBayesianKriging3D("my3DPoints1", "Shape.Z",
                                    "myValueField1", "my3DGALayer1")
arcpy.ga.EmpiricalBayesianKriging3D("my3DPoints2", "Shape.Z",
                                    "myValueField2", "my3DGALayer2")
arcpy.ga.GALayer3DToNetCDF("my3DGALayer1;my3DGALayer2", "outputNCDF.nc",
                           "3D_GRIDDED_POINTS", "50 Meters", "50 Meters", "5 Meters",
                           "", "<ALL> PREDICTION #")
GALayer3DToNetCDF example 2 (stand-alone script)

Interpolate 3D points twice and convert the outputs to a multivariate netCDF file. Export to gridded and custom 3D points.

# Name: GALayer3DToNetCDF_Example_02.py
# Description: Interpolates 3D points and exports to a netCDF file.
# Requirements: Geostatistical Analyst Extension
# Author: Esri

# Import system modules
import arcpy

# Allow overwriting output
arcpy.env.overwriteOutput = True

# Set up variables
in3DPoints1 = "C:/gapydata/inputs.gdb/my3DPoints1"
in3DPoints2 = "C:/gapydata/inputs.gdb/my3DPoints2"
elevationField1 = "Shape.Z"
elevationField2 = "Shape.Z"
valueField1 = "myValueField1"
valueField2 = "myValueField2"
outGALayer1 = "myGALayer1"
outGALayer2 = "myGALayer2"


# Check out the ArcGIS Geostatistical Analyst extension license
arcpy.CheckOutExtension("GeoStats")

# Execute Empirical Bayesian Kriging 3D twice
arcpy.ga.EmpiricalBayesianKriging3D(in3DPoints1, elevationField1, valueField1, outGALayer1)
arcpy.ga.EmpiricalBayesianKriging3D(in3DPoints2, elevationField2, valueField2, outGALayer2)


# Export predictions for first model and probability that second model exceeds 10
# Export to gridded 3D points

# Set up variables
in_3d_ga_layers = outGALayer1+";"+outGALayer2
out_ncdf = "C:/gapydata/outputs/outputNetCDF1.nc"
export_locations = "3D_GRIDDED_POINTS"
x_spacing = "50 Meters"
y_spacing = "50 Meters"
elev_spacing = "5 Meters"
custom_points = ""
out_vars = "myGALayer1 PREDICTION #;myGALayer2 PROBABILITY 10"

# Run tool.
arcpy.ga.GALayer3DToNetCDF(in_3d_ga_layers, out_ncdf, export_locations,
                           x_spacing, y_spacing, elev_spacing, custom_points, out_vars)


# Export standard errors for first model and 75th quantile for second model
# Export to custom 3D points

# Set up variables
in_3d_ga_layers = outGALayer1+";"+outGALayer2
out_ncdf = "C:/gapydata/outputs/outputNetCDF2.nc"
export_locations = "CUSTOM_3D_POINTS"
x_spacing = ""
y_spacing = ""
elev_spacing = ""
custom_points = "C:/gapydata/inputs.gdb/myCustom3DPoints"
out_vars = "myGALayer1 PREDICTION_STANDARD_ERROR #;myGALayer2 QUANTILE 0.75"

# Run tool.
arcpy.ga.GALayer3DToNetCDF(in_3d_ga_layers, out_ncdf, export_locations,
                           x_spacing, y_spacing, elev_spacing, custom_points, out_vars)

Licensing information

  • Basic: Requires Geostatistical Analyst
  • Standard: Requires Geostatistical Analyst
  • Advanced: Requires Geostatistical Analyst

Related topics