Is there any system for populating the parameters of a MakeValueArray()?
Below... the MakeValueArray() is populated correctly... except for the SemiVariogram properties.
protected override void OnClick()
{
var progDlg = new ProgressDialog("Running Geoprocessing Tool", "Cancel", 100, true);
progDlg.Show();
string inputPointFeatures = @"C:\Temp\Learn.gdb\points";
string zValueField = "zField";
string outputRaster = @"C:\Temp\Learn.gdb\output";
string semiVariogram = "Ordinary Spherical 3 200 100 0";
string outputCellSize = "1";
string krigParameters = "Variable 4 150";
string outputVariance = "";
string tool = "C:\\Program Files\\ArcGIS\\Pro\\Resources\\ArcToolBox\\" +
"toolboxes\\Spatial Analyst Tools.tbx\\" + "Kriging";
var parameters = Geoprocessing.MakeValueArray(inputPointFeatures, zValueField,
outputRaster, semiVariogram, outputCellSize, krigParameters, outputVariance);
Geoprocessing.OpenToolDialog(tool, parameters);
progDlg.Hide();
}
Solved! Go to Solution.
Hi,
Spherical already means Ordinary. Look here:
https://pro.arcgis.com/en/pro-app/latest/tool-reference/spatial-analyst/kriging.htm
You can check all parameters starting that tool directly from ArcGIS Pro. After execution right click in history window and copy python script. It must be like this below:
out_surface_raster = arcpy.sa.Kriging(r"C:\Temp\Learn.gdb\points", "zField", "Spherical 3,000000 200,000000 100,000000 0,000000", 10, "VARIABLE 12", None); out_surface_raster.save(r"C:\Temp\Learn.gdb\output")
Hi,
Spherical already means Ordinary. Look here:
https://pro.arcgis.com/en/pro-app/latest/tool-reference/spatial-analyst/kriging.htm
You can check all parameters starting that tool directly from ArcGIS Pro. After execution right click in history window and copy python script. It must be like this below:
out_surface_raster = arcpy.sa.Kriging(r"C:\Temp\Learn.gdb\points", "zField", "Spherical 3,000000 200,000000 100,000000 0,000000", 10, "VARIABLE 12", None); out_surface_raster.save(r"C:\Temp\Learn.gdb\output")
Thank You... That is exactly the system that I was looking for. It works well.