I extracted the middle and high vegetation points from a lidar-point cloud and converted the points into two separate rasters (one for the high vegetation in dark green and one for the middle vegetation in light green). There are many areas where the raster of the middle vegetation overlays with the high vegetation, so I wanted to subtract the high vegetation raster from the middle vegetation raster to get the "true shrub vegetation". To do so, I first created the "Boolean AND" from both raster to get the pixels where both rasters overlay (see blue pixels).

enter image description here

I thought I could just subtract the "high_mid_veg_boolean" from the "mid_veg_to_raster" within the raster calculator, but this only generates the boolean raster again (?).

enter image description here

I also tried to do it with a condition, where all pixels from the "mid_veg_to_raster" that have the value 4 should stay 4 and where all values from the "high_mid_veg_boolean" that have the value 1 should stay 1 (to generate a raster with 2 values(4,1)). But this also only generates the "Boolean AND" raster again.

enter image description here

I really don't know what I'm doing wrong, it seems like such an easy task in general. But it just does not work.

Is there a way to set all pixels from the "mid_veg_to_raster" that overlay with the "high_veg_to_raster" to NULL, or to delete them from the raster?

  • 1
    Could you please edit your post to include the precise commands you used in the raster calculator?
    – Aaron
    Feb 15, 2022 at 16:09
  • have you tried the overlay-tool? desktop.arcgis.com/de/arcmap/10.3/analyze/commonly-used-tools/…
    – soph
    Feb 15, 2022 at 16:40
  • Hey Thank you soph, but the overlay tool only works for vector data.
    – Radde1683
    Feb 15, 2022 at 17:12
  • actually it should also work with raster data
    – soph
    Feb 15, 2022 at 17:21
  • Sorry, you were right! Zonal Statistic, Combine, Weighted Overlay and Weighted Sum work for raster data. But unfortunately none of these functions work here. I can't even create a raster with the bands of both rasters. The definition of the combine tool is: "Assigns a value to each cell in the output layer based on unique combinations of values from several input layers." But when I try it with both rasters ("mid_veg_to_raste" & "high_mid_veg_boolean") I only get the "high_mid_veg_boolean" back (one band raster with value 1). I really don't understand the problem.
    – Radde1683
    Feb 16, 2022 at 8:41

2 Answers 2


You can use RasterCalculator as you did. You may try

  1. inverse your "high_mid_veg_boolean" with raster calculatord (1 to 0 / 0 to 1) as "low_veg_boolean"
  2. Use raster calculator "mid_veg_to_raster" * "low_veg_boolean" so all non low veg becomes 0
  • Thank you for your answer! But unfortunately this doesn't work because all rasters are one band rasters and not binary rasters. So I can't inverse them. Maybe I could do some step arounds by generating the minimum bounding box of the raster.
    – Radde1683
    Feb 16, 2022 at 8:22

I found a way to make it work:

The problem is that the rasters are not binary rasters but single band rasters. To change that, all values in the raster that were null had to be given the value 0 in the raster calculator:

# for the high vegetation
# for the mid vegetation

Then the raster could just be subtracted from each other:

"mid_veg_to_raster_binary" - "high_veg_to_raster_binary"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.