QGIS API Documentation  3.14.0-Pi (9f7028fd23)
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 }
crs
const QgsCoordinateReferenceSystem & crs
Definition: qgswfsgetfeature.cpp:105
QgsProject::instance
static QgsProject * instance()
Returns the QgsProject singleton instance.
Definition: qgsproject.cpp:458
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
QgsDistanceArea::setEllipsoid
bool setEllipsoid(const QString &ellipsoid)
Sets the ellipsoid by its acronym.
Definition: qgsdistancearea.cpp:66
QgsGraphBuilderInterface::QgsGraphBuilderInterface
QgsGraphBuilderInterface(const QgsCoordinateReferenceSystem &crs, bool ctfEnabled=true, double topologyTolerance=0.0, const QString &ellipsoidID="WGS84")
Default constructor.
Definition: qgsgraphbuilderinterface.cpp:20
QgsDistanceArea::setSourceCrs
void setSourceCrs(const QgsCoordinateReferenceSystem &crs, const QgsCoordinateTransformContext &context)
Sets source spatial reference system crs.
Definition: qgsdistancearea.cpp:60
QgsCoordinateReferenceSystem
Definition: qgscoordinatereferencesystem.h:206
QgsPointXY
Definition: qgspointxy.h:43
QgsGraphBuilderInterface::addVertex
virtual void addVertex(int id, const QgsPointXY &pt)
Add vertex to the graph.
Definition: qgsgraphbuilderinterface.cpp:30
qgsgraphbuilderinterface.h
qgsproject.h