QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
analysis
network
qgsgraphbuilderinterface.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
qgsgraphbuilderinterface.cpp
3
--------------------------------------
4
Date : 2018-10-08
5
Copyright : (C) 2018 Denis Rouzaud
6
Email : denis@opengis.ch
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
#include "
qgsgraphbuilderinterface.h
"
17
18
#include "
qgsproject.h
"
19
20
QgsGraphBuilderInterface::QgsGraphBuilderInterface
(
const
QgsCoordinateReferenceSystem
&crs,
bool
ctfEnabled,
double
topologyTolerance
,
const
QString &ellipsoidID )
21
: mCrs( crs )
22
, mCtfEnabled( ctfEnabled )
23
, mTopologyTolerance(
topologyTolerance
)
24
{
25
mDa.setSourceCrs( mCrs,
QgsProject::instance
()->transformContext() );
26
mDa.setEllipsoid( ellipsoidID );
27
}
28
29
int
QgsGraphBuilderInterface::addVertex
(
int
id
,
const
QgsPointXY
&pt )
30
{
31
Q_UNUSED(
id
)
32
Q_UNUSED( pt )
33
return
0;
34
}
35
36
void
QgsGraphBuilderInterface::addEdge
(
int
pt1id,
const
QgsPointXY
&pt1,
int
pt2id,
const
QgsPointXY
&pt2,
const
QVector<QVariant> &strategies )
37
{
38
Q_UNUSED( pt1id )
39
Q_UNUSED( pt1 )
40
Q_UNUSED( pt2id )
41
Q_UNUSED( pt2 )
42
Q_UNUSED( strategies )
43
}
QgsCoordinateReferenceSystem
Represents a coordinate reference system (CRS).
Definition
qgscoordinatereferencesystem.h:216
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
QgsPointXY
Represents a 2D point.
Definition
qgspointxy.h:62
QgsProject::instance
static QgsProject * instance()
Returns the QgsProject singleton instance.
Definition
qgsproject.cpp:490
qgsgraphbuilderinterface.h
qgsproject.h
Generated on
for QGIS API Documentation by
1.17.0