Combine on two rasters with different cell size

12799
14
07-15-2015 12:54 PM
DitlevReventlow
Occasional Contributor II

Hey everyone.

I have used the tool combine on two datasets that did not have the same spatial resolution. I can see that "Combine" has chosen the bigger cell size as the output raster spatial resolution.

How has combine calculated the output raster value for the raster that had the small cell size? I cant see anything about it in the combine tool help.

Thank you very much.

Best regards

Ditlev Reventlow

0 Kudos
14 Replies
DitlevReventlow
Occasional Contributor II

Thank you for this Dan. I believe I understand the general consequences of increasing or decreasing cell size through resampling.

What I am unsure about is which interpolation/resampling method that "combine" uses? I have tested all the resampling method, except majority, and none of them gave the same results as combine. And this is even though I have adjusted the processing extent and the snap raster that that they fit.

The reason why I havent tested majority is because there is not drawn any raster when I resample with majority. So I cannot check if the pixel values are the same as in the combined dataset.

So what I am unsure about about is why the majority resampling method does not work, and if there is anywhere that I can check how combine resamples?

I know it would be better to do it all over again (resample and then combine) but I dont have time to do this. I just need to know what happened (how information exactly was lost).

0 Kudos
DitlevReventlow
Occasional Contributor II

And if it is possible that combine uses another resampling/interpolation method that is not part of the 4 options in the "resample" tool.

0 Kudos
GabrielUpchurch1
Occasional Contributor III

It appears to be using Nearest Neighbor resampling. I did some testing with data I specifically fabricated for this purpose and that is what my results indicate.  It is grabbing the cell value from the input rasters that is closest to the cell center of the output raster.

DitlevReventlow
Occasional Contributor II

I thought it was very strange that I didn't get the right result when i did nearest neightbour resampling but now I have the solution to the mystery.

It does indeed use nearest, but not in the same way as "resample". Even though the processing extent is entirely the same and I have used snap raster it doesn't perform the operation in the same way in the two case.

Combine selects the pixel above the pixel selected "resample" with nearest neighbour. Furthermore, while resample gives you the precise number, combine rounds down even though it is not correct to do so. This means if the nearest pixel is 17,9, then the new value will be 17.

Very strange indeed. Thank you very much for your help Gabriel in the clarification of this!

DanPatterson_Retired
MVP Emeritus

it probably does truncation rather than rounding since the output of combine has to be an integer AND sequential...rounding could skip classes