QGIS API Documentation
3.14.0-Pi (9f7028fd23)
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
w
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
z
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
2
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
2
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
c
e
f
g
h
k
l
m
o
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Related Functions
a
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Variables
a
b
c
d
e
f
g
h
i
l
n
o
p
q
r
s
t
u
w
Typedefs
a
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
Enumerator
Macros
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
w
y
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
src
analysis
network
qgsgraphbuilder.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
qgsgraphbuilder.cpp
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
21
#include "
qgsgraphbuilder.h
"
22
#include "
qgsgraph.h
"
23
24
#include "
qgsgeometry.h
"
25
26
QgsGraphBuilder::QgsGraphBuilder
(
const
QgsCoordinateReferenceSystem
&
crs
,
bool
otfEnabled,
double
topologyTolerance,
const
QString &ellipsoidID )
27
:
QgsGraphBuilderInterface
(
crs
, otfEnabled, topologyTolerance, ellipsoidID )
28
{
29
mGraph =
new
QgsGraph
();
30
}
31
32
QgsGraphBuilder::~QgsGraphBuilder
()
33
{
34
delete
mGraph;
35
}
36
37
void
QgsGraphBuilder::addVertex
(
int
,
const
QgsPointXY
&pt )
38
{
39
mGraph->
addVertex
( pt );
40
}
41
42
void
QgsGraphBuilder::addEdge
(
int
pt1id,
const
QgsPointXY
&,
int
pt2id,
const
QgsPointXY
&,
const
QVector< QVariant > &prop )
43
{
44
mGraph->
addEdge
( pt1id, pt2id, prop );
45
}
46
47
QgsGraph
*
QgsGraphBuilder::graph
()
48
{
49
QgsGraph
*res = mGraph;
50
mGraph =
nullptr
;
51
return
res;
52
}
qgsgraph.h
QgsGraph
Mathematical graph representation.
Definition:
qgsgraph.h:141
qgsgraphbuilder.h
QgsGraph::addVertex
int addVertex(const QgsPointXY &pt)
Add a vertex to the graph.
Definition:
qgsgraph.cpp:23
crs
const QgsCoordinateReferenceSystem & crs
Definition:
qgswfsgetfeature.cpp:105
QgsGraphBuilder::QgsGraphBuilder
QgsGraphBuilder(const QgsCoordinateReferenceSystem &crs, bool otfEnabled=true, double topologyTolerance=0.0, const QString &ellipsoidID="WGS84")
Default constructor.
Definition:
qgsgraphbuilder.cpp:26
QgsGraphBuilder::addEdge
void addEdge(int pt1id, const QgsPointXY &pt1, int pt2id, const QgsPointXY &pt2, const QVector< QVariant > &prop) override
Add edge to the graph.
Definition:
qgsgraphbuilder.cpp:42
QgsGraphBuilderInterface
Determine interface for creating a graph. Contains the settings of the graph. QgsGraphBuilder and Qgs...
Definition:
qgsgraphbuilderinterface.h:40
QgsGraphBuilder::graph
QgsGraph * graph()
Returns generated QgsGraph.
Definition:
qgsgraphbuilder.cpp:47
QgsGraphBuilder::~QgsGraphBuilder
~QgsGraphBuilder() override
Definition:
qgsgraphbuilder.cpp:32
QgsCoordinateReferenceSystem
Definition:
qgscoordinatereferencesystem.h:206
QgsPointXY
Definition:
qgspointxy.h:43
qgsgeometry.h
QgsGraphBuilder::addVertex
void addVertex(int id, const QgsPointXY &pt) override
Add vertex to the graph.
Definition:
qgsgraphbuilder.cpp:37
QgsGraph::addEdge
int addEdge(int fromVertexIdx, int toVertexIdx, const QVector< QVariant > &strategies)
Add an edge to the graph, going from the fromVertexIdx to toVertexIdx.
Definition:
qgsgraph.cpp:29
Generated on Mon Jun 22 2020 05:14:09 for QGIS API Documentation by
1.8.17