I have two rasters, one with nodata cells the other is complete.

I am seeking to combine the two rasters. Where there is a nodata cell I would like to use the cell value nearest to the nodata cell, (just like performing a spatial join to closest point only on a continuous surface).

Have looked at zonal, neighborhood statistics but they are not returning the result. The combine tool does, but does not look to the closest cell where there is nodata.

Have searched on this question but can't quite find the solution I seeking.

Using ArcGIS 10.2 for Desktop

  • Each cell has four or eight nearest cells of equal distance. "Spatial join" is a non-sequitur when discussing rasters. It sounds like you want to either "fill" the nodata cells from neighbors (possibly with a filter) or to CONditionally set values from a different raster. Please edit the question to provide a graphic to help explain your exact intended result. – Vince Nov 20 '15 at 11:59
  • typically if you are copying raster values from one raster to the other on a condition that there is no data in the target raster, it won't be a near value, it will just take whatever is overlaying directly on top of your target cell (conditional analysis works through cell by cell overlaying- unless you are explicitly doing a focal,zonal or global analysis). So the near concept is not clear... May be you do not have the same cell cize(res) on both rasters? – yanes Nov 20 '15 at 21:41

If I have understood you correctly, you need to pre-process the raster with the NoData in it to create another raster where NoData is replaced with the nearest its neighbour and then combine the two rasters. To achieve the pre-processing, use the Nibble tool. Your raster with NoData can be its own mask and set the DATA_ONLY attribute. After you have nibbled the NoData, then combine your two rasters.

However, if you are simply trying to replace the NoData values in Raster 'A' with the values from Raster 'B', then use the raster calculator with a conditional statement (see this question).

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.