In ArcGIS Pro I have two rasters; one is a single value (0) rectangle, one is line based with 2 values (1 and 2). I need to combine them into one raster with all three values. The rectangle represents off-road values and the line based raster represents two types of roads.
Any pointers would be appreciated.
Solved! Go to Solution.
usually
Conditional evaluation with Con—Help | ArcGIS Desktop and perhaps
How to change NoData cells to a value—Help | ArcGIS Desktop
assume you have 'roads' and 'nonroad'. assume that your 'roads' either have a value for the road type surrounded by no data... you could use
Con(IsNull('roads'), 'nonroad', 'road') Do check the exact syntax, but in essence, you want to put/place the nonroad values into the nodata areas of the road raster.
There are other ways, but you should be aware of a few things.
If your rasters both have classes 1, 2, 3... then the above will really foul things up, unless you produce a unique classification scheme...
Perhaps add 10 to the 'road' classes to reclass them to 11, 12 and 13
Con(IsNull('roads'), 'nonroad', 'road' + 10)
You will end up with 1, 2, 3 and 11, 12, 13, representing all the classes in both rasters.
Other approaches are possible, but the above is food for thought.
usually
Conditional evaluation with Con—Help | ArcGIS Desktop and perhaps
How to change NoData cells to a value—Help | ArcGIS Desktop
assume you have 'roads' and 'nonroad'. assume that your 'roads' either have a value for the road type surrounded by no data... you could use
Con(IsNull('roads'), 'nonroad', 'road') Do check the exact syntax, but in essence, you want to put/place the nonroad values into the nodata areas of the road raster.
There are other ways, but you should be aware of a few things.
If your rasters both have classes 1, 2, 3... then the above will really foul things up, unless you produce a unique classification scheme...
Perhaps add 10 to the 'road' classes to reclass them to 11, 12 and 13
Con(IsNull('roads'), 'nonroad', 'road' + 10)
You will end up with 1, 2, 3 and 11, 12, 13, representing all the classes in both rasters.
Other approaches are possible, but the above is food for thought.
You might be able to combine them together with the Raster Calculator in ArcGIS Pro. [raster1 + raster2 = raster3] It helps that one raster has a value of zero, then it won't change the cells that have a 1 or 2 from the other raster once they are combined. Here is a video that explains it.