For example, if I have a raster layer of Digital Elevation which represents the United States and I want to keep everything except the state of Texas. I have a vector layer polygon of the state of Texas which I hope can be used to clip or mask or intersect the raster data.
How do I get the raster DEM layer with an area cutout or missing where Texas was?
Solved! Go to Solution.
Here are the steps... Penny Vossler has it correct.
1. Create a vector polygon of the entire US (including Texas).
2. Use the "Erase" tool to clip out (erase) Texas from the US shapefile. Now you will have a polygon of the US with Texas removed.
3. Use the Extract By Mask tool and have the DEM as your input raster and the new vector shapefile of the US (with Texas erased) as the other input.
4. You will now have a DEM with everything but Texas.
I've never clipped a raster with a donut hole but you can clip a raster based on geometry with Clip—Help | ArcGIS for Desktop
I can clip the raster data to get the state of Texas but not the United States without Texas.
keep outside Extract by Polygon—Help | ArcGIS for Desktop
It looks like the Extract by Polygon only accepts X Y coordinates for the Polygon that represents Texas, if I was extracting or masking a rectangle the X Y coordinates would be easy but I'm not sure how to specify a shape as complex and the state of Texas with X Y coordinates.
you may want to see if this works for you Erase but for raster
The solution in the Erase but for raster thread is to use Raster Calculator but as far as I can see the Raster Calculator uses only Raster data and I don't have raster data for the shape that I what to cut out. Maybe I can convert my vector area into raster and then use the Raster Calculator.
Well you could cheat... convert texas to a raster giving it a constant value of zero and setting the extent to be the size of the dem. Convert the nodata area of texas the raster to 1, so you end up with an indicator grid... not-texas = 1, texas = 0 then multiply (Times) the dem by the indicator grid... sounds complicated but is really fast to do
You are right, it sounds very complicated but I'll give it a try.
Have you thought about Clip—Help | ArcGIS for Desktop each state then Make Mosaic Layer—Help | ArcGIS for Desktop them back together minus Texas?