61 double x[4] = {0, 0, 0, 0};
62 double y[4] = {0, 0, 0, 0};
81 friend class PolygonCostCalculator;
86 PointSet(
int nbPoints,
double *x,
double *y );
92 std::unique_ptr< PointSet > extractShape(
int nbPtSh,
int imin,
int imax,
int fps,
int fpe,
double fptx,
double fpty );
97 std::unique_ptr< PointSet > clone()
const;
105 bool containsPoint(
double x,
double y )
const;
116 bool containsLabelCandidate(
double x,
double y,
double width,
double height,
double alpha = 0 )
const;
128 static QLinkedList<PointSet *> splitPolygons(
PointSet *inputShape,
double labelWidth,
double labelHeight );
138 void extendLineByDistance(
double startDistance,
double endDistance,
double smoothDistance );
143 void offsetCurveByDistance(
double distance );
154 double minDistanceToPoint(
double px,
double py,
double *rx =
nullptr,
double *ry =
nullptr )
const;
156 void getCentroid(
double &px,
double &py,
bool forceInside =
false )
const;
172 bool boundingBoxIntersects(
const PointSet *other )
const;
187 void getPointByDistance(
double *d,
double *ad,
double dl,
double *px,
double *py )
const;
197 double lineLocatePoint(
const GEOSGeometry *point )
const;
207 double length()
const;
217 bool isClosed()
const;
222 QString toWkt()
const;
227 std::tuple< std::vector< double >,
double > edgeDistances()
const;
230 std::vector< double >
x;
231 std::vector< double >
y;
235 mutable bool mOwnsGeom =
false;
244 mutable double mArea = -1;
245 mutable double mLength = -1;
253 void createGeosGeom()
const;
254 const GEOSPreparedGeometry *preparedGeom()
const;
256 void invalidateGeos()
const;
258 double xmin = std::numeric_limits<double>::max();
259 double xmax = std::numeric_limits<double>::lowest();
260 double ymin = std::numeric_limits<double>::max();
261 double ymax = std::numeric_limits<double>::lowest();
265 mutable const GEOSPreparedGeometry *mGeosPreparedBoundary =
nullptr;
266 mutable const GEOSPreparedGeometry *mPreparedGeom =
nullptr;
269 mutable const GEOSPreparedGeometry *mMultipartPreparedGeos =
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.
PointSet * getHoleOf() const
Returns nullptr if this isn't a hole. Otherwise returns pointer to parent pointset.
QgsRectangle boundingBox() const
Returns the point set bounding box.
std::vector< int > convexHull
Contains geos related utilities and functions.
std::unique_ptr< GEOSGeometry, GeosDeleter > unique_ptr
Scoped GEOS pointer.
Represents the minimum area, oriented bounding box surrounding a convex hull.
struct GEOSGeom_t GEOSGeometry