Environments | PYTHON :: EASI :: MODELER |
Quick links | Description :: Parameters :: Parameter descriptions :: Details :: Example :: Related |
Back to top |
Back to top |
smboyle(fili, filo, dbvs, tolvalue, lookahed, dbsn, dbsd)
Name | Type | Caption | Length | Value range |
---|---|---|---|---|
FILI* | str | Input file name | 1 - | |
FILO | str | Output file name | 0 - | |
DBVS* | List[int] | Input vector segment | 1 - 1 | |
TOLVALUE | List[float] | Tolerance value | 0 - 1 | 0 - Default: 0.5 |
LOOKAHED | List[int] | Vertex look ahead value | 0 - 1 | 1 - Default: 1 |
DBSN | str | Output segment name | 0 - | Default: Vectors |
DBSD | str | Output segment description | 0 - |
Back to top |
FILI
Specifies the name of the PCIDSK image file containing the input arc layer to be smoothed.
FILO
Specifies the name of the PCIDSK image file to receive the smoothed output vector layer.
If FILO is not specified, FILI is used for the smoothed vector. If FILO is specified but does not exist, a new file is created.
DBVS
Specifies the vector segment containing the input arc layer to be smoothed.
TOLVALUE
Specifies the tolerance value, which is the proportion of distance to place the new vertex between the start vertex and the look ahead vertex.
This value must be greater than zero and smaller than one. The larger the tolerance value, the more pronounced the smoothing effect.
LOOKAHED
Specifies the vertex look ahead value, the number of vertices to "look ahead" each time, before it calculates a new vertex for the resultant smoothed vector.
The look ahead value must be greater than or equal to 1.
DBSN
Specifies a name (up to 8 characters) for the new vector segment.
DBSD
Describes (in up to 64 characters) the contents or origins of the new vector data.
Back to top |
The SMBOYLE algorithm produces better results from digitized vectors. For vectors produced by raster-to-vector conversion programs (stepped linework), the "look ahead" value has a large influence; SMMCMASTER is more suited to these vectors. SMBOYLE is not suitable for vectors containing few vertices (the result of raster-to-vector conversion programs can often create these), including small, closed shapes.
SMBOYLE does not alter the start and end vertices of a vector.
Back to top |
Smooth vector layer 25 from "irvine.pix" with TOLVALUE of 0.5 and no sliding average option. The smoothed vector will be stored in a new file named "oirvine.pix".
from pci.smboyle import * fili = "irvine.pix" filo = "oirvine.pix" dbvs = [25] tolvalue = [] # defaults to 0.5 lookahed = [] # defaults to 1 dbsn = "" # defaults to Vectors dbsd = "" # will be taken from dbvs smboyle( fili, filo, dbvs, tolvalue, lookahed, dbsn, dbsd )
© PCI Geomatics Enterprises, Inc.®, 2024. All rights reserved.