|
QGIS API Documentation 4.1.0-Master (60fea48833c)
|
#include "qgsinternalgeometryengine.h"#include <functional>#include <geos_c.h>#include <memory>#include <random>#include "qgscircle.h"#include "qgscircularstring.h"#include "qgsfeedback.h"#include "qgsgeometry.h"#include "qgsgeometryengine.h"#include "qgsgeometryutils.h"#include "qgsgeos.h"#include "qgslinesegment.h"#include "qgslinestring.h"#include "qgsmulticurve.h"#include "qgsmultilinestring.h"#include "qgsmultipolygon.h"#include "qgspolygon.h"#include "qgstessellator.h"#include <QString>#include <QTransform>#include <queue>
Go to the source code of this file.
Enumerations | |
| enum class | Direction { Up , Right , Down , Left , None } |
Functions | |
| std::unique_ptr< QgsAbstractGeometry > | applyDashPatternPrivate (const QgsAbstractGeometry *geom, const QVector< double > &pattern, Qgis::DashPatternLineEndingRule startRule, Qgis::DashPatternLineEndingRule endRule, Qgis::DashPatternSizeAdjustment adjustment, double patternOffset) |
| QgsVector | calcMotion (const QgsPoint &a, const QgsPoint &b, const QgsPoint &c, double lowerThreshold, double upperThreshold) |
| std::unique_ptr< QgsAbstractGeometry > | convertGeometryToCurves (const QgsAbstractGeometry *geom, double distanceTolerance, double angleTolerance) |
| std::unique_ptr< QgsMultiLineString > | dashPatternAlongLine (const QgsLineString *line, const QVector< double > &pattern, Qgis::DashPatternLineEndingRule startRule, Qgis::DashPatternLineEndingRule endRule, Qgis::DashPatternSizeAdjustment adjustment, double patternOffset) |
| QgsAbstractGeometry * | densifyGeometry (const QgsAbstractGeometry *geom, int extraNodesPerSegment=1, double distance=1) |
| QgsLineString * | doDensify (const QgsLineString *ring, int extraNodesPerSegment=-1, double distance=1) |
| QgsLineString * | doOrthogonalize (QgsLineString *ring, int iterations, double tolerance, double lowerThreshold, double upperThreshold) |
| bool | dotProductWithinAngleTolerance (double dotProduct, double lowerThreshold, double upperThreshold) |
| QVector< QgsPointXY > | generateSegmentCurve (const QgsPoint ¢er1, const double radius1, const QgsPoint ¢er2, const double radius2) |
| Direction | getEdgeDirection (const QgsPoint &p1, const QgsPoint &p2, double maxDev) |
| Determines the direction of an edge from p1 to p2. | |
| std::pair< bool, std::array< Direction, 4 > > | getEdgeDirections (const QgsPolygon *g, double maxDev) |
| Checks whether the polygon consists of four nearly axis-parallel sides. | |
| bool | isClockwise (std::array< Direction, 4 > dirs) |
| Checks whether the 4 directions in dirs make up a clockwise rectangle. | |
| bool | isCounterClockwise (std::array< Direction, 4 > dirs) |
| Checks whether the 4 directions in dirs make up a counter-clockwise rectangle. | |
| std::unique_ptr< QgsCurve > | lineToCurve (const QgsCurve *curve, double distanceTolerance, double pointSpacingAngleTolerance) |
| bool | matchesOrientation (std::array< Direction, 4 > dirs, std::array< Direction, 4 > oriented) |
| double | normalizedDotProduct (const QgsPoint &a, const QgsPoint &b, const QgsPoint &c) |
| QgsAbstractGeometry * | orthogonalizeGeom (const QgsAbstractGeometry *geom, int maxIterations, double tolerance, double lowerThreshold, double upperThreshold) |
| QVector< QgsPointXY > | randomPointsInPolygonGeosBackend (const QgsAbstractGeometry *geometry, int count, const std::function< bool(const QgsPointXY &) > &acceptPoint, unsigned long seed, QgsFeedback *feedback, int maxTriesPerPoint, QString &error) |
| QVector< QgsPointXY > | randomPointsInPolygonPoly2TriBackend (const QgsAbstractGeometry *geometry, int count, const std::function< bool(const QgsPointXY &) > &acceptPoint, unsigned long seed, QgsFeedback *feedback, int maxTriesPerPoint, QString &error) |
| std::unique_ptr< QgsLineString > | roundWavesAlongLine (const QgsLineString *line, double wavelength, const double amplitude, const bool strictWavelength) |
| std::unique_ptr< QgsAbstractGeometry > | roundWavesPrivate (const QgsAbstractGeometry *geom, double wavelength, double amplitude, bool strictWavelength) |
| std::unique_ptr< QgsLineString > | roundWavesRandomizedAlongLine (const QgsLineString *line, const double minimumWavelength, const double maximumWavelength, const double minimumAmplitude, const double maximumAmplitude, std::uniform_real_distribution<> &uniformDist, std::mt19937 &mt) |
| std::unique_ptr< QgsAbstractGeometry > | roundWavesRandomizedPrivate (const QgsAbstractGeometry *geom, double minimumWavelength, double maximumWavelength, double minimumAmplitude, double maximumAmplitude, std::uniform_real_distribution<> &uniformDist, std::mt19937 &mt) |
| double | squareness (QgsLineString *ring, double lowerThreshold, double upperThreshold) |
| std::unique_ptr< QgsLineString > | squareWavesAlongLine (const QgsLineString *line, double wavelength, const double amplitude, const bool strictWavelength) |
| std::unique_ptr< QgsAbstractGeometry > | squareWavesPrivate (const QgsAbstractGeometry *geom, double wavelength, double amplitude, bool strictWavelength) |
| std::unique_ptr< QgsLineString > | squareWavesRandomizedAlongLine (const QgsLineString *line, const double minimumWavelength, const double maximumWavelength, const double minimumAmplitude, const double maximumAmplitude, std::uniform_real_distribution<> &uniformDist, std::mt19937 &mt) |
| std::unique_ptr< QgsAbstractGeometry > | squareWavesRandomizedPrivate (const QgsAbstractGeometry *geom, double minimumWavelength, double maximumWavelength, double minimumAmplitude, double maximumAmplitude, std::uniform_real_distribution<> &uniformDist, std::mt19937 &mt) |
| std::unique_ptr< QgsLineString > | triangularWavesAlongLine (const QgsLineString *line, double wavelength, const double amplitude, const bool strictWavelength) |
| std::unique_ptr< QgsAbstractGeometry > | triangularWavesPrivate (const QgsAbstractGeometry *geom, double wavelength, double amplitude, bool strictWavelength) |
| std::unique_ptr< QgsLineString > | triangularWavesRandomizedAlongLine (const QgsLineString *line, const double minimumWavelength, const double maximumWavelength, const double minimumAmplitude, const double maximumAmplitude, std::uniform_real_distribution<> &uniformDist, std::mt19937 &mt) |
| std::unique_ptr< QgsAbstractGeometry > | triangularWavesRandomizedPrivate (const QgsAbstractGeometry *geom, double minimumWavelength, double maximumWavelength, double minimumAmplitude, double maximumAmplitude, std::uniform_real_distribution<> &uniformDist, std::mt19937 &mt) |
|
strong |
| Enumerator | |
|---|---|
| Up | |
| Right | |
| Down | |
| Left | |
| None | |
Definition at line 55 of file qgsinternalgeometryengine.cpp.
| std::unique_ptr< QgsAbstractGeometry > applyDashPatternPrivate | ( | const QgsAbstractGeometry * | geom, |
| const QVector< double > & | pattern, | ||
| Qgis::DashPatternLineEndingRule | startRule, | ||
| Qgis::DashPatternLineEndingRule | endRule, | ||
| Qgis::DashPatternSizeAdjustment | adjustment, | ||
| double | patternOffset ) |
Definition at line 3081 of file qgsinternalgeometryengine.cpp.
| QgsVector calcMotion | ( | const QgsPoint & | a, |
| const QgsPoint & | b, | ||
| const QgsPoint & | c, | ||
| double | lowerThreshold, | ||
| double | upperThreshold ) |
Definition at line 500 of file qgsinternalgeometryengine.cpp.
| std::unique_ptr< QgsAbstractGeometry > convertGeometryToCurves | ( | const QgsAbstractGeometry * | geom, |
| double | distanceTolerance, | ||
| double | angleTolerance ) |
Definition at line 1726 of file qgsinternalgeometryengine.cpp.
| std::unique_ptr< QgsMultiLineString > dashPatternAlongLine | ( | const QgsLineString * | line, |
| const QVector< double > & | pattern, | ||
| Qgis::DashPatternLineEndingRule | startRule, | ||
| Qgis::DashPatternLineEndingRule | endRule, | ||
| Qgis::DashPatternSizeAdjustment | adjustment, | ||
| double | patternOffset ) |
Definition at line 2850 of file qgsinternalgeometryengine.cpp.
| QgsAbstractGeometry * densifyGeometry | ( | const QgsAbstractGeometry * | geom, |
| int | extraNodesPerSegment = 1, | ||
| double | distance = 1 ) |
Definition at line 761 of file qgsinternalgeometryengine.cpp.
| QgsLineString * doDensify | ( | const QgsLineString * | ring, |
| int | extraNodesPerSegment = -1, | ||
| double | distance = 1 ) |
Definition at line 670 of file qgsinternalgeometryengine.cpp.
| QgsLineString * doOrthogonalize | ( | QgsLineString * | ring, |
| int | iterations, | ||
| double | tolerance, | ||
| double | lowerThreshold, | ||
| double | upperThreshold ) |
Definition at line 534 of file qgsinternalgeometryengine.cpp.
| bool dotProductWithinAngleTolerance | ( | double | dotProduct, |
| double | lowerThreshold, | ||
| double | upperThreshold ) |
Definition at line 438 of file qgsinternalgeometryengine.cpp.
| QVector< QgsPointXY > generateSegmentCurve | ( | const QgsPoint & | center1, |
| const double | radius1, | ||
| const QgsPoint & | center2, | ||
| const double | radius2 ) |
Definition at line 1014 of file qgsinternalgeometryengine.cpp.
Determines the direction of an edge from p1 to p2.
maxDev is the tangent of the maximum allowed edge deviation angle. If the edge deviates more than the allowed angle, Direction::None will be returned.
Definition at line 69 of file qgsinternalgeometryengine.cpp.
| std::pair< bool, std::array< Direction, 4 > > getEdgeDirections | ( | const QgsPolygon * | g, |
| double | maxDev ) |
Checks whether the polygon consists of four nearly axis-parallel sides.
All consecutive edges having the same direction are considered to belong to the same side.
Definition at line 96 of file qgsinternalgeometryengine.cpp.
| bool isClockwise | ( | std::array< Direction, 4 > | dirs | ) |
Checks whether the 4 directions in dirs make up a clockwise rectangle.
Definition at line 148 of file qgsinternalgeometryengine.cpp.
| bool isCounterClockwise | ( | std::array< Direction, 4 > | dirs | ) |
Checks whether the 4 directions in dirs make up a counter-clockwise rectangle.
Definition at line 158 of file qgsinternalgeometryengine.cpp.
| std::unique_ptr< QgsCurve > lineToCurve | ( | const QgsCurve * | curve, |
| double | distanceTolerance, | ||
| double | pointSpacingAngleTolerance ) |
Definition at line 1497 of file qgsinternalgeometryengine.cpp.
Definition at line 134 of file qgsinternalgeometryengine.cpp.
Definition at line 443 of file qgsinternalgeometryengine.cpp.
| QgsAbstractGeometry * orthogonalizeGeom | ( | const QgsAbstractGeometry * | geom, |
| int | maxIterations, | ||
| double | tolerance, | ||
| double | lowerThreshold, | ||
| double | upperThreshold ) |
Definition at line 606 of file qgsinternalgeometryengine.cpp.
| QVector< QgsPointXY > randomPointsInPolygonGeosBackend | ( | const QgsAbstractGeometry * | geometry, |
| int | count, | ||
| const std::function< bool(const QgsPointXY &) > & | acceptPoint, | ||
| unsigned long | seed, | ||
| QgsFeedback * | feedback, | ||
| int | maxTriesPerPoint, | ||
| QString & | error ) |
Definition at line 1360 of file qgsinternalgeometryengine.cpp.
| QVector< QgsPointXY > randomPointsInPolygonPoly2TriBackend | ( | const QgsAbstractGeometry * | geometry, |
| int | count, | ||
| const std::function< bool(const QgsPointXY &) > & | acceptPoint, | ||
| unsigned long | seed, | ||
| QgsFeedback * | feedback, | ||
| int | maxTriesPerPoint, | ||
| QString & | error ) |
Definition at line 1214 of file qgsinternalgeometryengine.cpp.
| std::unique_ptr< QgsLineString > roundWavesAlongLine | ( | const QgsLineString * | line, |
| double | wavelength, | ||
| const double | amplitude, | ||
| const bool | strictWavelength ) |
Definition at line 2446 of file qgsinternalgeometryengine.cpp.
| std::unique_ptr< QgsAbstractGeometry > roundWavesPrivate | ( | const QgsAbstractGeometry * | geom, |
| double | wavelength, | ||
| double | amplitude, | ||
| bool | strictWavelength ) |
Definition at line 2704 of file qgsinternalgeometryengine.cpp.
| std::unique_ptr< QgsLineString > roundWavesRandomizedAlongLine | ( | const QgsLineString * | line, |
| const double | minimumWavelength, | ||
| const double | maximumWavelength, | ||
| const double | minimumAmplitude, | ||
| const double | maximumAmplitude, | ||
| std::uniform_real_distribution<> & | uniformDist, | ||
| std::mt19937 & | mt ) |
Definition at line 2563 of file qgsinternalgeometryengine.cpp.
| std::unique_ptr< QgsAbstractGeometry > roundWavesRandomizedPrivate | ( | const QgsAbstractGeometry * | geom, |
| double | minimumWavelength, | ||
| double | maximumWavelength, | ||
| double | minimumAmplitude, | ||
| double | maximumAmplitude, | ||
| std::uniform_real_distribution<> & | uniformDist, | ||
| std::mt19937 & | mt ) |
Definition at line 2733 of file qgsinternalgeometryengine.cpp.
| double squareness | ( | QgsLineString * | ring, |
| double | lowerThreshold, | ||
| double | upperThreshold ) |
Definition at line 456 of file qgsinternalgeometryengine.cpp.
| std::unique_ptr< QgsLineString > squareWavesAlongLine | ( | const QgsLineString * | line, |
| double | wavelength, | ||
| const double | amplitude, | ||
| const bool | strictWavelength ) |
Definition at line 2143 of file qgsinternalgeometryengine.cpp.
| std::unique_ptr< QgsAbstractGeometry > squareWavesPrivate | ( | const QgsAbstractGeometry * | geom, |
| double | wavelength, | ||
| double | amplitude, | ||
| bool | strictWavelength ) |
Definition at line 2300 of file qgsinternalgeometryengine.cpp.
| std::unique_ptr< QgsLineString > squareWavesRandomizedAlongLine | ( | const QgsLineString * | line, |
| const double | minimumWavelength, | ||
| const double | maximumWavelength, | ||
| const double | minimumAmplitude, | ||
| const double | maximumAmplitude, | ||
| std::uniform_real_distribution<> & | uniformDist, | ||
| std::mt19937 & | mt ) |
Definition at line 2216 of file qgsinternalgeometryengine.cpp.
| std::unique_ptr< QgsAbstractGeometry > squareWavesRandomizedPrivate | ( | const QgsAbstractGeometry * | geom, |
| double | minimumWavelength, | ||
| double | maximumWavelength, | ||
| double | minimumAmplitude, | ||
| double | maximumAmplitude, | ||
| std::uniform_real_distribution<> & | uniformDist, | ||
| std::mt19937 & | mt ) |
Definition at line 2329 of file qgsinternalgeometryengine.cpp.
| std::unique_ptr< QgsLineString > triangularWavesAlongLine | ( | const QgsLineString * | line, |
| double | wavelength, | ||
| const double | amplitude, | ||
| const bool | strictWavelength ) |
Definition at line 1857 of file qgsinternalgeometryengine.cpp.
| std::unique_ptr< QgsAbstractGeometry > triangularWavesPrivate | ( | const QgsAbstractGeometry * | geom, |
| double | wavelength, | ||
| double | amplitude, | ||
| bool | strictWavelength ) |
Definition at line 1996 of file qgsinternalgeometryengine.cpp.
| std::unique_ptr< QgsLineString > triangularWavesRandomizedAlongLine | ( | const QgsLineString * | line, |
| const double | minimumWavelength, | ||
| const double | maximumWavelength, | ||
| const double | minimumAmplitude, | ||
| const double | maximumAmplitude, | ||
| std::uniform_real_distribution<> & | uniformDist, | ||
| std::mt19937 & | mt ) |
Definition at line 1921 of file qgsinternalgeometryengine.cpp.
| std::unique_ptr< QgsAbstractGeometry > triangularWavesRandomizedPrivate | ( | const QgsAbstractGeometry * | geom, |
| double | minimumWavelength, | ||
| double | maximumWavelength, | ||
| double | minimumAmplitude, | ||
| double | maximumAmplitude, | ||
| std::uniform_real_distribution<> & | uniformDist, | ||
| std::mt19937 & | mt ) |
Definition at line 2025 of file qgsinternalgeometryengine.cpp.