38 #include <QLinkedList>
43 #include "qgis_core.h"
80 friend class PolygonCostCalculator;
85 PointSet(
int nbPoints,
double *x,
double *y );
91 std::unique_ptr< PointSet > extractShape(
int nbPtSh,
int imin,
int imax,
int fps,
int fpe,
double fptx,
double fpty );
96 std::unique_ptr< PointSet > clone()
const;
104 bool containsPoint(
double x,
double y )
const;
115 bool containsLabelCandidate(
double x,
double y,
double width,
double height,
double alpha = 0 )
const;
125 static void splitPolygons( QLinkedList<PointSet *> &inputShapes,
126 QLinkedList<PointSet *> &outputShapes,
127 double xrm,
double yrm );
137 void extendLineByDistance(
double startDistance,
double endDistance,
double smoothDistance );
148 double minDistanceToPoint(
double px,
double py,
double *rx =
nullptr,
double *ry =
nullptr )
const;
150 void getCentroid(
double &px,
double &py,
bool forceInside =
false )
const;
166 bool boundingBoxIntersects(
const PointSet *other )
const;
181 void getPointByDistance(
double *d,
double *ad,
double dl,
double *px,
double *py );
186 const GEOSGeometry *
geos()
const;
191 double length()
const;
201 bool isClosed()
const;
204 std::vector< double >
x;
205 std::vector< double >
y;
208 mutable GEOSGeometry *mGeos =
nullptr;
209 mutable bool mOwnsGeom =
false;
211 int *cHull =
nullptr;
219 mutable double mArea = -1;
220 mutable double mLength = -1;
228 void createGeosGeom()
const;
229 const GEOSPreparedGeometry *preparedGeom()
const;
230 void invalidateGeos();
232 double xmin = std::numeric_limits<double>::max();
233 double xmax = std::numeric_limits<double>::lowest();
234 double ymin = std::numeric_limits<double>::max();
235 double ymax = std::numeric_limits<double>::lowest();
239 mutable const GEOSPreparedGeometry *mGeosPreparedBoundary =
nullptr;
240 mutable const GEOSPreparedGeometry *mPreparedGeom =
nullptr;
A rectangle specified with double values.
Calculates label candidate costs considering different factors.
Main class to handle feature.
LabelPosition is a candidate feature label position.
A set of features which influence the labeling process.
The underlying raw pal geometry class.
QgsRectangle boundingBox() const
Returns the point set bounding box.
PointSet * getHoleOf() const
Returns nullptr if this isn't a hole. Otherwise returns pointer to parent pointset.
Contains geos related utilities and functions.
Represents the minimum area, oriented bounding box surrounding a convex hull.