QGIS API Documentation
3.8.0-Zanzibar (11aff65)
|
Determine making the graph from vector line layer. More...
#include <qgsvectorlayerdirector.h>
Public Types | |
enum | Direction { DirectionForward, DirectionBackward, DirectionBoth } |
Edge direction Edge can be one-way with direct flow (one can move only from the start point to the end point), one-way with reversed flow (one can move only from the end point to the start point) and bidirectional or two-way (one can move in any direction) More... | |
Public Member Functions | |
QgsVectorLayerDirector (QgsFeatureSource *source, int directionFieldId, const QString &directDirectionValue, const QString &reverseDirectionValue, const QString &bothDirectionValue, Direction defaultDirection) | |
Default constructor. More... | |
void | makeGraph (QgsGraphBuilderInterface *builder, const QVector< QgsPointXY > &additionalPoints, QVector< QgsPointXY > &snappedPoints, QgsFeedback *feedback=nullptr) const override |
Make a graph using QgsGraphBuilder. More... | |
QString | name () const override |
Returns director name. More... | |
Public Member Functions inherited from QgsGraphDirector | |
~QgsGraphDirector () override | |
void | addStrategy (QgsNetworkStrategy *prop) |
Add optimization strategy. More... | |
Additional Inherited Members | |
Protected Attributes inherited from QgsGraphDirector | |
QList< QgsNetworkStrategy * > | mStrategies |
Determine making the graph from vector line layer.
Definition at line 33 of file qgsvectorlayerdirector.h.
Edge direction Edge can be one-way with direct flow (one can move only from the start point to the end point), one-way with reversed flow (one can move only from the end point to the start point) and bidirectional or two-way (one can move in any direction)
Enumerator | |
---|---|
DirectionForward | One-way direct. |
DirectionBackward | One-way reversed. |
DirectionBoth | Two-way. |
Definition at line 46 of file qgsvectorlayerdirector.h.
QgsVectorLayerDirector::QgsVectorLayerDirector | ( | QgsFeatureSource * | source, |
int | directionFieldId, | ||
const QString & | directDirectionValue, | ||
const QString & | reverseDirectionValue, | ||
const QString & | bothDirectionValue, | ||
Direction | defaultDirection | ||
) |
Default constructor.
source | feature source representing network |
directionFieldId | field containing direction value |
directDirectionValue | value for direct one-way road |
reverseDirectionValue | value for reversed one-way road |
bothDirectionValue | value for two-way (bidirectional) road |
defaultDirection | default direction. Will be used if corresponding attribute value is not set or does not equal to the given values |
Definition at line 57 of file qgsvectorlayerdirector.cpp.
|
overridevirtual |
Make a graph using QgsGraphBuilder.
builder | the graph builder |
additionalPoints | list of points that should be snapped to the graph |
snappedPoints | list of snapped points |
feedback | feedback object for reporting progress |
Reimplemented from QgsGraphDirector.
Definition at line 169 of file qgsvectorlayerdirector.cpp.
|
overridevirtual |
Returns director name.
Implements QgsGraphDirector.
Definition at line 72 of file qgsvectorlayerdirector.cpp.