SETELEV

Set elevation for vector layer


EnvironmentsPYTHON :: EASI :: MODELER
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Example :: Related

Back to top

Description


SETELEV sets the elevation value using bilinear interpolation for georeferenced coordinates. The new elevation value will overwrite the previous elevation value for every vertex from the specified vector layer.
Back to top

Parameters


setelev(fili, filo, dbic, dbov)

Name Type Caption Length Value range
FILI* str Input file name 1 -    
FILO* str Output file name 1 -    
DBIC* List[int] Input elevation channel 1 - 1  
DBOV* List[int] Output vector segment 1 - 1  

* Required parameter
Back to top

Parameter descriptions

FILI

Specifies the name of the PCIDSK file that contains the DEM image data.

FILO

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

DBIC

Specifies the image channel that contains the DEM information.

DBOV

Specifies the vector segment that contains the input vertices.

For every input vertex, SETELEV calculates the elevation value using bilinear interpolation for georeferenced coordinates, and overwrites the previous elevation value.

Back to top

Details

SETELEV sets the z-coordinates of vectors in an output vector layer from the values in the DEM channel of an image file.

Bilinear interpolation determines the gray level from the weighted average of the four closest pixels to the specified vertex x- and y- coordinates, and assigns that value to the z-coordinate of the vertex.

The input and output file names can be equal. The vector layer specified by DBOV contains input vertices. The new elevation value will overwrite the previous elevation value for every vertex from this layer.

To verify the results of SETELEV, you can run VECREP.

Back to top

Example

Calculate the elevation coordinates of vector layer 1, from the elevation values of channel 2. The file "irvine.pix" is used in both cases.

from pci.setelev import *

fili = 'irvine.pix'
filo = 'irvine.pix'
dbic = [10]                   #Elevation Input Channel
dbov = [25]                   #Vector Segment with Elevation Values

setelev (fili, filo, dbic,dbov)

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