QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
analysis
network
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 "qgis_analysis.h"
20
#include "
qgscoordinatereferencesystem.h
"
21
#include "
qgsdistancearea.h
"
22
23
#include <QVariant>
24
#include <QVector>
25
26
class
QgsPoint
;
27
28
#ifdef SIP_RUN
29
//%ModuleHeaderCode
30
#include <
qgsgraphbuilder.h
>
31
//%End
32
#endif
33
43
class
ANALYSIS_EXPORT
QgsGraphBuilderInterface
44
{
45
#ifdef SIP_RUN
46
SIP_CONVERT_TO_SUBCLASS_CODE
47
if
(
dynamic_cast<
QgsGraphBuilder
*
>
( sipCpp ) != NULL )
48
sipType = sipType_QgsGraphBuilder;
49
else
50
sipType = NULL;
51
SIP_END
52
#endif
53
54
public
:
62
QgsGraphBuilderInterface
(
const
QgsCoordinateReferenceSystem
&crs,
bool
ctfEnabled =
true
,
double
topologyTolerance
= 0.0,
const
QString &ellipsoidID =
"WGS84"
);
63
64
virtual
~QgsGraphBuilderInterface
() =
default
;
65
67
QgsCoordinateReferenceSystem
destinationCrs
()
const
{
return
mCrs; }
68
70
bool
coordinateTransformationEnabled
()
const
{
return
mCtfEnabled; }
71
73
double
topologyTolerance
()
const
{
return
mTopologyTolerance; }
74
76
QgsDistanceArea
*
distanceArea
() {
return
&mDa; }
77
86
virtual
int
addVertex(
int
id
,
const
QgsPointXY
&pt );
87
97
virtual
void
addEdge(
int
pt1id,
const
QgsPointXY
&pt1,
int
pt2id,
const
QgsPointXY
&pt2,
const
QVector<QVariant> &strategies );
98
99
private
:
100
QgsCoordinateReferenceSystem
mCrs;
101
102
QgsDistanceArea
mDa;
103
104
bool
mCtfEnabled;
105
106
double
mTopologyTolerance;
107
};
108
109
// clazy:excludeall=qstring-allocations
110
111
#endif
// QGSGRAPHBUILDERINTERFACE_H
QgsCoordinateReferenceSystem
Represents a coordinate reference system (CRS).
Definition
qgscoordinatereferencesystem.h:216
QgsDistanceArea
A general purpose distance and area calculator, capable of performing ellipsoid based calculations.
Definition
qgsdistancearea.h:54
QgsGraphBuilderInterface::destinationCrs
QgsCoordinateReferenceSystem destinationCrs() const
Returns destinaltion CRS.
Definition
qgsgraphbuilderinterface.h:67
QgsGraphBuilderInterface::distanceArea
QgsDistanceArea * distanceArea()
Returns measurement tool.
Definition
qgsgraphbuilderinterface.h:76
QgsGraphBuilderInterface::QgsGraphBuilderInterface
QgsGraphBuilderInterface(const QgsCoordinateReferenceSystem &crs, bool ctfEnabled=true, double topologyTolerance=0.0, const QString &ellipsoidID="WGS84")
Default constructor.
Definition
qgsgraphbuilderinterface.cpp:20
QgsGraphBuilderInterface::topologyTolerance
double topologyTolerance() const
Returns topology tolerance.
Definition
qgsgraphbuilderinterface.h:73
QgsGraphBuilderInterface::~QgsGraphBuilderInterface
virtual ~QgsGraphBuilderInterface()=default
QgsGraphBuilderInterface::coordinateTransformationEnabled
bool coordinateTransformationEnabled() const
Returns coordinate transformation enabled.
Definition
qgsgraphbuilderinterface.h:70
QgsGraphBuilder
Used for making the QgsGraph object.
Definition
qgsgraphbuilder.h:35
QgsPointXY
Represents a 2D point.
Definition
qgspointxy.h:62
QgsPoint
Point geometry type, with support for z-dimension and m-values.
Definition
qgspoint.h:53
SIP_CONVERT_TO_SUBCLASS_CODE
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition
qgis_sip.h:203
SIP_END
#define SIP_END
Definition
qgis_sip.h:220
qgscoordinatereferencesystem.h
qgsdistancearea.h
qgsgraphbuilder.h
Generated on
for QGIS API Documentation by
1.17.0