I have a NDVI that I created from a Landsat 5 image. Is there a way to extract all the pixels above a certain threshold and save it as a shapefile? I am trying to create a vegetation mask of sorts to filter out areas in a city that have vegetation, leaving only the structures.


The simplest option would be the use of Raster Calculator with a conditional statement. Your statement may look something like the following with 'threshold' replaced with whatever value you like. The resulting raster will give you pixels with value=1 where values are greater than threshold, and NoData where values are less than threshold.

Con("NDVI_img" >= threshold, 1, "")

You could also do something like the following, which will result in all values greater than threshold retaining original values, where cells less than threshold have NoData.

Con("NDVI_img" >= threshold, "NDVI_img", "")
  • 3
    then you use "feature to raster" and you have your shapefile – radouxju Jan 2 '14 at 19:37

By adding more conditions in the syntax of conditional statement as @Barbarossa nicely explained the answer of what your requirement is, a more evaluation threshold can be added by adding a multiple conditions in this statement. I was to assign the some constant values like 0.99 where NDVI < 0.20, 0.97 where NDVI > 0.5 and between this threshold i had to give another derivative formula in it and I had accomplished it with multiple conditional statement conditional evaluation with Con in ArcGIS raster calculator in ArcGIS raster calculator, a very nice tool.

Con(NDVI < 0.20, 0.97, Con( (NDVI >= 0.2) & (NDVI <= 0.50), 0.004*((NDVI - 0.20)/(0.50-0.20)) ^ 2 + 0.986, 0.99 ) )

If anyone knows about the free tool like in QGIS, or GRASS using map calculator tool. share it how to do it.

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.