GRDVEC -- Vector Encoding

Encodes (burns in) vector data into existing raster image channel. The attribute value associated with each line and point in the vector segment is encoded into the image channel. The GRDINT program is used to grid (fill in) raster values between encoded vectors in the image channel. GRDVEC and GRDINT can be used to create a digital elevation mode (DEM) from contours.

Note: the database must be georeferenced using the GEOSET program, if the vector coordinates are not stored in PIXEL coordinates.

See Also: GRDINT, GRDPIN, GRDPNT, GRDPOL, VECBUF, VECRST

PARAMETERS

GRDVEC is controlled by the following global input parameters:

Name     Prompt                                  Count     Type
FILV     Database Vector File Name               1-64      Char
FILE     Database File Name                      1-64      Char
DBVS     Database Vector Segment                 1-16      Int
DBOC     Database Output Channel List            1         Int
VALU     Grey-level Value List                   0-16      Real
CONNECT  Connectedness of Lines (4 or 8)         0-1       Int
VTYPE    Vector Type: LINE/POINT/BOTH            1-5       Char
FLDNME   Field name to use for Elevation         0-64      Char

FILV

Specifies the name of the file containing the vector layers to be rasterized into the raster channel. If this is not specified, it will be assumed to be the same as the contents of FILE.

 EASI>FILV="filespec"

FILE

Specifies the name of the PCIDSK database file containing the vector segments to be encoded into the image channels.

 EASI>FILE="filespec"

DBVS

Specifies up to 16 vector segments to be encoded. Each segment contains lines and points (for example, elevation contours and markers), where each line or point has an attribute value. All specified vector segments must use the same coordinate system (i.e. PIXEL, UTM, etc.). These segments should be found on the file indicated in FILV.

 EASI>DBVS=i,j,...p

DBOC

Specifies one output database channel for receiving encoded line and point data.

 EASI>DBOC=i
Existing data which are not underneath encoded vector data are NOT changed. Output channel can be any data type.

VALU

  Valid Values:   x <= 0.0, x >= 0.0
  Default:        <none>
Optionally specifies an attribute value pertaining to ALL lines and points in the input vector segments.

If this attribute value is specified, the attribute value of the lines and points in the segment are ignored and are overridden by the user-specified value. If it is NOT specified, the actual attribute values for each line and point in the vector segment are used. Range for attribute values depends on the data type of the output channel.

CONNECT

  Valid Values:   4, 8
  Default:        4
Specifies the connectedness for line segments encoded into the output image channel. Points are always encoded as a single dot.

Note: Any value other than 4 or 8 is invalid.

IMPORTANT NOTE: If the output of GRDVEC will be input to GRDINT (grid interpolation), connectedness must be set to 4.

VTYPE

  Valid Values:   LINE, POINT, BOTH
  Default:        LINE
Specifies the type of vector data to be encoded. There are three options:

 VTYPE      = LINE          | encode line data only
 VTYPE      = POINT         | encode point data only
 VTYPE      = BOTH          | encode both line and point data

FLDNME

  Valid Values:   ATTRIBUTE, ZCOORD, ELEVATION
  Default:        ATTRIBUTE
Specifies the field containing the elevation values.

 ATTRIBUTE      -> The attribute of the vector segment is used. 
 ZCOORD         -> The actual Z-coordinates of the vectors are used.  
 ELEVATION      -> The vector field called ELEVATION is used.
The names are not case sensitive, and the entire name need not be specified.

DETAILS

GRDVEC (followed by GRDINT) is used in gridding vector data. Gridding is the process of creating a raster image grid, given vector (line and point) data. For example, GRDVEC can encode elevation contour lines into an image channel. The EXAMPLE section shows how to create a digital elevation model (DEM) by using the GRDVEC and GRDINT programs.

GRDVEC encodes the vector segment data stored on the database file onto an output image channel, where attribute values for each vector segment are specified by the user or by actual attribute values stored for each line and point structure in each vector segment. The user must specify either 4-connectedness or 8-connectedness for line segments encoded on the image. The user has the option of encoding only line structures, only point structures, or both types of structures.

If the units for storing vector data are not PIXEL, but are UTM or any other type, then the database must be georeferenced, using the GEOSET program, prior to running GRDVEC. The units for georeferencing must be the same as were used in collecting the vector data. The current georeferencing information for the database can be obtained by running the GEOREP program.

The CLR program should be used to clear all pixels in the output channel to a background value (usually zero), before encoding vector data with GRDVEC. If more than 16 vector segments must be encoded, GRDVEC can be run again, using the same output channel.

As of version 6.0, each vector may now contain more than one attribute field. The Field Name parameter is used to select which attribute field will be used.

EXAMPLE

Create a digital elevation model (DEM) for a given area shown on a topographical map. The end product of this exercise is to create an image storing elevation data for the panchromatic SPOT image, stored on eltoro.pix database file provided with the Training Data Set. Create a new 1024 by 1024 eltordem.pix database file with one 8-bit unsigned integer and two 16-bit signed integer image channels.

 EASI>FILE="eltordem.pix"
 EASI>DBSZ=1024,1024
 EASI>DBNC=1,2
 EASI>RUN CIM
Transfer the image from eltoro.pix to the first channel of eltordem.pix.

 EASI>FILI="eltoro.pix"
 EASI>FILO="eltordem.pix"
 EASI>DBIC=1
 EASI>DBOC=1
 EASI>DBIW=
 EASI>DBOW=
 EASI>RUN III
Clear the second channel on eltordem.pix, using the CLR program.

 EASI>DBOC=2
 EASI>VALU=0
 EASI>DBOW=
 EASI>RUN CLR
Georeference the eltordem.pix file, using the GEOSET program. Specify the UTM coordinates (eastings and northings) for the upper left and lower right corners, using the same values used for eltoro.pix.

 EASI>UPLEFT=430640,3732300
 EASI>LORIGHT=440880,3722060
 EASI>MAPUNITS="UTM"
 EASI>RUN GEOSET
Assume that a 1:50000 resolution UTM map of Eltoro, California has been mounted on a digitizing table. Use the topographic map sheet identified as USGS 1:50000 Santiago Peak (Sheet 2451 II, Series V795, Edition 4-DMA). Elevation contours on the map can be digitized using the VECDIG program, and saved in a new vector segment. Graphic plane 1 gives feedback during contour tracing, and graphic plane 2 displays the current attribute value. 5-metre resolution for storing vector data coordinates is recommended.

While tracing each contour line, remember to enter its attribute value (feet above sea level) using the digitizer cursor puck. VECDIG can be run several times to create any number of vector segments.

 EASI>DBSN="CONTOURS"
 EASI>DBSD="1:50000 elevation contours"
 EASI>MAPUNITS="UTM"
 EASI>MAPTOL=
 EASI>MAPRES=5
 EASI>VDOB=1,2
 EASI>RUN VECDIG
The VED program can also be used to enter and to edit contour lines and attribute (elevation) values.

Finally, run GRDVEC to encode elevation contours into the output image. 4-connectedness must be used, or GRDINT will not work properly. Only line data are encoded; point data are ignored. Ensure that the VALU parameter is defaulted, so that attribute values entered by VECDIG are used to encode elevation values for each contour line.

 EASI>FILV=
 EASI>DBVS=2,3,4,...    | specify list of segments created by VECDIG
 EASI>VALU=
 EASI>DBOC=2
 EASI>CONNECT=4
 EASI>VTYPE="LINE"
 EASI>FLDNME=           | Default is Attribute field
 EASI>RUN GRDVEC
Run the GRDINT program to interpolate elevation values between the contours encoded by GRDVEC.

 EASI>DBIC=2
 EASI>DBOC=3
 EASI>BACKVAL=0
 EASI>INTMETH="CONIC"
 EASI>RUN GRDINT
The resulting elevation image should be filtered, using either a 3 by 3 median filter or a 3 by 3 averaging (smoothing) filter, for better results. The median filter (FME) preserves sharp edges better than the averaging filter (FAV).

 EASI>DBIC=3
 EASI>DBOC=2
 EASI>FLSZ=3
 EASI>RUN FME
Channel 2 now contains filtered 16-bit elevation data, where values represent elevation in feet above sea level. The PACE Terrain Analysis programs require elevation data to be expressed in metres above sea level. Therefore, it is desirable to use the ARI program to multiply all values in channel 1 by the constant 0.3048 metres per foot.

 EASI>OPER="MUL"
 EASI>CNST=0.3048
 EASI>DBIW=
 EASI>DBIC=2
 EASI>DBOC=3
 EASI>ZERODIV=
 EASI>AUTO="OFF"
 EASI>RVAL=
 EASI>RUN ARI
Transfer the scaled elevation image to the display, and show image plane 1 through the default stepped pseudocolour table (type 3).

 EASI>DBIC=3
 EASI>VDOC=1
 EASI>DBIW=
 EASI>VDOW=
 EASI>RUN IVI
 EASI>RUN DCP "PD1:PZ3"

About PCI Help Gateway