38 #include <QLinkedList> 43 #include "qgis_core.h" 80 PointSet(
int nbPoints,
double *
x,
double *
y );
83 PointSet *extractShape(
int nbPtSh,
int imin,
int imax,
int fps,
int fpe,
double fptx,
double fpty );
88 std::unique_ptr< PointSet > clone()
const;
96 bool containsPoint(
double x,
double y )
const;
107 bool containsLabelCandidate(
double x,
double y,
double width,
double height,
double alpha = 0 )
const;
114 static void splitPolygons( QLinkedList<PointSet *> &shapes_toProcess,
115 QLinkedList<PointSet *> &shapes_final,
116 double xrm,
double yrm );
126 void extendLineByDistance(
double startDistance,
double endDistance,
double smoothDistance );
137 double minDistanceToPoint(
double px,
double py,
double *rx =
nullptr,
double *ry =
nullptr )
const;
139 void getCentroid(
double &px,
double &py,
bool forceInside =
false )
const;
155 bool boundingBoxIntersects(
const PointSet *other )
const;
170 void getPointByDistance(
double *d,
double *ad,
double dl,
double *px,
double *py );
175 const GEOSGeometry *
geos()
const;
185 bool isClosed()
const;
188 std::vector< double >
x;
189 std::vector< double >
y;
192 mutable GEOSGeometry *mGeos =
nullptr;
193 mutable bool mOwnsGeom =
false;
195 int *cHull =
nullptr;
208 void createGeosGeom()
const;
209 const GEOSPreparedGeometry *preparedGeom()
const;
210 void invalidateGeos();
212 double xmin = std::numeric_limits<double>::max();
213 double xmax = std::numeric_limits<double>::lowest();
214 double ymin = std::numeric_limits<double>::max();
215 double ymax = std::numeric_limits<double>::lowest();
219 mutable const GEOSPreparedGeometry *mPreparedGeom =
nullptr;
PointSet * getHoleOf()
Returns nullptr 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
void getBoundingBox(double min[2], double max[2]) const
Main class to handle feature.
Contains geos related utilities and functions.
LabelPosition is a candidate feature label position.
Data structure to compute polygon's candidates costs.