2

I am trying to exclude multiple lakes and reservoirs from a Supervised landscape classification but at the moment I have not found a way to do this. So far I have used the following workflows:

1.Draw a polygon -> Clip -> Extract by mask) generates the opposite result.

2.Draw a polygon -> "Raster to Polygon" -> Reclassify -> Set Null, but the reclassification removes RGB symbology

Details:

I am using an Multiband High resolution Raster image I am working on the latest version of ARCmap for Desktop I would like to retain the RGB Composite symbology

enter image description here

0

1 Answer 1

2

The erase affect you are seeking can be achieved with a simple workflow, captured as a model. Inputs are a raster and a polygon featureclass. In my example a single polygon has been selected.

inputs

The model is:

Model

Logic is:

  1. You convert your polygon to a raster dataset with the same cell size of your raster you want to erase from and make sure snap raster environment setting is set. Also ensure processing extent is set to your raster. The result of this will create a new raster the same extent, cell size and alignment as your raster.
  2. Reclassify the rasterized polygon into a 1 for polygon an 0 for nodata to make a raster where all cells are either 1 or 0.
  3. Use the SetNull tool to set the polygon (cells with values of 1) to NODATA and cells with 0 to the raster. The set null tool is set up as:

Set Null tool

The result is a raster where the polygon was is now NODATA.

Result

8
  • Thank you for your answer, I followed the workflow but something is not working. I create a polygon and use that and the original raster for the "polygon-to-raster" step, but the low/high ramp values become zero. Additionally, when I reclassify the data, "polygon" as a valid entry. Any thoughts? - Thank you
    – Max Amaya
    Commented Nov 16, 2020 at 0:43
  • The polygon to raster conversion will create a raster but it's value will come from the field you used, typically the FID or OBJECTID. So if the polygon the FID was zero then the cell values are zero, if it was 123 then the cells are 123, you then reclassify those cells to 1 and what are the surrounding nodata to 0. Also make sure you ensure extent is set, I think I have left that off in the original answer so have updated my answer.
    – Hornbydd
    Commented Nov 16, 2020 at 12:36
  • Looks like that did the trick, but now I have lost the RGB composite symbology option which is important for the supervised landscape analysis that I am trying to do. Is there a way for the new rater to be displayed as RBG composite?
    – Max Amaya
    Commented Nov 17, 2020 at 9:28
  • 1
    I found an alternative that yields the desired results, the workflow is as follows: 1st. Using the Draw Menu create two polygons (one of the total extent of the raster), the second for the area that needs to be excluded. 2nd. Use "Graphics Operations" from the drawing menu and select "Remove Overlap". 3rd. Convert them to features (.shp) using the "convert graphics to features" and lastly 4th. "extract by mask"
    – Max Amaya
    Commented Nov 17, 2020 at 21:31
  • 1
    Excellent, thinking outside the box! Well done, as with most GIS problems there is usually more than one way to do things.
    – Hornbydd
    Commented Nov 17, 2020 at 23:59

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.