QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
analysis
network
qgsgraphbuilder.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsgraphbuilder.h
3
--------------------------------------
4
Date : 2010-10-25
5
Copyright : (C) 2010 by Yakushev Sergey
6
Email : YakushevS@list.ru
7
****************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGSGRAPHBUILDER_H
17
#define QGSGRAPHBUILDER_H
18
19
#include "qgis_analysis.h"
20
#include "
qgis_sip.h
"
21
#include "
qgsgraphbuilderinterface.h
"
22
#include "
qgsspatialindex.h
"
23
24
class
QgsDistanceArea
;
25
class
QgsCoordinateTransform
;
26
class
QgsGraph
;
27
33
34
class
ANALYSIS_EXPORT
QgsGraphBuilder
:
public
QgsGraphBuilderInterface
SIP_NODEFAULTCTORS
35
{
36
public
:
40
QgsGraphBuilder
(
const
QgsCoordinateReferenceSystem
&crs,
bool
otfEnabled =
true
,
double
topologyTolerance
= 0.0,
const
QString &ellipsoidID =
"WGS84"
);
41
42
~QgsGraphBuilder
()
override
;
43
44
/*
45
* MANDATORY BUILDER PROPERTY DECLARATION
46
*/
47
int
addVertex
(
int
id
,
const
QgsPointXY
&pt )
override
;
48
49
void
addEdge
(
int
pt1id,
const
QgsPointXY
&pt1,
int
pt2id,
const
QgsPointXY
&pt2,
const
QVector<QVariant> &prop )
override
;
50
58
QgsGraph
graph
()
const
;
59
66
std::unique_ptr< QgsGraph >
takeGraph
();
67
68
private
:
69
std::unique_ptr<QgsGraph> mGraph;
70
71
QgsGraphBuilder
(
const
QgsGraphBuilder
& ) =
delete
;
72
QgsGraphBuilder
&operator=(
const
QgsGraphBuilder
& ) =
delete
;
73
};
74
75
// clazy:excludeall=qstring-allocations
76
77
#endif
// QGSGRAPHBUILDER_H
QgsCoordinateReferenceSystem
Represents a coordinate reference system (CRS).
Definition
qgscoordinatereferencesystem.h:216
QgsCoordinateTransform
Handles coordinate transforms between two coordinate systems.
Definition
qgscoordinatetransform.h:63
QgsDistanceArea
A general purpose distance and area calculator, capable of performing ellipsoid based calculations.
Definition
qgsdistancearea.h:54
QgsGraphBuilderInterface::addVertex
virtual int addVertex(int id, const QgsPointXY &pt)
Add vertex to the graph.
Definition
qgsgraphbuilderinterface.cpp:29
QgsGraphBuilderInterface::QgsGraphBuilderInterface
QgsGraphBuilderInterface(const QgsCoordinateReferenceSystem &crs, bool ctfEnabled=true, double topologyTolerance=0.0, const QString &ellipsoidID="WGS84")
Default constructor.
Definition
qgsgraphbuilderinterface.cpp:20
QgsGraphBuilderInterface::addEdge
virtual void addEdge(int pt1id, const QgsPointXY &pt1, int pt2id, const QgsPointXY &pt2, const QVector< QVariant > &strategies)
Add edge to the graph.
Definition
qgsgraphbuilderinterface.cpp:36
QgsGraphBuilderInterface::topologyTolerance
double topologyTolerance() const
Returns topology tolerance.
Definition
qgsgraphbuilderinterface.h:73
QgsGraphBuilder::~QgsGraphBuilder
~QgsGraphBuilder() override
QgsGraphBuilder::QgsGraphBuilder
QgsGraphBuilder(const QgsCoordinateReferenceSystem &crs, bool otfEnabled=true, double topologyTolerance=0.0, const QString &ellipsoidID="WGS84")
Default constructor.
Definition
qgsgraphbuilder.cpp:20
QgsGraphBuilder::graph
QgsGraph graph() const
Returns the generated QgsGraph.
Definition
qgsgraphbuilder.cpp:37
QgsGraphBuilder::takeGraph
std::unique_ptr< QgsGraph > takeGraph()
Takes the generated graph from the builder, resetting the builder back to its initial state ready for...
Definition
qgsgraphbuilder.cpp:42
QgsGraph
Mathematical graph representation.
Definition
qgsgraph.h:131
QgsPointXY
Represents a 2D point.
Definition
qgspointxy.h:62
qgis_sip.h
SIP_NODEFAULTCTORS
#define SIP_NODEFAULTCTORS
Definition
qgis_sip.h:108
qgsgraphbuilderinterface.h
qgsspatialindex.h
Generated on
for QGIS API Documentation by
1.17.0