I've been tasked with obtaining z-values for a large point set from a 2 m raster, but rather than extracting values directly from the raster, or with bilinear interpolation, I've been asked to use inverse distance weighted interpolation of cell centers in a 5 m radius.
This is beyond the capabilities of the Extract Values to Points tool or Zonal Statistics. As a workaround, I can convert the raster to points, resample to a finer resolution raster using IDW, and then extract values, but this isn't quite true IDW since it's limited to the cell size of the new raster (and by my patience for processing time).
Setting aside the fact that there are better approaches to smoothing elevations from a raster — this is the approach I've been asked to take — I could also script it in python fairly easily, but thought I might be missing something easy?
I have access to 3D Analyst, Spatial Analyst, etc in ArcGIS Desktop 10.3.
Best Answer
I've done some digging, and as far as I can tell there isn't an easy way to accomplish this. I built out a working process in Model Builder and it's quite cumbersome, but it works. I'm sure there are ways to improve this (scripting it would be the best way to go), but for anyone with a similar question, here are the steps in Model Builder:
There are four parameters:
Walking through the model:
def getw(point, grid_x, grid_y): #return idw weighting, defined as 1/d^p maxw = 1000 #increase for very fine grid raster p = %IDW Power% d = math.sqrt(math.pow(grid_x - point.X,2) + math.pow(grid_y - point.Y,2)) if d > 0: w = min(1/math.pow(d, p), maxw) else: w = maxw return w
Because Model Builder is a bit unstable when it comes to field mapping, it helps to set this up with default point and raster fields the first time so it properly propagates field names for all the operations. Again, if you really want to improve stability and speed scripting would be preferable.