1

I am using a raster of land cover (Globcover 2.2, 300 m resolution), which I managed to reclassify (in 2 land cover categories) and clip to my region of interest. I also have a shapefile of the roads within this region of interest. I am interest in areas within 1 km from each side of the road, so I created a buffer of the road layer. I would like a way to combine (or merge, not sure about the terminology) these two so I have a new raster that has the 2 land cover classes and a third class equivalent to the roads. How can I do this?

  • Take a look at the Con (conditional) tool/statement. – Jeffrey Evans Jun 16 '16 at 19:28
2

The Spatial Analyst tool Map Algebra can be used to apply a "conditional" on whether a land-cover cell is within the road buffer area, or not.

I recommend first using Polygon to Raster to create a raster from the road buffer. Be sure to give a consistent cell-size and raster type (integer, preferred for performance.) This will give a black-and-white raster where value 1 is inside the buffer and value 0 is outside.

Next use Map Algebra to compute a new raster which equates to CON(road_buffer_raster, 0, land_cover_raster, road_buffer_raster)

This reads as: If the raster cell is outside the road_buffer_raster, then return the land_cover_raster value, if the cell is inside the road_buffer_raster, then return the value of the road_buffer-raster.

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.