This task performs raster classification based on Forest Cover Index.
For additional details on forest cover classification, see Forest Cover Classification.
Example
e = ENVI()
File = FILEPATH('AVIRISReflectanceSubset.dat', $
SUBDIRECTORY=['data', 'hyperspectral'], $
ROOT_DIR=e.ROOT_DIR)
Raster = e.OpenRaster(File)
Task = ENVITask('ForestCoverClassification')
Task.INPUT_RASTER = Raster
Task.Execute
DataColl = e.Data
DataColl.Add, Task.OUTPUT_RASTER
View = e.GetView()
Layer = View.CreateLayer(Task.OUTPUT_RASTER)
Syntax
Result = ENVITask('ForestCoverClassification')
Input properties (Set, Get): CLASS_COLOR, DO_CLUMP, DO_SIEVE, FCI_THRESH, INPUT_RASTER, NDVI_MIN, OUTPUT_URI, USE_NDVI
Output properties (Get only): OUTPUT_RASTER
Properties marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Properties marked as "Get" are those whose values you can retrieve but not set.
Methods
This task inherits the following methods from ENVITask:
AddParameter
Execute
Parameter
ParameterNames
RemoveParameter
Properties
This task inherits the following properties from ENVITask:
COMMUTE_ON_DOWNSAMPLE
COMMUTE_ON_SUBSET
DESCRIPTION
DISPLAY_NAME
NAME
REVISION
TAGS
This task also contains the following properties:
CLASS_COLOR (optional)
Specify the RGB triplet of the output forest class. The default value is [0,127,0] (green).
DO_CLUMP (optional)
Specify whether to perform clumping on the classification image. The default value is 1.
DO_SIEVE (optional)
Specify whether to apply sieving to the classification image. The default value is 1.
FCI_THRESH (optional)
Specify the maximum forest cover index (FCI) value to use for thresholding. The FCI value must be between 0 and 1. The default value is 0.1.
INPUT_RASTER (required)
Specify a multispectral or hyperspectral reflectance raster to perform forest cover classification. The raster must contain wavelengths and a Red and either a Red Edge or NIR band.
NDVI_MIN (optional)
Specify the minimum NDVI value that will be used to threshold the output if the USE_NDVI parameter is set. The value must be between -1 and 1. The default value is 0.4.
OUTPUT_RASTER
This is a reference to the output raster of filetype ENVI.
OUTPUT_URI (optional)
Specify a string with the fully qualified filename and path of the associated OUTPUT_RASTER. If you do not specify this property, or set it to an exclamation symbol (!), a temporary file will be created.
USE_NDVI (optional)
Specify whether to threshold the output based on the NDVI value of the pixel. If set, the raster must contain a NIR band. The default value is 1.
Version History
API Version
4.3
See Also
ENVITask