6

Which tool do I use in ArcGIS 10.1 for Desktop to exclude areas covered by vector polygon layers from a raster layer?

I want to keep portions of the raster layers that exclude the portions covered by the vector layer.

1
  • are you trying to do some sort of analysis on this or do you just want to visually hide parts of the raster in your mapping?
    – Zipper1365
    Jun 7, 2019 at 19:03

6 Answers 6

18

Solution for single band raster. Convert polygons to raster. Use raster calculator

Con(IsNull( pgonRaster), sourceRaster)

Update 6 years later:

Select polygon and zoom to raster extent. Go Windows-Image Analysis and select raster of interest. Use Mask tool - second from the left in the image below:

enter image description here

to erase area of the raster inside polygon. In no time it will create required raster that you can save (if necessary!) to disk using floppy disk icon - last one in the image.

2
  • Also make sure that extent of rasterized polygon layer is equal than single band raster
    – aldo_tapia
    Aug 9, 2017 at 15:12
  • @aldo_tapia, you can also just set the processing extent within raster calculator tool to be equal to that of the source raster.
    – Zipper1365
    Jun 7, 2019 at 20:32
5

As far as I know there is no direct way of doing this but alternative to this is given in Erasing polygon from raster. Basically it suggests to create a polygon with a hole which will be used as a mask (to use by Extract by Mask tool). More specifically it says:

  • By using Draw toolbar, create two polygon graphics, one for the overall coverage and the other showing exclusion zone (i.e., hole);
  • The use Graphic Operations from Drawing menu of Draw toolbar to "Remove Overlap"-ping parts;
  • Then convert them to feature(s) by using Convert Graphics to Features from aforementioned menu;
  • Finally apply Spatial Analyst extension's Extract by Mask tool.
0
0

If you're not doing any analysis with the raster after erasing or clipping out the section covered coincident with the polygons you can just cover/hide it by layering it all correctly in your table of contents.

I assume the background color of your dataframe is white (if not, just check what it is in the data frame properties).

Make your polygons white (or whatever other color your dataframe background is) with no border.

Place that white polygon layer above the raster in the table of contents and that portion will appear to be hidden in your map layout.

This does not delete the data as the title of your post request, but the wording of the actual question suggests to me that this still might be a workable solution for your needs. This has the benefit of of visually achieving your goal in teh layout without creating a new dataset to take up room on your drive.

0

After some tests, I conclude that the solution was given by this function:

Con(IsNull("20180204T043933_LA.tif"),
"20180204T043933\VV_VH_kernel.tif",0)

The pixels colored in black are the masked area.

With black color are the values equal to 0, which in fact are masked areas

0

If you have the polygons of your area and unwanted area, use the Erase tool and make a new shapefile in which you have erased unwanted area in vector format, then apply Extract by mask using this new shapefile. before applying Extract By Mask, don't forget to apply Extent and Mask area in Environment setting based on your raster file (I mean 'Processing Extent' and 'Raster Analysis' )

-4

You can use the tool Clip (Data Management) to create a new raster of only the areas that you want. For this to work you need a mask (polygon) of the areas that you want to keep.

In image 1, I have the image that I want to crop and the polygon of the areas that I want to keep.

Image 2 shows the setting of the tool Clip (data management). In order for the tool to use the polygon as a clipping feature, ensure that the check-box "Use Input Features for Clipping Geometry" is checked.

Image 3 shows the new clipped image.

Image 1 enter image description here

Image 2 enter image description here

Image 3 enter image description here

1
  • 7
    In fact the question asks the invert version of what you suggest.
    – fatih_dur
    Jun 17, 2015 at 2:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.