How can I use raster calculator to preserve pixels that don't overlap? Only overlapping pixels are in the output.

1230
2
11-14-2022 10:01 PM
cumaso
by
New Contributor

I have a project where I am converting line and polygon feature classes to rasters, then adding the resulting rasters together in raster calculator. Many of the pixels from the original rasters don't overlap each other at all, but some do. I want all of the pixels from all of the rasters to be present in the output, just with no change in their values if they don't overlap.

When I try this with the Raster Calculator or Weighted Sum tools, it only keeps the pixels that overlap each other. Any ideas of a different approach or a different tool? 

Or is there some way to convert features to rasters so I can have a series of rasters that all have the same extent even if the original features don't perfectly overlap? So if I have thin line that crosses a polygon, there would be new pixels surrounding the line with a zero value that I could overlay on the background polygon pixels?

 

0 Kudos
2 Replies
DanPatterson
MVP Esteemed Contributor

Feature to Raster (Conversion)—ArcGIS Pro | Documentation

See the environments section in the above link.  You can specify properties in the tools Environments tab to ensure that you have rasters with the same extent, cell size and alignment to facilitate comparison.

To fix existing rasters, see

Copy Raster (Data Management)—ArcGIS Pro | Documentation

honors raster cell size, alignment and extent parameters

 


... sort of retired...
0 Kudos
cumaso
by
New Contributor

Thank you! Setting the extent in Environments helped. Just in case anyone in the future has this question, the next step I needed to do was use the Reclassify tool to change the value of the NoData pixels to 0.

0 Kudos