QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
Classes | Typedefs | Functions
qgstracer.cpp File Reference
#include "qgstracer.h"
#include "qgsgeometry.h"
#include "qgsgeometryutils.h"
#include "qgsgeos.h"
#include "qgslogger.h"
#include "qgsvectorlayer.h"
#include <queue>
#include <vector>
Include dependency graph for qgstracer.cpp:

Go to the source code of this file.


struct  comp
struct  QgsTracerGraph::E
struct  QgsTracerGraph
 Simple graph structure for shortest path search. More...
struct  QgsTracerGraph::V


typedef std::pair< int, double > DijkstraQueueItem


double closestSegment (const QgsPolyline &pl, const QgsPoint &pt, int &vertexAfter, double epsilon)
double distance2D (const QgsPolyline &coords)
void extractLinework (const QgsGeometry *g, QgsMultiPolyline &mpl)
int joinVertexToGraph (QgsTracerGraph &g, const QgsPoint &pt)
QgsTracerGraphmakeGraph (const QVector< QgsPolyline > &edges)
int point2edge (const QgsTracerGraph &g, const QgsPoint &pt, int &lineVertexAfter, double epsilon=1e-6)
int point2vertex (const QgsTracerGraph &g, const QgsPoint &pt, double epsilon=1e-6)
int pointInGraph (QgsTracerGraph &g, const QgsPoint &pt)
void resetGraph (QgsTracerGraph &g)
QVector< QgsPointshortestPath (const QgsTracerGraph &g, int v1, int v2)
void splitLinestring (const QgsPolyline &points, const QgsPoint &pt, int lineVertexAfter, QgsPolyline &pts1, QgsPolyline &pts2)

Typedef Documentation

◆ DijkstraQueueItem

typedef std::pair<int, double> DijkstraQueueItem

Definition at line 27 of file qgstracer.cpp.

Function Documentation

◆ closestSegment()

double closestSegment ( const QgsPolyline pl,
const QgsPoint pt,
int &  vertexAfter,
double  epsilon 

Definition at line 62 of file qgstracer.cpp.

◆ distance2D()

double distance2D ( const QgsPolyline coords)

Definition at line 40 of file qgstracer.cpp.

◆ extractLinework()

void extractLinework ( const QgsGeometry g,
QgsMultiPolyline mpl 

Definition at line 409 of file qgstracer.cpp.

◆ joinVertexToGraph()

int joinVertexToGraph ( QgsTracerGraph g,
const QgsPoint pt 

Definition at line 310 of file qgstracer.cpp.

◆ makeGraph()

QgsTracerGraph* makeGraph ( const QVector< QgsPolyline > &  edges)

Definition at line 123 of file qgstracer.cpp.

◆ point2edge()

int point2edge ( const QgsTracerGraph g,
const QgsPoint pt,
int &  lineVertexAfter,
double  epsilon = 1e-6 

Definition at line 272 of file qgstracer.cpp.

◆ point2vertex()

int point2vertex ( const QgsTracerGraph g,
const QgsPoint pt,
double  epsilon = 1e-6 

Definition at line 257 of file qgstracer.cpp.

◆ pointInGraph()

int pointInGraph ( QgsTracerGraph g,
const QgsPoint pt 

Definition at line 363 of file qgstracer.cpp.

◆ resetGraph()

void resetGraph ( QgsTracerGraph g)

Definition at line 375 of file qgstracer.cpp.

◆ shortestPath()

QVector<QgsPoint> shortestPath ( const QgsTracerGraph g,
int  v1,
int  v2 

Definition at line 176 of file qgstracer.cpp.

◆ splitLinestring()

void splitLinestring ( const QgsPolyline points,
const QgsPoint pt,
int  lineVertexAfter,
QgsPolyline pts1,
QgsPolyline pts2 

Definition at line 293 of file qgstracer.cpp.