All Cadcorp SIS API Methods

CleanLines Method

Description

Cleans up LineString Items, removing repeated vertices etc.

Syntax

Visual Basic
Public Function CleanLines( _
   ByVal list As String, _
   ByVal tolerance As Double, _
   ByVal options As Integer _
) As Integer

Parameters

list

The Named List containing the LineString Items to be cleaned. On completion, the named list will contain all the remaining LineString items.

tolerance
The tolerance to use. LineString segments whose length is less than the tolerance value will be removed. Specify 0.0 to prevent deleting vertices which are close together.

options
SIS_CLEAN_LINE_NONE Delete LineString segments only if shorter than tolerance#.
SIS_CLEAN_LINE_REMOVE_0 Remove vertices which are in the middle of a straight LineString section.
SIS_CLEAN_LINE_REMOVE_180 Remove vertices which are causing spikes in the LineString.
SIS_CLEAN_LINE_REMOVE_SELF Remove sections of the LineString between self intersections.

Add together the options SIS_CLEAN_LINE_REMOVE_0, SIS_CLEAN_LINE_REMOVE_180, and SIS_CLEAN_LINE_REMOVE_SELF to perform several types of cleaning at once.

Remarks

Available: GEO OD SISpy

Group:

Example

sis.CleanLines ("LinesFound", 1, SIS_CLEAN_LINE_NONE)

cleans all the LineStrings in the list, deleting all the segments that have a length shorter than the tolerance.

sis.CleanLines ("Temp", 500, SIS_CLEAN_LINE_REMOVE_SELF)

cleans all the LineStrings in the list Temp, removing sections of the LineString between self intersections.