QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
qgsgraphbuilderinterface.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsgraphbuilderinterface.h
3 --------------------------------------
4 Date : 2010-10-22
5 Copyright : (C) 2010 by Yakushev Sergey
6 Email : YakushevS <at> 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
16#ifndef QGSGRAPHBUILDERINTERFACE_H
17#define QGSGRAPHBUILDERINTERFACE_H
18
19#include <QVector>
20#include <QVariant>
21
23#include "qgsdistancearea.h"
24#include "qgis_analysis.h"
25
26class QgsPoint;
27
28#ifdef SIP_RUN
29//%ModuleHeaderCode
30#include <qgsgraphbuilder.h>
31//%End
32#endif
33
40class ANALYSIS_EXPORT QgsGraphBuilderInterface
41{
42#ifdef SIP_RUN
44 if ( dynamic_cast<QgsGraphBuilder *>( sipCpp ) != NULL )
45 sipType = sipType_QgsGraphBuilder;
46 else
47 sipType = NULL;
49#endif
50
51 public:
59 QgsGraphBuilderInterface( const QgsCoordinateReferenceSystem &crs, bool ctfEnabled = true, double topologyTolerance = 0.0, const QString &ellipsoidID = "WGS84" );
60
61 virtual ~QgsGraphBuilderInterface() = default;
62
65 {
66 return mCrs;
67 }
68
71 {
72 return mCtfEnabled;
73 }
74
76 double topologyTolerance() const
77 {
78 return mTopologyTolerance;
79 }
80
83 {
84 return &mDa;
85 }
86
93 virtual void addVertex( int id, const QgsPointXY &pt );
94
104 virtual void addEdge( int pt1id, const QgsPointXY &pt1, int pt2id, const QgsPointXY &pt2, const QVector<QVariant> &strategies );
105
106 private:
108
109 QgsDistanceArea mDa;
110
111 bool mCtfEnabled;
112
113 double mTopologyTolerance;
114};
115
116// clazy:excludeall=qstring-allocations
117
118#endif // QGSGRAPHBUILDERINTERFACE_H
This class represents a coordinate reference system (CRS).
A general purpose distance and area calculator, capable of performing ellipsoid based calculations.
Determine interface for creating a graph.
QgsCoordinateReferenceSystem destinationCrs() const
Returns destinaltion CRS.
QgsDistanceArea * distanceArea()
Returns measurement tool.
double topologyTolerance() const
Returns topology tolerance.
virtual ~QgsGraphBuilderInterface()=default
bool coordinateTransformationEnabled() const
Returns coordinate transformation enabled.
This class used for making the QgsGraph object.
A class to represent a 2D point.
Definition qgspointxy.h:60
Point geometry type, with support for z-dimension and m-values.
Definition qgspoint.h:49
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition qgis_sip.h:191
#define SIP_END
Definition qgis_sip.h:208
const QgsCoordinateReferenceSystem & crs