CONTACTX

Contact extension


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

Back to top

Description


Contactx creates an output vector segment. The vector segment consists of line segments which trace the intersection of a plane with the surface of a digital elevation model (DEM). The plane is defined from the dip and strike angles of the input shape, which are set by the DIP program. Alternatively, they may be set as parameters in this program.
Back to top

Parameters


contactx(fili, filo, dbic, dbiw, dbiv, shape, dbvn, dbvd, backval, radius, dip, strike)

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  
DBIW List[int] Input window 0 - 4 Xoffset, Yoffset, Xsize, Ysize
DBIV * List[int] Input vector channel 1 - 1  
SHAPE * List[int] Input shape number 1 - 1  
DBVN * str Output vector layer name 1 - 8  
DBVD str Output vector layer description 0 - 64  
BACKVAL List[float] Background gray-level value 0 - 1  
RADIUS List[float] Contact extension radius 0 - 1  
DIP List[float] Dip angle 0 - 1 0 - 90
STRIKE List[float] Strike direction 0 - 1 0 - 360

* Required parameter
Back to top

Parameter descriptions

FILI

Specifies the name of the PCIDSK file containing the input vector layer to process.

FILO

Specifies the name of the PCIDSK file to receive the transformed data. FILO can be the same as FILI.

DBIC

Specifies the input image channel containing the digital elevation (DEM) data. The input image channel can be of any type.

DBIW

Specifies the raster window (Xoffset, Yoffset, Xsize, Ysize) that is read from the input layers. If DBIW is not specified, the entire layer 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.

DBIV

Specifies the input vector layer to process.

SHAPE

Specifies the input shape that contains one vertex with dip and strike angles.

DBVN

Specifies a name (up to 8 characters) for the output vector layer.

DBVD

Optionally describes (in up to 64 characters) the contents or origins of the output data.

BACKVAL

Specifies the background gray-level, or no-data value, for the input DEM image.

Input pixels set to the background value are assumed to have an unknown elevation, and are not used for extension calculation. If BACKVAL is not specified, all input pixels are assumed to have valid elevation values and all are used for contour generation. BACKVAL is usually set to zero, where the raster image is not rectangular and zeros are used around the border of the image.

RADIUS

Specifies the radius in date units (typically meters) of the circular area around the contact point.

The intersection of this circular area with the area defined by the input image window becomes the area used for the contact extension. If RADIUS is not specified, DBIW is used.

DIP

Specifies the angle of dip in degrees, from 0 to 90. This value overwrites the dip attribute in the shape. If this parameter is specified, STRIKE must also be set.

STRIKE

Specifies the strike direction in compass degrees, from 0 to 360. This value overwrites the strike attribute in the shape. If this parameter is specified, DIP must also be set.

Back to top

Return Value

Returns: New segment number

Type:  PCI_INT

This function returns the number of the newly created segment.

Back to top

Details

CONTACTX creates an output vector segment consisting of line segments that trace the intersection of a plane with the surface of a digital elevation model (DEM). The plane is defined from the dip and strike angles of the input shape, which are set either by the DIP function or by the DIP and STRIKE parameters in this function.

In geology, a contact refers to the portion of a rock layer which is visible at the surface. If the rock unit forms a layer, the orientation of the rock layer, if assumed to be planar, can be described by measuring the strike direction and the dip angle. These are explained in more detail in the DIP function. If the rock layer intersects the surface, the contact may appear as a line, which traces the intersection of the plane defined by the rock layer with the surface. The contact is not always visible at the surface (vegetation or other debris may disguise it). Contact extension takes a point on the ground, where the contact is known to be present, and creates a vector segment that traces the contact from that point out to the edges of a defined area (given the assumption that the layer is planar).

If the dip, strike, contact point, and assumptions of linearity are correct over the area that the contact extension uses, and if the DEM is properly georeferenced and accurate, the line segments calculated should follow the trace of the contact at the surface.

If this is not the case, it indicates that one of the conditions has not been met. This may mean that folding and/or faulting is present. Thus, the dip and strike values change along the contact and the assumption of linearity has failed. CONTACTX can therefore be used to check for folding and faulting. Other common problems include poor DEMs or improper georeferencing.

Back to top

Example

Perform a contact extension on channel 1 and layer 1, shape 1 of image file irvine.pix, and save the vertices in the new vector layer with the name "TestExt" and description "Test of set contact extension" of the same file:

from pci.contactx import contactx

fili    =   'irvine.pix'
filo    =   'irvine.pix'
dbic    =   [1]         # input DEM layer
dbiw    =   []          # process entire database
dbiv    =   [25]        # input vector segment 25
shape   =   [1]         # input shape
dbvn    =   'TestExt'   # output layer name
dbvd    =   'Test of set contact extension' # ouptut layer description
backval =   []
radius  =   [1000]      # contact extension circle size
dip     =   [50]        # dip angle 50 degrees
strike  =   [100]       # strike direction 100 degrees

lasc    =   contactx( fili, filo, dbic, dbiw, dbiv, shape, dbvn,\
dbvd, backval, radius, dip, strike )

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