Hi,
I have used ArcPy to carry out EBK 3D successfully - code provided below.
During this process a geostatistical layer is created; when run from the GIS Pro UI this layer is loaded to the current map and is accessible for future use.
I'm finding that I'm unable to find the geostatistical layer created during EBK3D using ArcPy and once the kernel has restarted (using a Jupyter notebook) the GA layer is no longer available for use in further processing (e.g., export to NetCDF voxel).
Is this the expected behaviour? I'm planning to run EBK3D on a number of input layers and write them to the same NetCDF voxel model. If the GA layers created using ArcPy are 'lost' once the kernel restarts then I will have to do it all in one go which isnt an issue but would be helpful to know.
trial_fcs = [output_gdb+"\\GEN_selected_features",
output_gdb+"\\NTV_selected_features",
output_gdb+"\\STV_selected_features"]
ebk3d_results = {} # Create a dictionary to store ebk3d results
for trial in trial_fcs:
filename = os.path.basename(trial)
last_part = filename.split('.')[0] # Remove extension if present
# Use a unique identifier based on the last_part
unique_identifier = f"ebk3d_{last_part}"
print(f"Starting Empirical Bayesian Kriging 3D (EBK3D) on {last_part}...")
ebk3d_results[unique_identifier] = arcpy.ga.EmpiricalBayesianKriging3D(
in_features=trial,
elevation_field="depth",
value_field="value",
out_ga_layer=f"C:\\Users\\<x.y>\\Documents\\ArcGIS\\Projects\\RVO\\kriging_test\\EBK3D_{last_part}.lyr",
elevation_units="METER",
measurement_error_field=None,
semivariogram_model_type="EXPONENTIAL",
transformation_type="LOGEMPIRICAL",
subset_size=100,
overlap_factor=1,
number_simulations=100,
trend_removal="NONE",
elev_inflation_factor=None,
search_neighborhood="NBRTYPE=Standard3D RADIUS=nan NBR_MAX=2 NBR_MIN=1 SECTOR_TYPE=TWELVE_SECTORS",
output_elevation=None,
output_type="PREDICTION",
quantile_value=0.5,
threshold_type="EXCEED",
probability_threshold=None
)
print(f"EBK3D process completed successfully for {last_part}...")