Select to view content in your preferred language

Clipping Raster with Vector polygon

634
3
06-27-2011 02:02 AM
Status: Open
Labels (1)
DarrenConnaghan
Occasional Contributor

I wish that when I clip a raster dataset with a vector polygon, I can control what cells are clipped. At present, if the raster dataset to be clipped has cells less than 50% covered by the vector, it is not brought into the resultant output. I wish all cells, regardless of % covered by the vector to be in the output.

cheers
Darren

Tags (2)
3 Comments
SteveLynch

You could use the PolygonToRaster (many different options to decide if the polygon is on a cell or not) tool to create a raster filled with 1 and NoData. Then use ExtractByMask or the Times tool to clip.

nadja
by

@SteveLynch that works with the "Maximum combined area method", even tough I'm not sure I understand exactly how. In the docu is written:

  • Only one feature overlaps the cell, it must overlap by at least 50 percent to be selected.
  • Only one feature has the largest area, then it is selected.

Why does it also work, when a feature covers less than 50% of the raster cell if there is no other feature around? To me the docu suggests, that it should not be selected then either. Thankfully, it is getting selected. 

nadja
by

@SteveLynch We're an umbrella organisation with well over 100 users. the question with clip raster by a feature and include the boder cells in the selection is one of the most often asked questions. of couse, you can use a workaround. But it would be so much user friendlier if esri just included the option "select cell if covered" + "less / less or equal / equal / more or equal / more" + "x%" to the GP tools "Extract by Mask" and "Clip Raster" when the Option "Use Input Features for Clipping Geometry" is activated. 

something similar exist also for "select layer by location" for vectors - here you can choose the "relationship" for the input and selecting feature (see photo: intersect, within distance, contains, completely contains, within, completely within, are identical to, boundary touches, crossed by the outline of, have their center in, etc.) 

2025-04-01_08h55_43.png

 

It's really a common problem and it would be great to be able to solve this problem in one step instead of at least two...