I would like to just run supervised classification on my area of interest (all along the coastlines) and would like to know how to do this in ArcMap. I have created a polygon to mask out the area out of interest, but I don't know how to replace the values of the pixels of the mask to 0 and to one outside the mask. Is there a way for me to do this and just do supervised classification of the land use along the coast?

  • The mask should be a raster? If so, add a field to your polygons, calculate as 0 and 1 using Field Calculator. Convert to raster using Polygon to Raster – BERA Jun 7 at 12:38
  • @BERA, thank you so much for your rely. I did convert the polygon to raster earlier but the edges of the coastline got kind of blurry so I wasn't sure if that is normal. I'm sorry, i'm new to using ArcMap, so I'm not sure how to do the calculation as you suggested. Adding a field to polygon refers to the attribute table? – Lavs Jun 7 at 12:51
  • 1
    Maybe you made the pixels to large in the conversion? Yes add the field to the attribute table, select the rows you want to calculate as 0, calculate with Field Calculator, switch the selection and calculate as 1 – BERA Jun 7 at 12:59
  • 1
    @BERA that worked! Thank you very much – Lavs Jun 7 at 15:19
  1. Add a field to your polygon attribute table
  2. Select the features/rows you want to be 0
  3. Calculate as 0 using Field Calculator
  4. Switch selection and calculate as 1
  5. Clear selection and convert to raster using Polygon to Raster tool

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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