QGIS/python/analysis/network/qgsvectorlayerdirector.sip

56 lines
1.8 KiB
Plaintext
Raw Normal View History

2011-06-02 19:02:20 +06:00
/**
* \ingroup analysis
* \class QgsVectorLayerDirector
2011-06-02 19:02:20 +06:00
* \brief Determine making the graph from vector line layer
*/
class QgsVectorLayerDirector : QgsGraphDirector
2011-06-02 19:02:20 +06:00
{
%TypeHeaderCode
#include <qgsvectorlayerdirector.h>
2011-06-02 19:02:20 +06:00
%End
public:
/** 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)
*/
2016-11-21 11:29:02 +02:00
enum Direction
{
2016-11-21 11:29:02 +02:00
DirectionForward, //!< One-way direct
DirectionBackward, //!< One-way reversed
DirectionBoth, //!< Two-way
};
2011-06-02 19:02:20 +06:00
/**
2011-06-03 11:51:53 +06:00
* @param myLayer source vector layer
2011-06-02 19:02:20 +06:00
* @param directionFieldId feield contain road direction value
* @param directDirectionValue value for one-way road
* @param reverseDirectionValue value for reverse one-way road
* @param bothDirectionValue value for road
* @param defaultDirection default direction. Will be used if corresponding
* attribute value is not set or does not equal to the given values
2011-06-02 19:02:20 +06:00
*/
QgsVectorLayerDirector( QgsVectorLayer* myLayer,
int directionFieldId,
const QString& directDirectionValue,
const QString& reverseDirectionValue,
const QString& bothDirectionValue,
const Direction defaultDirection
);
2011-06-02 19:02:20 +06:00
//! Destructor
virtual ~QgsVectorLayerDirector();
2011-06-02 19:02:20 +06:00
/*
* MANDATORY DIRECTOR PROPERTY DECLARATION
*/
void makeGraph( QgsGraphBuilderInterface *builder,
const QVector< QgsPoint >& additionalPoints,
QVector< QgsPoint>& snappedPoints /Out/ ) const;
2011-06-02 19:02:20 +06:00
QString name() const;
};