Class: QgsVectorLayerDirector

class qgis.analysis.QgsVectorLayerDirector(source: QgsFeatureSource, directionFieldId: int, directDirectionValue: str, reverseDirectionValue: str, bothDirectionValue: str, defaultDirection: QgsVectorLayerDirector.Direction)

Bases: QgsGraphDirector

Default constructor

Parameters
  • source (QgsFeatureSource) – feature source representing network

  • directionFieldId (int) – field containing direction value

  • directDirectionValue (str) – value for direct one-way road

  • reverseDirectionValue (str) – value for reversed one-way road

  • bothDirectionValue (str) – value for two-way (bidirectional) road

  • defaultDirection (QgsVectorLayerDirector.Direction) – default direction. Will be used if corresponding attribute value is not set or does not equal to the given values

Determine making the graph from vector line layer

class Direction

Bases: int

DirectionBackward = 1
DirectionBoth = 2
DirectionForward = 0
childEvent()
connectNotify()
customEvent()
disconnectNotify()
isSignalConnected()
makeGraph(self, builder: QgsGraphBuilderInterface, additionalPoints: Iterable[QgsPointXY], feedback: QgsFeedback = None) → List[QgsPointXY]

MANDATORY DIRECTOR PROPERTY DECLARATION

Parameters
Return type

List[QgsPointXY]

name(self) → str
Return type

str

receivers()
sender()
senderSignalIndex()
timerEvent()