Environments | PYTHON :: EASI |
Quick links | Description :: Parameters :: Parameter descriptions :: Details :: Example :: Related |
Back to top |
Back to top |
vecrst(file, dboc, dbvs, dbsl, query)
Name | Type | Caption | Length | Value range |
---|---|---|---|---|
FILE* | str | Input file name | 1 - | |
DBOC* | List[int] | Output raster channel(s) | 1 - 3 | |
DBVS* | List[int] | Input vector segment(s) | 1 - | |
DBSL* | List[int] | Input RST segment | 1 - 1 | |
QUERY | str | Vector query selection criteria | 0 - |
Back to top |
FILE
Specifies the name of the PCIDSK file to use in the conversion. The specified file must contain at least one image channel and one vector segment.
DBOC
Specifies the channels to receive the output imagery.
Either 1 or 3 channels may be specified.
DBVS
Specifies the vector segment(s) to rasterize.
DBSL
Specifies the vector segment containing the RST to use to for the vector rasterization. This may be one of the input vector segments specified in DBVS.
QUERY
Specifies an optional vector query expression that can be used to selectively rasterize vectors that satisfy the search criteria.
For example, if:
QUERY = "attribute < 10"
VECRST will rasterize only vectors that have attribute values of less than 10.
The grammar is:
EXPRESSION: PRIMARY not (EXPRESSION) (EXPRESSION) BINARY_OP (EXPRESSION) PRIMARY: FIELDNAME OPERATOR VALUE OPERATOR: = <= >= < > BINARY_OP: and or VALUE: number "string" FIELDNAME: valid fieldname of the vector segment or "ShapeId" attribute = 1 not (attribute = 1) (attribute < 12 and attribute > 4) or (group < 2)
Back to top |
VECRST can be used to rasterize vector features into an image channel. Simple rasterization is also accomplished by GRDVEC and GRDPOL, but VECRST is different because it renders the vectors based on a Representation Style Table (RST). An RST is used to attach complex rendering styles (such as line styles, polygon fill, fill patterns, and rendering points) as text or symbols.
VECRST takes one or more vector segments (DBVS) as input and rasterizes each one. Each segment is read in turn, and rendered to the output raster channel. The vector priorities within the RST are only considered within a single vector segment. A low-priority item in the second segment in DBVS will overwrite a higher-priority item from the first segment in DBVS.
The RST is read from a vector segment (DBSL). All vectors in this segment will be ignored, unless they are also specified in DBVS. A single RST is applied to all input vector segments.
Either one or three output raster channels (DBOC) should be specified. If one is defined, the vectors will be rendered in grayscale format; otherwise. they will be treated as red, green, and blue channels.
The QUERY parameter can be used to define a specific subset of vectors within the set of input vector segments.
Back to top |
Create a rasterized vector with features assigned from an attached RST. Assign the RST attributes to all vector segments in segment 25 and output the results to an 8-bit channel.
from pci.vecrst import * file = "irvine.pix" # input file name dboc = [8] # output channel dbvs = [25] # input vector segment dbsl = [25] # segment containing RST query = "attribute > 0" # rasterize all RST vectors vecrst( file, dboc, dbvs, dbsl, query )
© PCI Geomatics Enterprises, Inc.®, 2024. All rights reserved.