Skip To Content

CleanupGraphSettings

Graph cleanup settings.

@example:
# Settings class used to control parameters for cleanupGraph operation
cleanupSettings = CleanupGraphSettings()
cleanupSettings.setIntersectSegments(True)
cleanupSettings.setMergeNodes(True)
cleanupSettings.setMergingDist(10)
cleanupSettings.setSnapNodesToSegments(True)
cleanupSettings.setSnappingDist(10)
cleanupSettings.setResolveConflictShapes(True)
graphlayer = ce.getObjectsFrom(ce.scene, ce.isGraphLayer)
ce.cleanupGraph(graphlayer, cleanupSettings)

 

Methods defined here:

getIntersectSegments

getIntersectSegments(self):

Gets IntersectSegments field.

@return: Value of IntersectSegments field.  [True/False]

getMergeNodes

getMergeNodes(self):

Gets MergeNodes field.

@return: Value of MergeNodes field.  [True/False]

getMergingDist

getMergingDist(self):

Gets MergingDist field. The minimum horizontal distance between two nodes before they are merged.

@return: Value of MergingDist field.  [float]

getMergingHeight

getMergingHeight(self):

Gets MergingHeight field. The minimum vertical distance between two nodes before they are merged.

@return: Value of MergingHeight field.  [float]

getResolveConflictShapes

getResolveConflictShapes(self):

Gets ResolveConflictShapes field. If enabled, edges with street shape conflicts are collapsed.

@return: Value of ResolveConflictShapes field.  [True/False]

getSnapNodesToSegments

getSnapNodesToSegments(self):

Gets SnapNodesToSegments field.

@return: Value of SnapNodesToSegments field.  [True/False]

getSnappingDist

getSnappingDist(self):

Gets SnappingDist field. Before intersections are detected, graph sgement are extended by this distance horizontally.

@return: Value of SnappingDist field.  [float]

getSnappingHeight

getSnappingHeight(self):

Gets SnappingHeight field. Before intersections are detected, graph sgement are extended by this distance vertically.

@return: Value of SnappingHeight field.  [float]

setIntersectSegments

setIntersectSegments(self, booleanValue):

Sets IntersectSegments field. If enabled, the selected graph segments are intersected with each other. If intersections occur, the corresponding segments are replaced with two smaller ones. Distance searched for intersection is specified by snapping parameters, below.

@param booleanValue: the new value. [True/False]

setMergeNodes

setMergeNodes(self, booleanValue):

Sets MergeNodes field. If enabled, the selected graph nodes are merged with each other.

@param booleanValue: the new value. [True/False]

setMergingDist

setMergingDist(self, floatValue):

Sets MergingDist field. The minimum horizontal distance between two nodes before they are merged.

@param floatValue: the new value. [float]

setMergingHeight

setMergingHeight(self, floatValue):

Sets MergingHeight field. The minimum vertical distance between two nodes before they are merged.

@param floatValue: the new value. [float]

setResolveConflictShapes

setResolveConflictShapes(self, booleanValue):

Sets ResolveConflictShapes field. If enabled, edges with street shape conflicts are collapsed.

@param booleanValue: the new value. [True/False]

setSnapNodesToSegments

setSnapNodesToSegments(self, booleanValue):

Sets SnapNodesToSegments field. If enabled, nodes snap to the nearest edge.

@param booleanValue: the new value. [True/False]

setSnappingDist

setSnappingDist(self, floatValue):

Sets SnappingDist field. Before intersections are detected, graph sgement are extended by this distance horizontally.

@param floatValue: the new value. [float]

setSnappingHeight

setSnappingHeight(self, floatValue):

Sets SnappingHeight field. Before intersections are detected, graph sgement are extended by this distance vertically.

@param floatValue: the new value. [float]