VECPRO

Vector projection


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

Back to top

Description


Converts the input vectors to produce a new vector segment in the specified output projection.
Back to top

Parameters


Name Type Caption Length Value range
FILI* String Input file name 1 - 192  
INGEO Integer Input georeference segment 0 - 1  
DBVS* Integer Input vector segment 1 - 1  
FILO String Output file name 0 - 192  
OUTGEO Integer Output georeference segment 0 - 1  
OUNITS String Output map units 0 - 64 LON | UTM | SPCS | PIX
DBSN String Output segment name 0 - 8  
DBSD String Output segment description 0 - 64  
LASC Integer Last database segment created 0 - 1  

* Required parameter
Back to top

Parameter descriptions

FILI

Specifies the name of the PCIDSK database file that contains the vector segment to transform and the input georeference segment, if any, that defines the transformation.

INGEO

Specifies the georeferencing segment that defines the projection information and bounds for the input file (FILI).

If this parameter is not specified, segment 1 is used by default.

DBVS

Specifies the vector segment to be transformed.

FILO

Specifies the name of the output PCIDSK file to receive the projected vector segment.

The specified output file must already exist before running VECPRO. If the specified file does not already exist, it is assumed to be FILI.

OUTGEO

Specifies the georeferencing segment that defines the projection information and bounds for the output file (FILO).

If this parameter is not specified, segment 1 is used by default.

OUNITS

Specifies the units (projection system) of the output coordinates.

Supported values are:

Other units may be specified with the georeference segment OUTGEO. If OUNITS is undefined, VECPRO will use the units (and the required projection parameters) from the georeference segment OUTGEO. If OUNITS and OUTGEO are both unspecified, segment 1 is read for this information.

For example, if OUNITS is specified as:

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 VECPRO exits.

Back to top

Details

VECPRO converts input vectors to the specified output units. The specified input image file (FILI) holds the vector segment to convert (DBVS). The specified output image file (FILO) will receive the transformed vectors. INGEO defines the projection bounds and parameters of FILI, while OUTGEO defines the projection bounds and parameters of FILO. The segment name (DBSN) and descriptor (DBSD) are used, if specified; if defaulted, the segment name and/or descriptor from the input segment are used.

OUNITS may be used for output for the following special cases:

To convert between different systems, the necessary projection parameters are required. If you are converting from or to image PIXELs, the image bounds must be set in the coordinates of the base projection to which the image was transformed.

                   (A)                   (B)
        'PIXEL' <--------  projection <--------  'LONG/LAT'
                -------->             -------->

                                         (C)
                           projection <--------  projection_2
                                      -------->
where:

'PIXEL > projection' can be done with (A)

'projection > PIXEL' can be done with (A)

'PIXEL > LONG/LAT' can be done with (A), if the image units and bounds are 'LONG/LAT' or with (A) and (B), if the image units or bounds are not 'LONG/LAT'.

'LONG/LAT > PIXEL' can be done with (A), if the image units and bounds are 'LONG/LAT' or with (A) and (B), if the image units or bounds are not 'LONG/LAT'.

'projection > projection_2' can be done with (C)

'projection_2 > projection' can be done with (C)

Back to top

Examples

The following examples show different ways to use the program VECPRO. The units to convert between 'LONG/LAT' and 'UTM 11 S' are special cases because all parameters required to define the projection can be defined in the unit string. The examples demonstrate using unit strings input to the program and/or unit strings read from the georeferencing segments.

For other projections that cannot store all projection parameters in the unit string, Example 3 illustrates the general case where the projection string and parameters are defined in the input and output georeference segments.

In Examples 3 and 4, a new georeferencing segment (segment 33) is used. This segment is created in 'irvine.pix' using PROSET.

EASI>FILE	=	"irvine.pix"
EASI>DBGEO	=		! append a new segment
EASI>MAPUNITS	=	"lon e0"	! processed as  "LONG/LAT    E000"

EASI>RUN PROSET

Vector units -> OUNITS

EASI>FILI	=	"irvine.pix"
EASI>INGEO	=
EASI>DBVS	=	25	! vector units, "UTM    11 S E000"
EASI>FILO	=		! output to FILI
EASI>OUTGEO	=
EASI>OUNITS	=	"lon"	! processed as  "LONG/LAT    E000"
EASI>DBSN	=		! use DBSN from DBVS
EASI>DBSD	=		! use DBSD from DBVS

EASI>RUN VECPRO
    

Vector units, Georeference segment -> OUNITS

EASI>FILI	=	"irvine.pix"
EASI>INGEO	=	1	! map units "UTM    11 S E000"
EASI>DBVS	=	25	! vector units "UTM    11 S E000"
EASI>FILO	=		! output to FILI
EASI>OUTGEO	=
EASI>OUNITS	=	"lon"	! processed as  "LONG/LAT    E000"
EASI>DBSN	=		
EASI>DBSD	=		

EASI>RUN VECPRO						

Vector units,Georeference segment -> 2nd Georeference segment,OUNITS

EASI>FILI	=	"irvine.pix"
EASI>INGEO	=	1	! input map units,  "UTM    11 S E000"
EASI>DBVS	=	25	! vector units,  "UTM    11 S E000"
EASI>FILO	=		! output to FILI
EASI>OUTGEO	=	33	! output MAPUNITS, "LONG/LAT    E000"
EASI>OUNITS	=
EASI>DBSN	=		
EASI>DBSD	=		

EASI>RUN VECPRO

Vector units, Georeference segment -> 2nd Georeference segment -> 'PIXEL'

The following example uses the 'LONG/LAT E000' vectors created in Example 3 to do the inverse of Example 3. In addition, the output vectors are produced as 'PIXEL'. This is possible only because the output georeference segment (OUTGEO = 1) has:
  • all parameters for the projection defined
  • the image bounds defined in projection coordinates

If either of these conditions are not met, VECPRO exits.

EASI>FILI	=	"irvine.pix"
EASI>INGEO	=	33	! input map units, "LONG/LAT E000"
EASI>DBVS	=	lasc	! vector units, "LONG/LAT E000"
EASI>FILO	=			! output to FILI
EASI>OUTGEO	=	1	! output map units, "UTM 11 S E000"
EASI>OUNITS	=	"pix"	! convert to "PIXEL"
EASI>DBSN	=		
EASI>DBSD	=		

EASI>RUN VECPRO

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