Network Edit.

197
1
10-02-2018 04:59 AM
MajdAlobied1
New Contributor II

Can one use  Cleanup graph with script in CityEngine to repair street?

Thanks alot.

Tags (1)
0 Kudos
1 Reply
ThomasFuchs
Esri Regular Contributor

Yes. There is a cleanup graph command in Python:
Python Scripting Command Reference: CE.cleanupGraph - CleanupGraphSettings 

        @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)

It works the same way as in the GUI.