VECRST

Rasterize vectors using RST


EnvironmentsPYTHON :: EASI
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Example :: Related

Back to top

Description


Rasterizes one or more vector segments into one or three raster channels, based on a provided Representation Style Table (RST).
Back to top

Parameters


Name Type Caption Length Value range
FILE* String Input file name 1 - 192  
DBOC* Integer Output raster channel(s) 1 - 3  
DBVS* Integer Input vector segment(s) 1 -    
DBSL* Integer Input RST segment 1 - 1  
QUERY String Vector query selection criteria 0 - 192  

* Required parameter
Back to top

Parameter descriptions

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.

Ranges of channels or segments can be specified with negative values. For example, {1,-4,10} is internally expanded to {1,2,3,4,10}. When you are not specifying a range in this way, only 48 numbers can be specified explicitly.

DBVS

Specifies the vector segment(s) to rasterize.

Ranges of channels or segments can be specified with negative values. For example, {1,-4,10} is internally expanded to {1,2,3,4,10}. When you are not specifying a range in this way, only 48 numbers can be specified explicitly.

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

Details

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

Example

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.

EASI>file	=	"irvine.pix"	! input file name
EASI>dboc	=	8	! output channel
EASI>dbvs	=	25	! input vector segment
EASI>dbsl	=	25	! segment containing RST
EASI>query	=	"attribute  > 0"	! rasterize all RST vectors

EASI>RUN VECRST

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