Class: QgsNetworkSpeedStrategy

class qgis.analysis.QgsNetworkSpeedStrategy(attributeId: int, defaultValue: float, toMetricFactor: float)

Bases: QgsNetworkStrategy

Default constructor

QgsNetworkSpeedStrategy(QgsNetworkSpeedStrategy)

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

New in version 3.0.

Parameters
  • attributeId (int) –

  • defaultValue (float) –

  • toMetricFactor

cost(self, distance: float, f: QgsFeature) → Any
Parameters
Return type

Any

requiredAttributes(self) → object
Return type

object