| Environments | PYTHON :: EASI :: MODELER |
| Quick links | Description :: Parameters :: Parameter descriptions :: Return Value :: Details :: Example :: Related |
| Back to top |
| Back to top |
demzref(filedem, dbec, filo, dboc, backelev, failvalue, elevref, elevunit)
| Name | Type | Caption | Length | Value range |
|---|---|---|---|---|
| FILEDEM * | str | Input DEM file name | 1 - | |
| DBEC * | List[int] | Input DEM channel | 1 - 1 | 1 - |
| FILO * | str | Output file name | 1 - | |
| DBOC | List[int] | Output converted image channel | 0 - 1 | 1 - |
| BACKELEV | List[float] | Background elevation value | 0 - 1 | |
| FAILVALUE | List[float] | Failure value | 0 - 1 | |
| ELEVREF | str | Elevation reference | 0 - 6 | MSL | ELLIPS |
| ELEVUNIT | str | Input elevation units | 0 - 5 | METER | FEET |
| Back to top |
FILEDEM
Specifies the name of the GDB-supported image file that contains data to process.
DBEC
Specifies the channel number of the input elevation data to use.
FILO
Specifies the name of the output image file.
FILO is the name of the output file that will be generated. It will have the same dimensions and projection as the input file, FILEDEM. An error occurs if the specified FILO already exists unless it is the input file in which case the input file is modified.
DBOC
Specifies the output channel to receive the converted image.
If the input (FILEDEM) and output (FILO) files are the same, and the output channel (DBOC) is identical to the input channel (DBEC) or if the specified output channel already exists, the new output overwrites the specified channel.
If FILO does not exist, a new file is created. In this case, DBOC should be defaulted.
If FILO points to a valid writable file and DBOC is defaulted, a new output channel is created.
BACKELEV
Specifies the background elevation value of the input and output digital elevation model (DEM). When the empty DEM file is first created, it fills the entire DEM channel with the BACKELEV value. In the final DEM file, this value indicates areas that have no stereo images from which to extract elevation values. It is recommended that this value be set as the NO_DATA_VALUE metadata tag in the output file.
Select a value that is different from FAILVALU (Failed Elevation Value) and that is not a valid extracted elevation value for the area. For example, setting BACKELEV to 0 in a coastal area is a poor choice because a valid extracted elevation can match this value.
FAILVALUE
Specifies the value given to pixels for which the generation of elevation values failed. This value should be outside the range of valid elevation values. The failure value identifies the areas that can be interpolated and filled.
ELEVREF
Specifies the original (input source) vertical reference for elevation values in the DEM.
If FILEDEM is specified but no ELEVATION_DATUM metadata tag exists, MSL is used by default. The ELEVATION_DATUM metadata tag is created or updated after the conversion is complete.
ELEVUNIT
Specifies the units of the elevation values stored as pixel values in the input DEM.
ELEVUNIT defaults to ELEVATION_UNITS metadata tag if it exists; otherwise, it defaults to METER. The ELEVATION_UNITS metadata tag is created or updated after the conversion is complete.
| Back to top |
Returns: Output DEM channel number
Type: PCI_INT
The channel number of the newly created DEM is returned.
This function returns only if it executes successfully; otherwise, it throws an exception.
| Back to top |
The module DEMZREF converts a raster DEM from Ellipsoid to Mean Sea Level, or vice-versa, using a global geoid model.
| Back to top |
Convert channel 10 from mean sea level to ellipsoid, creating oirvine.pix with the default output channel 10, using METER as the elevation unit.
from pci.demzref import demzref filedem = "irvine.pix" dbec = [10] filo = "oirvine.pix" dboc = [] backelev = [] failvalu = [] elevref = "MSL" elevunit = "METER" demzref( filedem, dbec, filo, dboc, backelev, failvalu, elevref, elevunit )
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.