38 #include <QLinkedList> 41 #include "qgis_core.h" 78 PointSet(
int nbPoints,
double *
x,
double *
y );
81 PointSet *extractShape(
int nbPtSh,
int imin,
int imax,
int fps,
int fpe,
double fptx,
double fpty );
89 bool containsPoint(
double x,
double y )
const;
100 bool containsLabelCandidate(
double x,
double y,
double width,
double height,
double alpha = 0 )
const;
107 static void splitPolygons( QLinkedList<PointSet *> &shapes_toProcess,
108 QLinkedList<PointSet *> &shapes_final,
109 double xrm,
double yrm );
120 double minDistanceToPoint(
double px,
double py,
double *rx =
nullptr,
double *ry =
nullptr )
const;
122 void getCentroid(
double &px,
double &py,
bool forceInside =
false )
const;
147 void getPointByDistance(
double *d,
double *ad,
double dl,
double *px,
double *py );
152 const GEOSGeometry *
geos()
const;
162 bool isClosed()
const;
165 mutable GEOSGeometry *mGeos =
nullptr;
166 mutable bool mOwnsGeom =
false;
172 int *cHull =
nullptr;
185 void createGeosGeom()
const;
186 const GEOSPreparedGeometry *preparedGeom()
const;
187 void invalidateGeos();
189 double xmin = std::numeric_limits<double>::max();
190 double xmax = std::numeric_limits<double>::lowest();
191 double ymin = std::numeric_limits<double>::max();
192 double ymax = std::numeric_limits<double>::lowest();
196 mutable const GEOSPreparedGeometry *mPreparedGeom =
nullptr;
PointSet * getHoleOf()
Returns NULL if this isn't a hole. Otherwise returns pointer to parent pointset.
A set of features which influence the labeling process.
struct pal::_cHullBox CHullBox
Main class to handle feature.
Contains geos related utilities and functions.
void getBoundingBox(double min[2], double max[2]) const
LabelPosition is a candidate feature label position.
Data structure to compute polygon's candidates costs.