There is a 10 meter resolution land cover raster. An analyst wishes to resample 10 meter raster to 30 meter raster. The analyst selects the Bilinear Resampling technique in the Resample
tool of the Raster Processing toolset of ArcGIS 10.3.
ArcGIS 10.3 help defines the Bilinear Resampling technique as:
Performs a bilinear interpolation and determines the new value of a cell based on a weighted distance average of the four nearest input cell centers. It is useful for continuous data and will cause some smoothing of the data.
A 30 meter output cell will contain nine cells from the input 10 meter raster. The closest input cell center will be the one that perfectly overlaps the output cell center. That leaves three remaining input cell center values for inclusion in the bilinear interpolation. In the resample of 10 m to 30 m there are eight remaining values that are equidistant to the output cell center.
Which 3 values of the 8 equidistant values are utilized to create the output?
Solved! Go to Solution.
The bilinear option will determine the cell values based on a weighted distance of the four nearest input cell centers.
Which is why it is sometimes better use rolling statistics and your own kernel.
I have covered this in a couple of blog posts as well
/blogs/dan_patterson/2016/09/01/blog-template
/blogs/dan_patterson/2018/10/08/generalization-tools-for-rasters
I don't know if it has changed in more recent versions of the software, but in older version of ArcGIS Desktop it appears to be the 4 cell centers in the original raster closest to the cell center output point of the new raster cell. Check out the full explanation and diagram here:
FAQ: How is bilinear interpolation calculated?
Here is the ArcGIS Desktop 10.3 explanation:
Cell size and resampling in analysis—ArcGIS Help | ArcGIS for Desktop
Chris Donohue, GISP
If you are using categorical data, perhaps Nearest Neighbor or even Majority should be your option(s).
Resample—Data Management toolbox | ArcGIS Desktop
You can't interpolate nominal data, because it makes no sense.
Thanks Dan. Per the Resample link you shared above:
"If the center of the pixel in output space falls exactly the same as one of the pixels in the input cells, that particular cell value gets all the weights, thereby causing the output pixel to be the same as the cell center. This will affect the result of bilinear interpolation and cubic convolution."
The 10 meter land cover raster I originally described is actually a numerical relative habitat value score. If bilinear interpolation resampling in arcgis 10.3.1 is the same as ArcGIS Pro, then only the single center cell of nine input 10 meter cells is used in calculating the output 30 meter cell. Can anyone from ESRI confirm that as the case?
A relative habitat value score is at best on an ordinal scale and not continuous data (ie interval or ratio scale data).so bilinear or cubic should be out of the consideration pool.
I would recommend
Aggregate—Help | ArcGIS Desktop
but they don't have a mode (modal class/rank) option which leaves a less useful min or max since I can't remember if median does division for tied ranks
This response is not necessarily about Resampling, however, it is more of a rant about the Sample tool.
Man, I struggled with this one for a while. I rewrote the Spatial Analyst Sample using numpy/gdal.
it was painful cause I was so confused on how arcpy actually interpolates. a few things I found out.
I was very upset cause I had written my own bilinear interpolation based on the actual function, and it kept giving me a different number than ArcGIS. I was sure I had written it correctly. I tried many things, ultimately I used another software called FME (to see if my python was correct) to do a point on raster and they had several options for interpolation.
Lone behold, I found out that arcpy bilinear is not actually a true bilinear rather just an average four including the source cell.
here is what arcpy does with bilinear in the following situations
2. Top left of the raster
3. Top right of the raster
my conclusion is the bilinear in arcpy is not a true bilinear rather an average 4. however what it does do is it takes the three cells as seen in my illustrations.
The bilinear option will determine the cell values based on a weighted distance of the four nearest input cell centers.
Which is why it is sometimes better use rolling statistics and your own kernel.
I have covered this in a couple of blog posts as well
/blogs/dan_patterson/2016/09/01/blog-template
/blogs/dan_patterson/2018/10/08/generalization-tools-for-rasters
Hey Dan,
hope all is well, thank you for sharing your blog posts, I will check them out and comment. I really enjoy this stuff.
yea it takes the weighted distance of the four nearest input cell centers, would you agree though it should not be called bilinear, rather average4 or something along those lines?
pretty interesting topic and not really GIS-related, I wrote my own rolling statistics for interpolating certain aspects of dents on pipeline inspection data and I agree with you 100% it usually is better to just write your own.
Cheers,
Doug
Resampling is usually inappropriate for this use case (down-sampling 10 meter data to 30 meters) -- as data will be dropped/ignored when creating the output raster.
I suggest considering the Aggregate tool.