EDMATCH

Perform edge matching on vector layers


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

Back to top

Description


EDMATCH performs edge matching on two vector layers
Back to top

Parameters


edmatch(filref, fili, filo, dbrs, dbvs, edgetol, nodetol, mrglyr, rmntline, edgesnap, dbsn, dbsd)

Name Type Caption Length Value range
FILREF str Input reference file name 0 -    
FILI * str Input file name 1 -    
FILO str Output file name 0 -    
DBRS * List[int] Input reference segment 1 - 1  
DBVS * List[int] Input variable vector segment 1 - 1  
EDGETOL * List[float] Edge tolerance value 1 - 1  
NODETOL * List[float] Node tolerance value 1 - 1  
MRGLYR str Merge layers 0 - 5 TRUE | FALSE
Default: FALSE
RMNTLINE str Remove neat line 0 - 5 TRUE | FALSE
Default: FALSE
EDGESNAP str Edge snapping method 0 - 4 JOIN | SNAP
Default: JOIN
DBSN str Output segment name 0 - 8 Default: Vectors
DBSD str Output segment description 0 - 64  

* Required parameter
Back to top

Parameter descriptions

FILREF

Specifies the name of the PCIDSK file containing the input reference layer to be used.

FILI

Specifies the name of the PCIDSK file containing the input line or polygon layers on which to perform edge matching.

FILO

Specifies the name of the PCIDSK image file to receive the edge-matched output vector layer.

If FILO is not specified, FILI is used for the output vector. If FILO is specified but does not exist, a new file is created.

DBRS

Specifies the vector segment that contains the reference arc layer. Vertices on the edge in this layer will not be modified; the file is used strictly as a reference.

DBVS

Specifies the vector segment containing the variable arc layer to be edge-matched. Vertices on the edge in this layer will be modified, based on the reference layer.

EDGETOL

Specifies the edge tolerance value, used to locate the dangles along the edge. Any vertex in this range is considered a candidate for matching.

The tolerance can be no greater than 20 percent of the width or height of the layer extending from the edge being matched.

NODETOL

Specifies the node tolerance value, used to determine which nodes are to be snapped.

If MRGLYR (Merge Layers) is True (checked), two nodes on the edges within the specified tolerance will be merged. If MRGLYR is False (unchecked), the node on the variable layer will move to the same location as the node on the reference layer.

MRGLYR

Specifies how to create the edge-matching output.

Values include:

RMNTLINE

Specifies whether to remove the neatline when creating the output.

This option applies only to LINE layers. The neatline is always removed when matching polygon layers.

EDGESNAP

Specifies how to perform the edge matching on the line.

Supported values are:

DBSN

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

DBSD

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

Back to top

Details

EDMATCH matches two input vector layers and creates a new output layer. The output layer may be either a merged output of the two input layers or an edited version of one of the layers. Matching may be performed on layers that have either horizontal or vertical edges.

This algorithm supports matching of Line or Whole Polygon layers. Both input layers must be the same type of vector layer. When using the Merge Layers option, the layers must also have the same attributes in the attribute table.

EDMATCH first tries to find edge shapes, then tries to match vertices and nodes on the edge in the variable layer with the vertices on the edge in the reference layer, if they are within the specified tolerance levels.

EDMATCH then traverses shapes by their edge vertices and nodes to cross the boundary and form a combined shape.

Back to top

Example

Match two vector layers from the file "edmatch.pix" and create an output file named "oedgematch.pix".

from pci.edmatch import edmatch

filref    =  "edmatch.pix"
fili      =  "edmatch.pix"
filo      =  "oedmatch.pix"
dbrs      =  [2]
dbvs      =  [3]        # DBVS cannot be equal to DBRS
edgetol   =  [0.1]
nodetol   =  [0.1]
mrglyr    =  ""         # Defaults to FALSE
rmntline  =  ""         # Defaults to FALSE
edgesnap  =  ""         # Defaults to JOIN
dbsn      = ""          # Defaults to Vectors
dbsd      = ""          # Will be taken from DBVS

edmatch( filref, fili, filo, dbrs, dbvs, edgetol, nodetol, mrglyr, rmntline, edgesnap, dbsn, dbsd )

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