QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
qgsgraphbuilder.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsgraphbuilder.h
3 --------------------------------------
4 Date : 2010-10-25
5 Copyright : (C) 2010 by Yakushev Sergey
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 QGSGRAPHBUILDER_H
17#define QGSGRAPHBUILDER_H
18
20#include "qgis_sip.h"
21
22#include "qgsspatialindex.h"
23#include "qgis_analysis.h"
24
25class QgsDistanceArea;
27class QgsGraph;
28
36{
37 public:
41 QgsGraphBuilder( const QgsCoordinateReferenceSystem &crs, bool otfEnabled = true, double topologyTolerance = 0.0, const QString &ellipsoidID = "WGS84" );
42
43 ~QgsGraphBuilder() override;
44
45 /*
46 * MANDATORY BUILDER PROPERTY DECLARATION
47 */
48 void addVertex( int id, const QgsPointXY &pt ) override;
49
50 void addEdge( int pt1id, const QgsPointXY &pt1, int pt2id, const QgsPointXY &pt2, const QVector<QVariant> &prop ) override;
51
59 QgsGraph graph() const;
60
67 QgsGraph *takeGraph() SIP_FACTORY;
68
69 private:
70 std::unique_ptr<QgsGraph> mGraph;
71
72 QgsGraphBuilder( const QgsGraphBuilder & ) = delete;
73 QgsGraphBuilder &operator=( const QgsGraphBuilder & ) = delete;
74};
75
76// clazy:excludeall=qstring-allocations
77
78#endif // QGSGRAPHBUILDER_H
This class represents a coordinate reference system (CRS).
Class for doing transforms between two map coordinate systems.
A general purpose distance and area calculator, capable of performing ellipsoid based calculations.
Determine interface for creating a graph.
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.
This class used for making the QgsGraph object.
~QgsGraphBuilder() override
Mathematical graph representation.
Definition qgsgraph.h:131
A class to represent a 2D point.
Definition qgspointxy.h:60
#define SIP_FACTORY
Definition qgis_sip.h:76
#define SIP_NODEFAULTCTORS
Definition qgis_sip.h:101
const QgsCoordinateReferenceSystem & crs