QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
analysis
network
qgsnetworkspeedstrategy.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsnetworkspeedstrategy.h
3
--------------------------------------
4
Date : 2011-04-01
5
Copyright : (C) 2010 by Yakushev Sergey
6
Email : YakushevS <at> list.ru
7
****************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGSNETWORKSPEEDSTRATEGY_H
17
#define QGSNETWORKSPEEDSTRATEGY_H
18
19
#include "qgis_analysis.h"
20
#include "
qgsnetworkstrategy.h
"
21
29
class
ANALYSIS_EXPORT
QgsNetworkSpeedStrategy
:
public
QgsNetworkStrategy
30
{
31
public
:
35
QgsNetworkSpeedStrategy
(
int
attributeId,
double
defaultValue,
double
toMetricFactor );
36
37
QVariant
cost
(
double
distance,
const
QgsFeature
&f )
const override
;
38
QSet<int>
requiredAttributes
()
const override
;
39
40
private
:
41
int
mAttributeId;
42
double
mDefaultValue;
43
double
mToMetricFactor;
44
};
45
46
#endif
// QGSNETWORKSPEEDSTRATEGY_H
QgsFeature
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Definition
qgsfeature.h:60
QgsNetworkSpeedStrategy::QgsNetworkSpeedStrategy
QgsNetworkSpeedStrategy(int attributeId, double defaultValue, double toMetricFactor)
Default constructor.
Definition
qgsnetworkspeedstrategy.cpp:18
QgsNetworkStrategy::cost
virtual QVariant cost(double distance, const QgsFeature &f) const =0
Returns edge cost.
QgsNetworkStrategy::QgsNetworkStrategy
QgsNetworkStrategy()=default
QgsNetworkStrategy::requiredAttributes
virtual QSet< int > requiredAttributes() const
Returns a list of the source layer attributes needed for cost calculation.
Definition
qgsnetworkstrategy.h:63
qgsnetworkstrategy.h
Generated on
for QGIS API Documentation by
1.17.0