Combining Raster Datasets

206
1
03-22-2024 03:47 PM
Labels (2)
CollinCampagna
New Contributor

For a school project, I am tasked with classifying open-source images (3 band) based on surface permeability. In order to do so, I have to correct the given imagery for shadows before I classify it. My method is to create a mask where the shadows are NoData, and merge it with an image with a spectrally enhanced image. However, when I merge or mosaic the two images, the resulting image takes on the high values of the spectrally enhanced image. Is there a way to combine the images while maintaining the RGB values for the mask image, and fill the holes with the values of the enhanced image?

Tags (2)
0 Kudos
1 Reply
sbrowneotogo
New Contributor

You can use a combination of the is Null tool and Con to fill NoData values from one raster with values from another. It will look like this:

Is Null, which you run on the mask image, calculates a new raster, with value of 1 meaning it has NoData value, 0 otherwise

The Con function allows you to return a result based on a condition. In this case, the condition is: if the result of the is Null function is 1, return the value from your enhanced image raster, otherwise return the value from your other mask image.

 

0 Kudos