QGIS API Documentation  3.0.2-Girona (307d082)
qgsinternalgeometryengine.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsinternalgeometryengine.h - QgsInternalGeometryEngine
3 
4  ---------------------
5  begin : 13.1.2016
6  copyright : (C) 2016 by Matthias Kuhn
7  email : [email protected]
8  ***************************************************************************
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  ***************************************************************************/
16 #ifndef QGSINTERNALGEOMETRYENGINE_H
17 #define QGSINTERNALGEOMETRYENGINE_H
18 
19 #define SIP_NO_FILE
20 
21 class QgsGeometry;
23 
35 {
36  public:
37 
43  explicit QgsInternalGeometryEngine( const QgsGeometry &geometry );
44 
53  QgsGeometry extrude( double x, double y ) const;
54 
64  QgsGeometry poleOfInaccessibility( double precision, double *distanceFromBoundary = nullptr ) const;
65 
74  QgsGeometry orthogonalize( double tolerance = 1.0E-8, int maxIterations = 1000, double angleThreshold = 15.0 ) const;
75 
84  QgsGeometry densifyByCount( int extraNodesPerSegment ) const;
85 
99  QgsGeometry densifyByDistance( double distance ) const;
100 
101  private:
102  const QgsAbstractGeometry *mGeometry = nullptr;
103 };
104 
105 #endif // QGSINTERNALGEOMETRYENGINE_H
QgsInternalGeometryEngine(const QgsGeometry &geometry)
The caller is responsible that the geometry is available and unchanged for the whole lifetime of this...
QgsGeometry poleOfInaccessibility(double precision, double *distanceFromBoundary=nullptr) const
Calculates the approximate pole of inaccessibility for a surface, which is the most distant internal ...
A geometry is the spatial representation of a feature.
Definition: qgsgeometry.h:111
QgsGeometry densifyByDistance(double distance) const
Densifies the geometry by adding regularly placed extra nodes inside each segment so that the maximum...
Abstract base class for all geometries.
This class offers geometry processing methods.
QgsGeometry orthogonalize(double tolerance=1.0E-8, int maxIterations=1000, double angleThreshold=15.0) const
Attempts to orthogonalize a line or polygon geometry by shifting vertices to make the geometries angl...
QgsGeometry densifyByCount(int extraNodesPerSegment) const
Densifies the geometry by adding the specified number of extra nodes within each segment of the geome...
QgsGeometry extrude(double x, double y) const
Will extrude a line or (segmentized) curve by a given offset and return a polygon representation of i...