davisam1

calculate nearest ag pixel for each urban pixel in a raster

Discussion created by davisam1 on May 5, 2012
Latest reply on May 11, 2012 by davisam1
Hi!
I have a raster (NLCD2006) and I would like to calculate the distance of the nearest pixel of one class from another class. 
I am struggling to think through what would be the best approach. 
I thought about reclassifying all the ag and urban pixels to one, setting the rest to NoData and running the euclidean distance tool but that isn't quite what I want since it might give me the nearest a pixel rather than the urban one. 
Then I thought I could turn the ag pixels to points, same for the urban pixels but in a separate shapefile and then run the near tool but I have too many cells/points for this approach (I'm running this for the entire US for 30 by 30m cells. 
I can't think of another approach? 
Does anyone have any suggestions? 
Any help is greatly appreciated,
Amelie

Outcomes