QGIS API Documentation 3.41.0-Master (af5edcb665c)
|
Strategy for calculating edge cost based on travel time. More...
#include <qgsnetworkspeedstrategy.h>
Public Member Functions | |
QgsNetworkSpeedStrategy (int attributeId, double defaultValue, double toMetricFactor) | |
Default constructor. | |
QVariant | cost (double distance, const QgsFeature &f) const override |
Returns edge cost. | |
QSet< int > | requiredAttributes () const override |
Returns a list of the source layer attributes needed for cost calculation. | |
Public Member Functions inherited from QgsNetworkStrategy | |
QgsNetworkStrategy ()=default | |
virtual | ~QgsNetworkStrategy ()=default |
Strategy for calculating edge cost based on travel time.
Should be used for finding fastest path between two points.
Definition at line 28 of file qgsnetworkspeedstrategy.h.
QgsNetworkSpeedStrategy::QgsNetworkSpeedStrategy | ( | int | attributeId, |
double | defaultValue, | ||
double | toMetricFactor | ||
) |
Default constructor.
Definition at line 18 of file qgsnetworkspeedstrategy.cpp.
|
overridevirtual |
Returns edge cost.
Implements QgsNetworkStrategy.
Definition at line 25 of file qgsnetworkspeedstrategy.cpp.
|
overridevirtual |
Returns a list of the source layer attributes needed for cost calculation.
This is method called by QgsGraphDirector.
Reimplemented from QgsNetworkStrategy.
Definition at line 39 of file qgsnetworkspeedstrategy.cpp.