QGIS API Documentation  3.6.0-Noosa (5873452)
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 : [email protected]
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 
17 
18 #include "qgsproject.h"
19 
21  double topologyTolerance, const QString &ellipsoidID )
22  : mCrs( crs )
23  , mCtfEnabled( ctfEnabled )
24  , mTopologyTolerance( topologyTolerance )
25 {
26  mDa.setSourceCrs( mCrs, QgsProject::instance()->transformContext() );
27  mDa.setEllipsoid( ellipsoidID );
28 }
29 
31 {
32  Q_UNUSED( id );
33  Q_UNUSED( pt );
34 }
35 
36 void QgsGraphBuilderInterface::addEdge( int pt1id, const QgsPointXY &pt1,
37  int pt2id, const QgsPointXY &pt2,
38  const QVector<QVariant> &strategies )
39 {
40  Q_UNUSED( pt1id );
41  Q_UNUSED( pt1 );
42  Q_UNUSED( pt2id );
43  Q_UNUSED( pt2 );
44  Q_UNUSED( strategies );
45 }
A class to represent a 2D point.
Definition: qgspointxy.h:43
bool setEllipsoid(const QString &ellipsoid)
Sets the ellipsoid by its acronym.
const QgsCoordinateReferenceSystem & crs
virtual void addVertex(int id, const QgsPointXY &pt)
Add vertex to the graph.
virtual void addEdge(int pt1id, const QgsPointXY &pt1, int pt2id, const QgsPointXY &pt2, const QVector< QVariant > &strategies)
Add edge to the graph.
QgsGraphBuilderInterface(const QgsCoordinateReferenceSystem &crs, bool ctfEnabled=true, double topologyTolerance=0.0, const QString &ellipsoidID="WGS84")
Default constructor.
static QgsProject * instance()
Returns the QgsProject singleton instance.
Definition: qgsproject.cpp:430
This class represents a coordinate reference system (CRS).
void setSourceCrs(const QgsCoordinateReferenceSystem &crs, const QgsCoordinateTransformContext &context)
Sets source spatial reference system crs.