VECSEL

Vector selection and subsetting


EnvironmentsPYTHON :: EASI :: MODELER
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Examples :: Related

Back to top

Description


VECSEL selects vectors in a defined window, one or more ranges of attributes, or both, to produce a new vector layer. You can also run VECSEL to perform vector thinning on the output vectors.
Note: VECSEL does not support topological polygon layers as input. You can convert topological polygons into whole polygons by using TPOLY2POLY.
Back to top

Parameters


Name Type Caption Length Value range
FILI * String Input file name 1 - 192  
DBVS * Integer Input vector segment 1 - 1  
FILO * String Output file name 1 - 192  
INCLUS String Inclusive operation 0 - 3 Yes | No
Default: Yes
USEGEO String Use georeferencing bounds 0 - 3 On | Off
Default: Off
DBVW Float Database vector window 0 - 4 X-offset, y-offset, x-size, y-size
ATTRNG Float List of attribute ranges 0 - 48  
THIN Float Percentage of vector thinning 0 - 1 0.0 - 100.0
DBSN String Name of output segment 0 - 8  
DBSD String Description of output segment 0 - 64  
FLDNME String Field name for range selection 0 - 64  
FTYPE String Output file type 0 - 4 Default: PIX
FOPTIONS String Output file options 0 - 192  
REPORT String Report mode 0 - 192 Quick links
MONITOR String Monitor mode 0 - 3 ON, OFF
Default: ON

* Required parameter
Back to top

Parameter descriptions

FILI

The name of the input file containing the vector segment to process.

DBVS

The vector segment to process.

FILO

The name of the file to which to write the output data.

If the file does not exist already, a new file is created based on the values specified for the FTYPE and FOPTIONS parameters. If the file exists already, its format must allow the file to be updated. A new vector segment will be appended to the existing file.

When your output file exists already, you need not specify a value for the FTYPE and FOPTIONS parameters.

The output file can be the same as the input file, provided that the input file meets the preceding criteria.

INCLUS

Whether or not the vector selection is inclusive.

You can choose from the following options:

USEGEO

Whether to use the bounds specified in the georeferencing segment of the input file as the clip window.

You can choose from the following options:

DBVW

The vector window (x-offset, y-offset, x-size, y-size) in which to clip the vectors.

If no value is specified for this parameter, the entire channel is used by default. Window units are expressed according to the units defined in the input vector segment (for example, METER or UTM). The x-offset and y-offset define the upper-left starting point of the window. X-size defines the window width and y-size defines the window height. You must specify all four values.

Note: X-size and y-size can be negative values. This is important when processing projection or LAT/LONG vectors.

If On is specified for the USEGEO parameter, this parameter is ignored.

This parameter is optional.

ATTRNG

The ranges of attributes for selection of the input vector data.

You specify ranges in pairs of values. In each pair, the first value defines the start of the range and the second value defines the end of the range. If you specify an odd number of values, the last value is used as a range of one value.

You can specify a range as follows:
For example, suppose you specify attribute ranges as follows:
ATTRNG=1,1,20,31.7,41.3
With the parameter value specified as such, vectors and points with an attribute value of 1 (a range of 1 to 1), or in the range of 20 to 31.7, or a value of 41.3 (a range of 41.3 to 41.3) are selected.
Note: You can specify up to a maximum of eight pairs.

This parameter is optional.

THIN

The percentage of vector data to drop, or thin. This is useful for reducing the number of vertices in the vector set. You can specify the value in a range from 0 through 99.9. By default, no thinning is applied, which retains all of the data.

For more information, see Vector thinning.

Note: The percentage of thinning you specify is a goal. The actual amount thinned is reported after processing by VECSEL is complete.

This parameter is optional.

DBSN

The name of the new vector segment.

If no value is specified for this parameter, VECSEL uses the name of the input vector segment and copies it to the output.

This parameter is optional.

DBSD

The contents or origins of the new vector data.

If no value is specified for this parameter, VECSEL uses the description of the input vector segment and copies it to the output.

This parameter is optional.

FLDNME

The field name to use for range selection.

You must specify a value for this parameter to select values based on attributes. In addition to any existing numeric attribute, a special value, ShapeID, is also supported.

The names are not case-sensitive.

For example, suppose you specify the FLDNME and ATTRNG parameters as follows:

With the parameters specified as such, VECSEL selects all the vectors having a value of 100 to 1000 in the field named "Elevation".

This parameter is optional.

FTYPE

The format of the output file. The format type must be a GDB-recognized file type.

If you specified an existing file as the output file, do not specify a value for this parameter. The file will be updated by VECSEL without changing its type.

Supported file formats include, among others:

The default value is PIX.

For a complete list of GDB-recognized file types, see GDB-supported file formats

This parameter is optional.

FOPTIONS

The file-creation options to apply on creating the output file. These are specific to the format of the file. In each case, the default of no options is allowed. You can specify the compression schemes, file-format subtypes, and other information.

If you specified an existing file as the output file, do not specify a value for this parameter. The file will be updated by VECSEL without changing its type.

For a complete list of GDB-recognized file types, including the options available for each, see GDB-supported file formats

This parameter is optional.

REPORT

Specifies where to direct the generated report.

Available options are:

MONITOR

The program progress can be monitored by printing the percentage of processing completed. A system parameter, MONITOR, controls this activity.

Available options are:

Back to top

Details

VECSEL extracts vectors from an existing vector segment, as specified by a window, one or more ranges of attributes, or both. The vectors are extracted as output to a new vector segment. No changes are made to the input vector segment. You can use VECSEL to split up imported vector data that may be too large for other vector functions. You can also perform vector thinning on the output vectors.

The input file contains the input vector segment to process. The type of vector selection process is specified by the inclusive operation. By default, VECSEL includes as output all vector data values in the specified window, one or more ranges of attributes, or both. However, you can also exclude the vector data values, if necessary.

The inclusive operation governs selection by both window and attribute ranges, if both are specified. In such cases, it may be advantageous to run VECSEL twice: once for the window selection, and a second time using the output from the first run as input to the second run for the attribute ranges.

You can define an area of vector processing by using the georeferencing segment in your input file or by the input window you specify. However, if you elect to use georeferencing bounds, and also specify an input window, the input window will be ignored. If you specify neither georeferencing bounds nor an input window, VECSEL processes all of the vectors, regardless of their location in the input file. The units of the window are those of the input vector segment, such as UTM.

Vectors can be processed by their attribute value, specified as a list of attribute ranges. If no attribute range is specified, all of the vectors are processed, regardless of their attribute value.

To thin vertices from the output vectors, you can specify a percentage to thin. For more information, see Vector thinning.

If you run VECSEL as an inclusive operation, all vector data on or within the window, if specified, and on or within the attribute range or ranges, if specified, are retained in the output vector segment. If you run VECSEL as an exclusive operation, all vector data on or outside the window, if specified, and outside the attribute range or ranges, if specified, are retained in the output vector segment.

If you specify the segment name for the DBSN parameter and the description for the DBSD parameter before running VECSEL, the algorithm uses these values for the new vector segment. If you do not specify values, VECSEL uses the name and description from the input vector segment. In EASI, the segment number of the output vector data is written to an output parameter, LASC.

Vector thinning

To thin vertices from the output vectors, you can specify a percentage to thin. The percentage can be any value ranging from 0 through 99.9.

During processing, VECSEL samples the vertices, as specified. For example, a value of 50 drops every other vertex in the output vector. A value of 25 drops every fourth vertex.

Note: The percentage of thinning you specify is a goal. The actual amount thinned is available in a report, which VECSEL produces on completion of processing.

The algorithm preserves all line and point structures by always retaining both end points in a line and all points. Only vertices between end points in a line are eligible for thinning.

For an example that applies vector thinning, see this example that applies vector thinning.

Back to top

Examples

Defaults

If all of the options for vector selection are specified as default values, the input vector segment is copied to a new output vector segment.

EASI>fili	= "irvine.pix"	! input file
EASI>dbvs	= 25		! input vector segment
EASI>filo	= "vecsel.pix"	! new output file
EASI>inclus	=		! default, "Yes";  inclusive selection
EASI>usegeo	=		! default, "Off"; do not use georeferencing
EASI>dbvw	=		! default, process all vector data 
EASI>attrng	=		! default, use all vector data 
EASI>thin	=		! default, no vector thinning 
EASI>dbsn	=		! use name from input segment
EASI>dbsd	=		! use description from input segment
EASI>fldnme	=		! default, not selecting by attribute values
EASI>ftype	=		! default, use PIX
EASI>foption	=		! default, use ""

EASI>RUN VECSEL
Note: If all of the options for vector selection are specified as default values, and you elect not to run VECSEL as an inclusive operation, the input segment is copied to the output segment. Although you might expect that this would produce the opposite of the preceding example, all of the vector data is valid and is moved to the output vector segment. This is because there is no window or attribute ranges to exclude the vector data.

Output all vector data on and inside a specified input window.

EASI>fili	= "irvine.pix"	! input file
EASI>dbvs	= 25		! vector segment to process
EASI>filo	= "vecsel.pix"	! new output file
EASI>inclus	=		! default, "Yes"; inclusive selection
EASI>usegeo	=		! default, "Off"; no georeferencing
EASI>dbvw	= 431000,3729000,1000,-1000	! clip window in UTM
EASI>attrng	=		! default, use all vector data
EASI>thin	=		! default, no vector thinning
EASI>dbsn	=		! use name from input segment
EASI>dbsd	=		! use description from input segment
EASI>fldnme	=		! default, not selecting by attribute values
EASI>ftype	=		! default, use PIX
EASI>foption	=		! default, use ''

EASI>RUN VECSEL

Output all vector data on and outside a specified input window.

EASI>fili	= "irvine.pix"	! input file
EASI>dbvs	= 25		! vector segment to process
EASI>filo	= "vecsel.pix"	! new output file
EASI>inclus	= "No"		! exclusive selection
EASI>usegeo	=		! default, "Off"; no georeferencing
EASI>dbvw	= 431000,3729000,1000,-1000	! clip window in UTM
EASI>attrng	=		! default, use all vector data
EASI>thin	=		! default, no vector thinning
EASI>dbsn	=		! use name from input segment
EASI>dbsd	=		! use description from input segment
EASI>fldnme	=		! default, not selecting by attribute values
EASI>ftype	=		! default, use PIX
EASI>foption	=		! default, use ''

EASI>RUN VECSEL

Output all vector data with an attribute in a range.

EASI>fili	= "irvine.pix"	! input file
EASI>dbvs	= 25		! vector segment to process
EASI>filo	= "vecsel.pix"	! new output file
EASI>inclus	=		! default, "Yes"; inclusive selection
EASI>usegeo	=		! default, "Off"; no georeferencing
EASI>dbvw	=		! default, process all vector data
EASI>attrng	= 1700205,1700210	! range of attributes to process
EASI>thin	=		! default, no vector thinning
EASI>dbsn	=		! use name from input segment
EASI>dbsd	=		! use description from input segment
EASI>fldnme	=		! name of existing field to query
EASI>ftype	=		! default, use PIX
EASI>foption	=		! default, use ''

EASI>RUN VECSEL

Example applying vector thinning

The following example thins all vectors by 75 percent. To see if any principle vertices (corner vertices) were dropped, verify the thinned vectors by overlaying them on the input vectors.

EASI>fili	= "irvine.pix"	! input file
EASI>dbvs	= 25		! input vector segment
EASI>filo	= "vecsel.pix"	! new output file
EASI>inclus	=		! default, "Yes";  inclusive selection
EASI>usegeo	=		! default, "Off"; do not use georeferencing
EASI>dbvw	=		! default, process all vector data
EASI>attrng	=		! default, use all vector data
EASI>thin	= 75		! thin vectors by 75 percent
EASI>dbsn	=		! use name from input segment
EASI>dbsd	=		! use description from input segment
EASI>fldnme	=		! default, not selecting by attribute values
EASI>ftype	=		! default, use PIX
EASI>foption	=		! default, use ''

EASI>RUN VECSEL

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.