2017-05-01 12:44:45 +03:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/analysis/network/qgsnetworkspeedstrategy.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-19 15:41:39 +02:00
|
|
|
class QgsNetworkSpeedStrategy : QgsNetworkStrategy
|
|
|
|
{
|
2017-05-01 12:44:45 +03:00
|
|
|
%Docstring
|
|
|
|
.. versionadded:: 3.0
|
|
|
|
Strategy for calculating edge cost based on travel time. Should be
|
|
|
|
used for finding fastest path between two points.
|
2016-11-19 15:41:39 +02:00
|
|
|
%End
|
|
|
|
|
2017-05-01 12:44:45 +03:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsnetworkspeedstrategy.h"
|
|
|
|
%End
|
2016-11-19 15:41:39 +02:00
|
|
|
public:
|
2017-05-01 12:44:45 +03:00
|
|
|
|
2016-11-19 15:41:39 +02:00
|
|
|
QgsNetworkSpeedStrategy( int attributeId, double defaultValue, double toMetricFactor );
|
2017-05-01 12:44:45 +03:00
|
|
|
%Docstring
|
|
|
|
Default constructor
|
|
|
|
%End
|
|
|
|
|
|
|
|
virtual QVariant cost( double distance, const QgsFeature &f ) const;
|
|
|
|
|
|
|
|
%Docstring
|
|
|
|
Returns edge cost
|
|
|
|
:rtype: QVariant
|
|
|
|
%End
|
2016-11-19 15:41:39 +02:00
|
|
|
|
2017-05-01 12:44:45 +03:00
|
|
|
virtual QgsAttributeList requiredAttributes() const;
|
|
|
|
|
|
|
|
%Docstring
|
|
|
|
Returns list of the source layer attributes needed for cost calculation.
|
|
|
|
This method called by QgsGraphDirector.
|
|
|
|
:rtype: QgsAttributeList
|
|
|
|
%End
|
2016-11-19 15:41:39 +02:00
|
|
|
|
|
|
|
};
|
2017-05-01 12:44:45 +03:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/analysis/network/qgsnetworkspeedstrategy.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|