Hello, I have a Kriging layer file, and on this file I tried to use the DensifySamplingNetwork_ga function in Arcpy. But I got an error:
Runtime error Traceback (most recent call last): File "<string>", line 1, in <module> File "d:\arcgis 10.4.1\desktop10.4\arcpy\arcpy\ga.py", line 888, in DensifySamplingNetwork raise e ExecuteError: ERROR 999998: Unexpected Error. Failed to execute (DensifySamplingNetwork).
I just ran the following commands:
import arcpy
arcpy.CheckOutExtension("GeoStats")
arcpy.DensifySamplingNetwork_ga("D:\Kriging\KrigingLayer.lyr", 1, "D:\Kriging\Densify_1_200", "QUARTILE_THRESHOLD_UPPER", 200)
I can succeed on Windows 8 with ArcGIS 10.4.1, but the above error occurs on Windows 7 and 10 with ArcGIS 10.4.1 and 10.6.1, which is confusing. I'm attaching my Kriging layer file below.
Could someone please help me with this issue? Thank you!
Problem solved: it's because the layer file is storing an absolute path to the data. So I cannot directly densify this Kriging layer on another computer. Thanks everyone for replying!
When creating the geostatistical layer, I would suggest that you use a shapefile or a file geodatabase rather than an XY layer. I.e. use the CopyFeatures tool.
And because you are using a non-projected coordinate system means that EBK will use chordal distances.
I don't think it has to do with the source file of the .lyr file, because this densify function can succeed on one computer, meaning the .lyr file is correct and can be accepted.
Because you can repro the problem and we can't we need to try a few things on your side if possible. A geostatistical layer, is basically a set a parameters and a pointer to the input data. It is dynamic in nature and without the data it is broken.
Some questions;
Thanks
-Steve