QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
Public Member Functions | List of all members
QgsNetworkDistanceStrategy Class Reference

Strategy for calculating edge cost based on its length. Should be used for finding shortest path between two points. More...

#include <qgsnetworkdistancestrategy.h>

Inheritance diagram for QgsNetworkDistanceStrategy:
Inheritance graph
[legend]

Public Member Functions

QVariant cost (double distance, const QgsFeature &) const override
 Returns edge cost. More...
 
- Public Member Functions inherited from QgsNetworkStrategy
 QgsNetworkStrategy ()=default
 Default constructor. More...
 
virtual ~QgsNetworkStrategy ()=default
 
virtual QSet< int > requiredAttributes () const
 Returns a list of the source layer attributes needed for cost calculation. More...
 

Detailed Description

Strategy for calculating edge cost based on its length. Should be used for finding shortest path between two points.

Since
QGIS 3.0

Definition at line 29 of file qgsnetworkdistancestrategy.h.

Member Function Documentation

◆ cost()

QVariant QgsNetworkDistanceStrategy::cost ( double  distance,
const QgsFeature f 
) const
overridevirtual

Returns edge cost.

Implements QgsNetworkStrategy.

Definition at line 18 of file qgsnetworkdistancestrategy.cpp.


The documentation for this class was generated from the following files: