Determine making the graph from vector line layer.
More...
#include <qgsvectorlayerdirector.h>
|
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...
|
|
|
| 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...
|
|
| ~QgsGraphDirector () override |
|
void | addStrategy (QgsNetworkStrategy *prop) |
| Add optimization strategy. More...
|
|
virtual void | makeGraph (QgsGraphBuilderInterface *builder, const QVector< QgsPointXY > &additionalPoints, QVector< QgsPointXY > &snappedPoints, QgsFeedback *feedback=nullptr) const |
| Make a graph using QgsGraphBuilder. More...
|
|
virtual QString | name () const =0 |
| Returns director name. More...
|
|
Determine making the graph from vector line layer.
- Since
- QGIS 3.0
Definition at line 33 of file qgsvectorlayerdirector.h.
◆ Direction
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::QgsVectorLayerDirector |
( |
QgsFeatureSource * |
source, |
|
|
int |
directionFieldId, |
|
|
const QString & |
directDirectionValue, |
|
|
const QString & |
reverseDirectionValue, |
|
|
const QString & |
bothDirectionValue, |
|
|
Direction |
defaultDirection |
|
) |
| |
Default constructor.
- Parameters
-
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.
◆ makeGraph()
Make a graph using QgsGraphBuilder.
- Parameters
-
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 |
- Note
- if snappedPoints[i] == QgsPointXY(0.0,0.0) then snapping failed.
Reimplemented from QgsGraphDirector.
Definition at line 169 of file qgsvectorlayerdirector.cpp.
◆ name()
QString QgsVectorLayerDirector::name |
( |
| ) |
const |
|
overridevirtual |
The documentation for this class was generated from the following files: