| Environments | PYTHON :: EASI :: MODELER |
| Quick links | Description :: Parameters :: Parameter descriptions :: Details :: Examples :: Related |
| Back to top |
| Back to top |
| Name | Type | Caption | Length | Value range |
|---|---|---|---|---|
| FILE * | String | Input file name | 1 - 192 | |
| DBVS * | Integer | Input vector segment | 1 - | |
| DBGC | Integer | Input GCP segment | 0 - 1 | |
| ORDER | Integer | Order of polynomial equation | 0 - 1 | -1 - 5 Default: 1 |
| DIRECT | String | Direction of transformation | 0 - 4 | FORW | BACK Default: FORW |
| DBSN | String | Output segment name | 0 - 8 | |
| DBSD | String | Output segment description | 0 - 64 | |
| LASC | Integer | Last database segment created | 0 - 1 |
| Back to top |
FILE
Specifies the name of the PCIDSK file that contains the vector segment to transform and the GCP or georeferencing segment that defines the transformation.
This file will also receive the output transformed data, in a new output vector segment.
DBVS
Specifies the vector segment to be transformed.
DBGC
Specifies the segment that contains the ground control points. The GCP segment is used to generate the polynomial transformation, allowing the vector data to be mapped to a corrected form. If this parameter is not specified, VECREG uses the georeferencing segment (number 1) to perform a first-order transformation on the vector data.
ORDER
Specifies the ORDER to use for the regression model that will fit uncorrected-to-corrected GCP coordinates, or uses a -1 flag indicating that a thin plate spline transformation should be used.
To obtain good results, it is best to have two or three times the minimum number of GCPs for a particular ORDER (for example, 12 to 18 GCPs for 2nd ORDER) and the GCPs should be evenly distributed over the entire uncorrected image.
DIRECT
Specifies the direction of the vector transformation.
In most cases, the direction for the transformation can only go one way, and DIRECT is ignored. VECREG transforms the vectors from the coordinate system that matches the vector coordinate system, to the coordinate system that does not match. For example, if the vector units are "PIXEL" and the GCP or georeferencing output units are "UTM", the output vector units will be "UTM".
If input and output units are both "PIXEL", however, the transformation could be made forward to the output "PIXEL" units or backward to the input "PIXEL" units. In such a case, the direction must be specified by this parameter.
DBSN
Specifies a name (up to 8 characters) for the output vector segment.
If this parameter is not specified, the DBSN value from the input vector segment is used.
DBSD
Describes (in up to 64 characters) the contents or origins of the output data.
If this parameter is not specified, the DBSD value from the input vector segment is used.
LASC
This is an output parameter; no user interaction is required.
The segment number for the output transformed vectors is saved in the output parameter LASC when VECREG exits.
| Back to top |
VECREG performs registration of vector data on a vector segment using a ground control point (GCP) segment or a georeferencing segment, to produce a new segment of transformed vector data.
VECREG transforms (warps) vector data to fit a given set of ground control points or to map onto the area specified by the file's georeferencing segment. The specified input file (FILE) contains the segment of vector data to transform (DBVS) as well as the ground control point segment (DBGC) defining how the vector data is to be transformed.
The GCP segment is normally be produced by running the function GCIV, which will also output the required transform order. VECREG will produce a transformed vector segment that overlays the imagery, similarly to the transformed vectors displayed for the "Hi-Res" option during the tie-down process in GCIV. The segment number of the transformed vector data is output to the LASC parameter before VECREG exits. If a segment name (DBSN) and segment description (DBSD) are specified before running VECREG, they are used for the new vector segment; otherwise, the segment name and description from the input vector segment are used.
VECREG may also be used to translate and/or scale vector data as specified by the file's georeferencing segment. If the GCP segment (DBGC) input to VECREG is not specified, VECREG will transform the vectors using the affine transform defined by the georeferencing segment. The bounds for the georeferencing segment may be specified with GEOSET. If the georeferencing segment is to be used to make the transformation, the ORDER (Regression Order) parameter is ignored.
In most cases, the direction for the transformation can only go one way; that is, VECREG will transform the vectors from the coordinate system that matches the vector's coordinate system to the coordinate system that does not match. For example, if the vector units are "PIXEL" and the affine transform from the georeferencing segment (with input units of "PIXEL" and output units of "UTM") is to be used, the units for the output vectors will be "UTM". If the input and output units are both "PIXEL", however, the transformation could be made forward to the output "PIXEL" units or backward to the input "PIXEL" units. In such a case, the direction will be taken from the DIRECT (Transformation Direction) parameter specified for VECREG. If the direction for the transformation can only go one way, DIRECT is not necessary and is ignored. By default, DIRECT applies a FORWARD transformation.
VECREG can be used to warp vectors to overlay image data. This is done by producing a GCP segment using GCIV. The vectors are then transformed by VECREG to overlay the image, similar to the way vectors are displayed for the "Hi-res" option during the tie-down process with GCIV. This is done by applying a backward transformation to produce equivalent input coordinate "PIXEL" units.
VECREG can be used to transform vectors to another coordinate system (such as "PIXEL" to "UTM") by using the input file's georeferencing segment. That is, if the vectors are in the same "PIXEL" coordinate system as the image (for example, as produced by the backward transformation described earlier), and the bounds of the image are defined as "UTM" for the file's georeferencing segment with GEOSET, VECREG produces transformed UTM vectors.
| Back to top |
Convert vector coordinates in segment 25 of irvine.pix from UTM units to PIXEL units, using the georeferencing segment. This creates a new vector segment where vector coordinates are in PIXEL units. Use VECREP to verify this. Note that if vector coordinates were originally in PIXEL units, VECREG would have transformed them to UTM coordinates instead. ORDER and DIRECT do not need to be specified.
EASI>file = 'irvine.pix' EASI>dbvs = 25 ! vector segment EASI>dbgc = EASI>order = ! order of polynomial equation; default 1 EASI>direct = ! direction of transform; default forward EASI>dbsn = ! name from input vector segment EASI>dbsd = ! description from input vector segment EASI>lasc = ! output vector segment number EASI>RUN VECREG
Transform the vectors created in the above example from PIXEL forward to UTM coordinates, using the georeferencing segment:
EASI>file = 'irvine.pix' EASI>dbvs = lasc ! new created vector segment EASI>dbgc = EASI>order = ! order of polynomial equation; default 1 EASI>direct = ! direction of transform; default forward EASI>dbsn = ! name from input vector segment EASI>dbsd = ! description from input vector segment EASI>lasc = ! output vector segment number EASI>RUN VECREG
Warp UTM vector data for a given UTM zone in vector segment 2 to a scanned image. First, tie down the vectors to the image using GCIV to produce GCP segment 3 and the ORDER for the transformation. VECREG will then do a forward mapping to produce vectors in the same PIXEL coordinates as the scanned image. DIRECT does not have to be specified; if it is specified, it is ignored, as the transformation can only go one way (UTM forward to PIXEL).
EASI>file = 'scanned.pix' EASI>dbvs = 2 ! vector segment EASI>dbgc = 3 ! GCP segment EASI>order = ! order of polynomial equation; default 1 EASI>direct = ! direction of transform; default forward EASI>dbsn = 'NEWVEC' ! new segment name EASI>dbsd = ''Transformed vectors' ! new segment description EASI>lasc = ! output vector segment number EASI>RUN VECREG
Assuming the scanned image from Example 1 was in terms of a UTM grid (each pixel in the image is square or rectangular and the same size in ground distance) for an adjacent overlapping UTM zone, VECREG can be used to translate and/or scale the vector segment produced in Example 1, to produce vectors with units in terms of the adjacent UTM zone. This can be done by first defining the bounds of the scanned image with GEOSET, then running VECREG with the vector segment output from Example 1 (segment 4). DIRECT does not need to be specified, as the transformation can only go one way (PIXEL forward to UTM).
EASI>file = 'scanned.pix' EASI>dbvs = 4 ! vector segment EASI>dbgc = ! use georeferencing segment transform EASI>order = ! not used EASI>direct = ! not used EASI>dbsn = ! name from input vector segment EASI>dbsd = ! description from input vector segment EASI>lasc = ! output vector segment number EASI>RUN VECREG
Assume that a segment of World Database vector data has been read (segment 6) and you want to warp it to the image. Using GCIV, produce a GCP segment (segment 7) and the ORDER for the transform. This is a case where you must define the direction for the transformation; that is, the vector units are "PIXEL" and both coordinate systems for the GCP segment are "PIXEL". By default, the transformation would be backward, but you want it to be forward (such as from the World Databank "PIXEL", back to image "PIXEL"). This is done by defining the DIRECT parameter.
EASI>file = 'scanned.pix' EASI>dbvs = 6 ! vector segment EASI>dbgc = 7 ! GCP segment EASI>order = ! order of polynomial equation; default 1 EASI>direct = 'FORW' ! direction of transform EASI>dbsn = ! name from input vector segment EASI>dbsd = ! description from input vector segment EASI>lasc = ! output vector segment number EASI>RUN VECREG
Warp UTM vector data for a given UTM zone in vector segment 2 to a scanned image using a thin-plate spline transformation. First, tie down the vectors to the image using GCIV to produce GCP segment 3 and set ORDER to -1. VECREG will then do a forward mapping to produce vectors in the same PIXEL coordinates as the scanned image. DIRECT does not need to be specified; if it is, it is ignored, as the transform can only go one way (UTM forward to PIXEL).
EASI>file = 'scanned.pix' EASI>dbvs = 2 ! vector segment EASI>dbgc = 3 ! GCP segment EASI>order = -1 ! thin-plate spline transform EASI>direct = ! direction of transform, default forward EASI>dbsn = 'TPS' ! vector segment name EASI>dbsd = 'Thin plate spline vectors' ! vector segment description EASI>lasc = ! output vector segment number EASI>RUN VECREG
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.