Monday, 30 July 2018

ArcGIS Raster Calculator Erase raster from raster


Two rasters




  1. slope (black and white grid with slope values)

  2. rasterized property (red, values do not matter)


I want to erase the red raster from the slope raster enter image description here


I found this thread


https://community.esri.com/thread/190381-how-to-perform-reverse-clip


and they suggested something like this (for my case block is the red raster and buff is the slope)


Con(IsNull("block.tif"),"buff.tif")


this produces the output in the multi colors. But it is not the full erase, part of the buff/slope is missing


I do not want to go the vector conversion route.


Answer needs to use Raster Calculator syntax


enter image description here



Answer



Use the Reclassify tool to turn your red areas into NoData values and the red area NoData values to zeros. Before you do this ensure use the geoprocessing settings to ensure the output from the Reclassify has the same extent at both data sets. Then add the resulting reclassified surface with your slope using the Plus tool.


Con(IsNull("block.tif"), "buff.tif")

No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...