1

In ArcGIS 10.1 (advanced license) I have a slope raster, and a raster representing a road network. In the road raster, each pixel is given value 0.5, and the areas outside roads are set to NoData. Now, for some purposes I have to accomplish, I need to half the slope value in those cells that fall within roads. I cannot multiply SLOPE by ROAD rasters because I would end up with NoData in those areas outside the roads.

How can I keep the slope value unchanged for the cells outside the roads?

  • 2
    Raster calculator Con(isnull(road),slope, slope/2) – FelixIP Jan 24 '17 at 4:58
  • Upon further thought, @FelixIP suggestion proves to be the more straightforward. Thank you. – NewAtGis Feb 13 '17 at 12:57
  • @FelixIP Great solution. Please consider adding this as an answer. – Aaron Feb 13 '17 at 13:16
2

I suggest using raster calculator expression:

Con(IsNull("roads"),"Slope","Slope"/2)

In general Con() is a great way to merge/mosaic 2 single band rasters, providing their extents are identical.

2

My solution has two steps:

  1. Multiply SLOPE by ROAD in raster calculator. You're right you get only small part of your data, but here we can go to step 2.

  2. Use mosaic to new raster, input your slope raster and raster created in step 1. In Mosaic Operator field choose last (if you input first slope raster) and hit ok.

That tool'll create new raster, which has values from raster created in step 1 in overlapping areas and from slope raster in other places.

  • Thank you @ami. It worked, except that after having entered the files in that order (SLOPE first, and ROAD second) I had to select LAST in the "mosaic to new raster". – NewAtGis Jan 23 '17 at 13:54
  • @NewAtGis Yeah, my fault, sorry ;) (I've edited the answer) – ami Jan 23 '17 at 14:06
  • 1
    You're welcome. Thanks for your useful suggestion. – NewAtGis Jan 23 '17 at 14:06

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.