Tuesday, March 3, 2015
Common question - How to combine raster and vector data and deal with NoData
Here is a hypothetical example and solution. In the picture to the right we've got a habitat model (raster) and buffered roads which are not suitable habitat for our hypothetical species. We wish to combine the two layers to yield a habitat model in which all areas near roads are not suitable habitat (value = 0).
Then use the IsNull tool to convert all areas that are NoData to 1. The IsNull tool is in the Spatial Analyst toolbox and is also available as Map Algebra in the Raster Calculator tool. IsNull is a really simple, but also one of the most powerful tools in ArcMap.
The final result is map that looks like the one below. Areas near roads all have a value set to zero. You can also combine IsNull and Con in raster calculator using the following type of statement: Con(IsNull[Raster],0,[Raster]) or use ModelBuilder to streamline the process.