0

I am trying to add three rasters together. I'm trying to figure out where I am going wrong so I am going to list out what I am doing:

  • I have Raster_1, Raster_2 and Raster_3.
  • Raster_1 and Raster_2 were set to the extent of Raster_3
  • I used the Map Algebra tool to write "Raster_1 + Raster_2 + Raster_3" = Raster_4
  • Raster_4 only has areas where all three previous rasters intersect.
  • I thought that by setting the extent of Raster_1 and Raster_2 to Raster_3 this wouldn't be an issue.
  • I went to check that I had done this correctly but the extents had gone back to their previous extents.
  • I reset Raster_1 and Raster_2 to the extent of Raster_3 but they are not the same. I have no idea why they would not be the same if that's how I am setting them. The setting I am using is:

the rectangular extent of Raster_3

What am I doing wrong?

0

In raster calculations if at least one of your data has no data values, the result will be given a no data, therefore calculation happens only for those cells you have data value in all three rasters. So setting the same extent is not enough.

  1. use the Con((IsNULL(Raster_x),0,RAster_x) raster calculation on all your three rasters in order to change the no data values into a distinct number, I arbitrarily used 0, as you said your next step is to sum the rasters, therefore a cell that is zero won't affect your operation, if you were to multiply the rasters though, 1 would be a better choice. Make sure you set the extent to the largest raster.
  2. Do your raster sum operation
  • One thing to be careful is , you won't be able to tell between the 'zeroes' from your original data and the ones from the new raster operation at step 1 in my answer. The other option is to set a large signed integer for the no data cells at step 1, for example -999999 (This works if all your data is >=0) and to later select all negative cells from the resulting raster after step 2 and add +999999 to them. – yanes Oct 2 '15 at 17:12
  • All of my data is 0.1 to 1. For me to even be evaluating this data, it needs to be at least 0.1. Does this still matter? I'm doing a test run of the above now. – giscard78 Oct 2 '15 at 17:22
  • in that case, setting zero to all your no data will be fine, you'd know any zero in the three rasters means no data after doing step 1. It shouldn't be a problem. – yanes Oct 2 '15 at 17:30
  • 1
    Yes, I will upload screen shots but it will be later on tonight when I have access to imgur. – giscard78 Oct 5 '15 at 18:23
  • 1
    This problem ended up being solved using a tool that counts the overlapping polygons, no conversion to raster required. Just thought I would let you know! Thank you for your help, I appreciate it! – giscard78 Oct 7 '15 at 10:45

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.