This task vectorizes the result of thresholding a raster.
Example
e = ENVI()
File = Filepath('qb_boulder_pan', Subdir=['data'], Root_Dir=e.Root_Dir)
Raster = e.OpenRaster(File)
Task = ENVITask('RasterThresholdToVector')
Task.INPUT_RASTER = Raster
Task.THRESHOLD_MIN = 1000
Task.Execute
DataColl = e.Data
DataColl.Add, Task.OUTPUT_VECTOR
View = e.GetView()
Layer1 = View.CreateLayer(Raster)
Layer2 = View.CreateLayer(Task.OUTPUT_VECTOR)
View.Zoom, /FULL_EXTENT
Syntax
Result = ENVITask('RasterThresholdToVector')
Input parameters (Set, Get): INPUT_RASTER, KERNEL_SIZE, MINIMUM_PIXELS, THRESHOLD_MIN, THRESHOLD_MAX
Output parameters (Get only): OUTPUT_VECTOR
Parameters marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Parameters marked as "Get" are those whose values you can retrieve but not set.
Input Parameters
INPUT_RASTER (required)
Specify a single-band raster to vectorize.
KERNEL_SIZE (optional)
The smooth kernel size, using an odd number (e.g., 3 = 3x3 pixels). If set to 0, no smoothing will be performed. The default is 3.
MINIMUM_PIXELS (optional)
Specify the minimum size in pixels. Regions with fewer pixels than this value will be set to 0. The default is 3.
THRESHOLD_MIN (optional)
Specify a value for the minimum threshold. Pixels lower than this value will be set to 0.
THRESHOLD_MAX (optional)
Specify a value for the maximum threshold. Pixels higher than this value will be set to 0.
OUTPUT_VECTOR_URI (optional)
Specify a string with the fully qualified path and filename for OUTPUT_VECTOR.
Output Parameters
OUTPUT_VECTOR
This is a reference to the output vector.
Methods
Execute
Parameter
ParameterNames
Properties
DESCRIPTION
DISPLAY_NAME
NAME
REVISION
TAGS
Version History
See Also
ENVITask