How do I delete a portion of a raster image using ArcMap?
Attaching the raster image and the portion to delete.
How do I delete a portion of a raster image using ArcMap?
Attaching the raster image and the portion to delete.
The manipulation of raster in ArcMap unfortunately requires additionnal extension (to be bought in addition to ArcMap).
If you are "lucky", you have the ArcScan extension. Then go to the "Raster Cleanup" menu on the ArcScan toolbar > "Start Cleanup" > Raster Painting. Then use the "fill" tool and you are done in one more click.
If you have the more frequent "spatial analyst" extension (required for most raster processing tasks), it is still possible but longer. Draw a vector polygon manually around the portion that you want to delete, convert your feature class to raster, then use Map algebra tool to set a background value to all pixels under the shape of your vector polygon
Con(IsNull("your_polygon_converted_to_raster"), "your_other_raster", "your_background_value")
If your background value is "NoData", then you can simply omit the last part (or use Setnull)
Con(IsNull("your_polygon_converted_to_raster"), "your_other_raster")
You could do this in a couple lines of code with the "raster" package in R. There's a function that will do exactly what you want.
R has a learning curve, but it might be worth it. I personally find all of the tools, add-ons, and menus in ArcMap to be confusing and unwieldy.
To do this, first create a polygon in Arcmap that contains all of the pixels that you want to mask out. A rectangle will do - just make sure it roughly covers the island you're trying to remove, and none of the pixels that you want to keep.
library(raster)
r <- raster("path/to/your/raster")
s <- shapefile("polygon/to/mask.shp")
r <- mask(r,s)
writeRaster(r,"path/to/write/raster.tif", format="GTiff", overwrite=TRUE)
The issue here is that the pixels representing the island fall within the extent of the entire raster, so applying standard find and replace techniques won’t work as it would end up applying it to the entire raster. With this in mind this is how I would do it:
Data Management Tools -> Raster -> Raster Processing -> Clip
: desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/…. – ahmadhanb Feb 8 at 7:01