Class: QgsNetworkSpeedStrategy

Strategy for calculating edge cost based on travel time. Should be used for finding fastest path between two points.

Class Hierarchy

Inheritance diagram of qgis.analysis.QgsNetworkSpeedStrategy

Base classes

QgsNetworkStrategy

QgsNetworkStrategy defines strategy used for calculation of the edge cost. For example it can take into account travel distance, amount of time or money. Currently there are two strategies implemented in the analysis library: QgsNetworkDistanceStrategy and QgsNetworkSpeedStrategy. QgsNetworkStrategy implemented using “strategy” design pattern.

class qgis.analysis.QgsNetworkSpeedStrategy[source]

Bases: QgsNetworkStrategy

__init__(attributeId: int, defaultValue: float, toMetricFactor: float)

Default constructor

Parameters:
  • attributeId (int)

  • defaultValue (float)

  • toMetricFactor (float)

__init__(a0: QgsNetworkSpeedStrategy)
Parameters:

a0 (QgsNetworkSpeedStrategy)