0

I am attempting to use the IDW (Spatial Analyst) tool in a Python script however I am a bit confused on what to put for the "Cell Size" optional parameter. When using the tool within ArcMap it seems to calculate this variable for you when the input is selected(pictured),however I am unsure if when scripting I would have to calculate it manually or if I leave it blank ArcMap will calculate it when I run the script?

Not sure if it matters but the script is not Stand Alone it will be used as a scripting tool run in ArcMap

Cell Size

2

The default value (as you can see from the description) is somewhat arbitrary. The shorter of the x or y axis (extent) divided by 250 has no real logic as best I can tell. In Python you should set this as a user defined parameter and set the default as what works best for your area / analysis.

  • 1
    Hmmm I wonder if it is truly arbitrary, why would it even do the calculation at all then? – landocalrissian May 15 '14 at 18:35
  • 2
    @ChrisR It's arbitrary only as a decision made by the design team. "In Spatial Analyst we calculate a default cell size that will produce an output raster thats no larger than 250 x 250 columns and rows. You, the user, must decide at what resolution (cell size) you are going to work." From Steve Lynch in this forum thread The point of the default is to prevent immensely large (therefore hard to process) rasters. According to the help, the tool can handle about 45 million points, or a square ~6,700 cells on a side. – Chris W May 15 '14 at 19:13
  • Ok that make sense, +1 for the explanation and link. – landocalrissian May 15 '14 at 19:30
0

After testing and checking the outputs of both the script and the IDW tool they seem similar. When the cell size parameter is left blank like this:

arcpy.gp.Idw_sa(bathypoint, "DEPTH_FT", bathidw5, "", "2", "VARIABLE 12", "")

the cell size of the output is similar to the above example enter image description here

So to answer my question yes the default cell size will be calculated if left blank. However that being said it seems as pointed out in @user27239 answer and @Chris W comment this value is only relevant in that it will be lower than 250 and the proper cell size should be calculated by the user if necessary.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.