Select to view content in your preferred language

Automating Inverse Distance Weighting (IDW) in ArcGIS Pro using Python

73
1
3 weeks ago
GIS243
by
New Contributor

Hi everyone,

I am currently using ArcGIS Pro for my project and need to apply the Geostatistical Wizard's Inverse Distance Weighting (IDW) method (images 1 to 3), as shown in the attached images.

To automate this process, I am looking to obtain the corresponding Python code. Unfortunately, I am having trouble finding the specific code for the Geostatistical Wizard - Inverse Distance Weighting.

However, I did manage to find the code for IDW through the Geoprocessing pane (image 4), which outputs the result in raster (.tif) format:

```python
arcpy.ga.IDW(
in_features="Oil_discoveries",
z_field="per5_avg",
out_ga_layer=None,
out_raster=r"E:\OneDrive - Clark University\David 2024\Ramzan_placebo\Oklahoma_basic_GIS\IDW_Test1.tif",
cell_size=1556.17451337674,
power=1,
search_neighborhood="NBRTYPE=Standard S_MAJOR=48000 S_MINOR=48000 ANGLE=0 NBR_MAX=15 NBR_MIN=2 SECTOR_TYPE=ONE_SECTOR",
weight_field=None
)
```

Could anyone assist me in obtaining the Python code for the Geostatistical Wizard's Inverse Distance Weighting method, or guide me on how to script this process to achieve the same results as the wizard?

Thank you in advance for your help!

1.png2.png3.png4.png

0 Kudos
1 Reply
GIS243
by
New Contributor

Hi I have found the following Python Code for Geostatistical Wizard IDW but its not working for me 

https://community.esri.com/t5/python-questions/interpolating-with-idw-geostatistical-analyst/m-p/652...

0 Kudos