| Environments | PYTHON :: EASI :: MODELER |
| Quick links | Description :: Parameters :: Parameter descriptions :: Details :: Example |
| Back to top |
| Back to top |
demwrit(fili, filo, dbic, dbiw)
| Name | Type | Caption | Length | Value range |
|---|---|---|---|---|
| FILI * | str | Input file name | 1 - | |
| FILO * | str | Output file name | 1 - | |
| DBIC * | List[int] | Input raster channel or layer | 1 - 1 | |
| DBIW | List[int] | Raster input window | 0 - 4 | Xoffset, Yoffset, Xsize, Ysize |
| Back to top |
FILI
Specifies the file name of the input PCIDSK image file that contains the written DEM data. The PCIDSK file must be georeferenced using UTM coordinates with a zone number.
FILO
Specifies the file name (without a file name extension) of the created DEM files. The DEM files are created automatically. You must specify a file name.
Depending on the size and location of the DEM data, more than one DEM file may be written. The DEM files are created and ordered from right to left (west to east) and from top to bottom (north to south). Each DEM file covers a 7.5 by 7.5 minute area. The DEM file names use the 'filename.m-n' format, where m and n specify the row and column number.
DBIC
Specifies the input image channel from which the DEM data is read. Although the input channel can be any type, DEM data is always generated as signed 16-bit values.
DBIW
Specifies the raster window (Xoffset, Yoffset, Xsize, Ysize) that is read from the input layers. If this parameter is not specified, the entire channel is used by default. Xoffset, Yoffset define the upper-left starting pixel coordinates of the window. Xsize is the number of pixels that define the window width. Ysize is the number of lines that define the window height.
| Back to top |
DEMWRIT writes 16-bit elevation data from a PCIDSK file to one or more United States Geological Survey (USGS) digital elevation model (DEM) format files. DEMWRIT writes only ASCII format, 7.5-minute (30m resolution, 1:24,000 scale) DEM data; it does not write binary (unformatted) or 1-degree DEM data.
DEMWRIT transfers image data to a specified image channel (DBIC/DEM Layer) to a USGS DEM format text file on a disk. The PCIDSK file must be georeferenced using UTM coordinates with a zone number (using GEOSET).
DEM files are created and ordered from right to left (west to east) and from top to bottom (north to south). Each DEM file covers a 7.5-minute longitude by 7.5-minute latitude area. The file name extension for the DEM file specifies its location in the grid of new DEM files (created by DEMWRIT) as follows:
+-------------------------------+ | 1-1 | 1-2 | ... | 1-n | +-------------------------------+ | 2-1 | 2-2 | ... | 2-n | +-------------------------------+ | ... | ... | ... | ... | +-------------------------------+ | m-1 | m-2 | ... | m-n | +-------------------------------+
The grid of DEM files may not be perfectly rectangular. Some files along the first or last row or column may be missing, depending on the location of the input window from the PCIDSK image file.
Portions of the DEM file that do not cover the area specified by the input window have no filler.
| Back to top |
Write a DEM file for the 16-bit signed elevation data stored on channel 10 of the file "irvine.pix".
from pci.demwrit import demwrit fili = "irvine.pix" filo = "irvine" dbic = [10] dbiw = [] demwrit( fili, filo, dbic, dbiw )
The result is six DEM files (two rows and three columns), which cover the area between 117.875W and 117.5W degrees longitude and the area between 33.75N and 33.5N degrees latitude. The generated files are called irvine.1-1, irvine.1-2, irvine.1-3, irvine.2-1, irvine.2-2, and irvine.2-3.
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.