| Environments | PYTHON :: EASI :: MODELER |
| Quick links | Description :: Parameters :: Parameter descriptions :: Details :: Example :: Related |
| Back to top |
| Back to top |
gcpelev(file, filedem, dbgc, dbec, backelev, escale)
| Name | Type | Caption | Length | Value range |
|---|---|---|---|---|
| FILE * | str | Input file name | 1 - 192 | |
| FILEDEM * | str | Database DEM File Name | 1 - 192 | |
| DBGC * | List[int] | Input Ground Control Points segment | 1 - 1 | |
| DBEC * | List[int] | Input digital elevation model channel | 1 - 1 | |
| BACKELEV | List[float] | Background elevation value | 0 - 1 | |
| ESCALE | List[float] | Elevation Scale and Offset | 0 - 2 | Default: 1,0 |
| Back to top |
FILE
Specifies the file name of the PCIDSK image database that contains the input ground control segment to update.
FILEDEM
Specifies the file name of the PCIDSK image database that contains the digital elevation channel.
DBGC
Specifies the input ground control points segment to update.
DBEC
Specifies the input image channel that contains the digital elevation model (DEM) data to use.
BACKELEV
Optionally specifies the background elevation (NoData) value in the input elevation channel. If specified, GCPs in the elevation channel with this value are ignored.
Typically, background elevation is used when the data in the elevation channel is incomplete (for example, elevation only in an area of interest or the edges of the DEM are clipped). In such cases, the pixels with no known elevation are filled with an arbitrary value (such as -9999). Set the background elevation parameter to this value to ensure that the GCP elevation is skipped rather than having GCPELEV attempt to use it as a valid value.
If this parameter is not specified, the function checks for ELEVATION_BACKGROUND or NO_DATA_VALUE metadata tags, first at the channel level, then at the file level. If this value is not specified or found in the metadata, the function uses the default value of -32768.
ESCALE
Optionally specifies the scale and offset to apply to the elevation values in the elevation channel (DBEC) to convert values to meters. If not specified, scale defaults to 1, and offset defaults to 0.
The equation for the conversion is:
elevation in meters = scale * (value + offset)
For example, to convert elevation values from feet to meters, where a value of 0 represents 1000 feet:
EASI>ESCALE=0.3048,1000 | meters = 0.3048 * (value + 1000)
| Back to top |
GCPELEV converts a GCP segment which has no elevation values into a GCP segment with elevation values, by reading the elevation values from a user-defined digital elevation channel. This is useful for cases where the user has collected the X and Y ground control points for an area without collecting the elevation values using programs like GEOIMG or GCP tie down to vectors in OrthoEngine. Elevation values are bilinearly interpolated from the digital elevation model (DEM) channel.
The user can specify a background elevation value to identify areas which should be ignored. A scale and offset can be specified, allowing the user to convert the elevation unit to meters.
FILE specifies the PCIDSK image database that contains the ground control point segment (DBGC). FILEDEM specifies the PCIDSK image database which contains the digital elevation channel DBEC.
| Back to top |
The following example adds elevation values to a GCP segment.
from pci.gcpelev import gcpelev file = "irvine.pix" filedem = "irvine.pix" dbgc = [27] dbec = [10] # Elevation channel backelev = [] escale = [] # Default, elevations are unchanged gcpelev( file, filedem, dbgc, dbec, backelev, escale )
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.