QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
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
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
20QgsGraphBuilderInterface::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
30{
31 Q_UNUSED( id )
32 Q_UNUSED( pt )
33}
34
35void QgsGraphBuilderInterface::addEdge( int pt1id, const QgsPointXY &pt1, int pt2id, const QgsPointXY &pt2, const QVector<QVariant> &strategies )
36{
37 Q_UNUSED( pt1id )
38 Q_UNUSED( pt1 )
39 Q_UNUSED( pt2id )
40 Q_UNUSED( pt2 )
41 Q_UNUSED( strategies )
42}
This class represents a coordinate reference system (CRS).
void setSourceCrs(const QgsCoordinateReferenceSystem &crs, const QgsCoordinateTransformContext &context)
Sets source spatial reference system crs.
bool setEllipsoid(const QString &ellipsoid)
Sets the ellipsoid by its acronym.
virtual void addVertex(int id, const QgsPointXY &pt)
Add vertex to the graph.
QgsGraphBuilderInterface(const QgsCoordinateReferenceSystem &crs, bool ctfEnabled=true, double topologyTolerance=0.0, const QString &ellipsoidID="WGS84")
Default constructor.
virtual void addEdge(int pt1id, const QgsPointXY &pt1, int pt2id, const QgsPointXY &pt2, const QVector< QVariant > &strategies)
Add edge to the graph.
A class to represent a 2D point.
Definition qgspointxy.h:60
static QgsProject * instance()
Returns the QgsProject singleton instance.
const QgsCoordinateReferenceSystem & crs