clip hole in raster

15412
31
Jump to solution
02-08-2016 07:00 AM
RickCheney
Occasional Contributor III

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?

0 Kudos
1 Solution

Accepted Solutions
IanHageman
New Contributor

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.

View solution in original post

31 Replies
WesMiller
Regular Contributor III

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

RickCheney
Occasional Contributor III

I can clip the raster data to get the state of Texas but not the United States without Texas.

0 Kudos
RickCheney
Occasional Contributor III

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.

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

you may want to see if this works for you Erase but for raster

RickCheney
Occasional Contributor III

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.

0 Kudos
DanPatterson_Retired
MVP Emeritus

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

RickCheney
Occasional Contributor III

You are right, it sounds very complicated but I'll give it a try.

0 Kudos
WesMiller
Regular Contributor III

Have you thought about Clip—Help | ArcGIS for Desktop  each state then Make Mosaic Layer—Help | ArcGIS for Desktop  them back together minus Texas?