This task creates a new shapefile containing only vector records that fall within specified minimum and/or maximum values.

Example


; Start the application
e = ENVI()
 
; Open an input raster
File = Filepath('qb_boulder_msi', ROOT_DIR=e.Root_Dir, $
SUBDIRECTORY=['data'])
Raster = e.OpenRaster(File)
 
; Open an input vector
VectorFile = Filepath('qb_boulder_msi_vectors.shp', $
ROOT_DIR=e.Root_Dir, SUBDIRECTORY=['data'])
Vector = e.OpenVector(VectorFile)
 
; Get the task from the catalog of ENVITasks
Task = ENVITask('FilterVector')
 
; Select task inputs
Task.INPUT_VECTOR = Vector
Task.MINIMUM_VALUE = 10000
Task.MAXIMUM_VALUE = 50000
 
; Run the task
Task.Execute
 
; Add the output to the Data Manager
e.Data.Add, Task.OUTPUT_VECTOR
 
; Display the resulting vector
; over the raster layer
View = e.GetView()
Layer1 = View.CreateLayer(Raster)
Layer2 = View.CreateLayer(Vector)
Layer3 = View.CreateLayer(Task.OUTPUT_VECTOR)

Syntax


Result = ENVITask('FilterVector')

Input parameters (Set, Get): INPUT_VECTOR, MAXIMUM_VALUE, MINIMUM_VALUE, OUTPUT_VECTOR_URI, UNITS

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_VECTOR (required)

Specify an input polyline or polygon ENVIVector.

MAXIMUM_VALUE (optional)

Specify the maximum area (for polygons) or length (for polylines) to consider. Values greater than the maximum will be discarded in the output shapefile. The units depend on the coordinate system of the input vector; however, you can override these units by specifying the UNITS parameter.

MINIMUM_VALUE (optional)

Specify the minimum area (for polygons) or length (for polylines) to consider. Values less than the minimum will be discarded in the output shapefile. The units depend on the coordinate system of the input vector; however, you can override these units by specifying the UNITS parameter.

OUTPUT_VECTOR_URI (optional)

Specify a string with the fully qualified path and filename for OUTPUT_VECTOR.

UNITS (optional)

Specify a string with the units of the minimum and maximum values. The choices are Meters, Kilometers, Feet, US Survey Feet, Yards, Miles, and Nautical Miles.

If you do not specify UNITS, be sure to specify the MINIMUM_VALUE and MAXIMUM_VALUE in the same units of the INPUT_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


ENVI 5.6

Introduced

ENVI 5.6.1

Added UNITS parameter

See Also


ENVITask, SmoothVector Task, VectorRecordsToBoundingBox Task, VectorRecordsToCentroid Task, ReprojectVector Task