i have not yet found a solution for cutting the area of a shapefile out of my raster file.
To be more precise I want to exclude water areas (shapefile) from my study area (raster file) to eliminate wrong classification in those areas in my final result
You could set the water area to null if you have no other null values in the raster
or you could use Combine and assign a particular value to the water area.
The solution will depend on what and how you are doing the classification
Thanks for your response. changing the water value wasnt possible in this case because it was already incorrectly classified as a mix of different classes. With the clipping of the shapefile i wanted to eliminate this error.
The Clip raster function can clip out (mask) the Inside of a raster dataset. (BTW this URL will be out of date when Pro 2.7 help is released, just do a search on `Clip function` if you need to access this link later).
Within the Clip function, set the parameters as follows:
- Raster = navigate or use the drop-down to select your raster
- Clipping Type = Inside (This will mask out features in your raster dataset)
- Clipping Geometry / Raster = your feature class (lakes)
- Use input features for clipping geometry = checked on (so that it only uses the features within your feature class)
Then click `Create new layer` to run the function
Now your raster function layer is ready to use in your analysis and classification
Slight correction, you do not need to persist the file after the Clip Raster function.
You can can use that layer in most raster workflows (including analysis and classification).
(I updated my post above to remove that to not confuse anyone)
I have had some success clipping rasters with vectors using the tools available in a mosaic dataset.
In particular the 'Import Footprint Or Boundary' tool.
If you already have a shapefile defining 'water areas' then you could clip this out from the raster's footprint and then import it back in (joining by a field - I usually choose 'Name').
Before this step you would of course need to add your raster into a mosaic dataset (in a file GDB).
then export out the raw footprints using the 'Copy Features' tool, where in the screenshot below, 'test_md" is the mosaic dataset and '\Footprint' is the footprint of your raster.
Perform desktop clipping or editing functions in arcGIS Pro and import the raster back into the mosaic dataset with the option checked to 'build boundary'.
Also set the default option for clipping the raster to it's footprint and boundary in the Mosaic Dataset Properties (right-click on the mosaic dataset in the file GDB).