62 double x[4] = {0, 0, 0, 0};
63 double y[4] = {0, 0, 0, 0};
93 std::unique_ptr< PointSet >
extractShape(
int nbPtSh,
int imin,
int imax,
int fps,
int fpe,
double fptx,
double fpty );
98 std::unique_ptr< PointSet >
clone()
const;
129 static QLinkedList<PointSet *>
splitPolygons(
PointSet *inputShape,
double labelWidth,
double labelHeight );
155 double minDistanceToPoint(
double px,
double py,
double *rx =
nullptr,
double *ry =
nullptr )
const;
157 void getCentroid(
double &px,
double &py,
bool forceInside =
false )
const;
173 bool boundingBoxIntersects(
const PointSet *other )
const;
188 void getPointByDistance(
double *d,
double *ad,
double dl,
double *px,
double *py )
const;
198 double lineLocatePoint(
const GEOSGeometry *point )
const;
208 double length()
const;
218 bool isClosed()
const;
223 QString toWkt()
const;
228 std::tuple< std::vector< double >,
double > edgeDistances()
const;
231 std::vector< double >
x;
232 std::vector< double >
y;
259 double xmin = std::numeric_limits<double>::max();
260 double xmax = std::numeric_limits<double>::lowest();
261 double ymin = std::numeric_limits<double>::max();
262 double ymax = std::numeric_limits<double>::lowest();
266 mutable const GEOSPreparedGeometry *mGeosPreparedBoundary =
nullptr;
267 mutable const GEOSPreparedGeometry *mPreparedGeom =
nullptr;
270 mutable const GEOSPreparedGeometry *mMultipartPreparedGeos =
nullptr;
A rectangle specified with double values.
The underlying raw pal geometry class.
std::unique_ptr< PointSet > clone() const
Returns a copy of the point set.
friend class LabelPosition
bool containsLabelCandidate(double x, double y, double width, double height, double alpha=0) const
Tests whether a possible label candidate will fit completely within the shape.
void extendLineByDistance(double startDistance, double endDistance, double smoothDistance)
Extends linestrings by the specified amount at the start and end of the line, by extending the existi...
PointSet * getHoleOf() const
Returns nullptr if this isn't a hole. Otherwise returns pointer to parent pointset.
void createGeosGeom() const
friend class CostCalculator
friend class PolygonCostCalculator
void getCentroid(double &px, double &py, bool forceInside=false) const
OrientedConvexHullBoundingBox computeConvexHullOrientedBoundingBox(bool &ok) const
Computes an oriented bounding box for the shape's convex hull.
QgsRectangle boundingBox() const
Returns the point set bounding box.
void offsetCurveByDistance(double distance)
Offsets linestrings by the specified distance.
std::vector< int > convexHull
const GEOSPreparedGeometry * preparedGeom() const
void invalidateGeos() const
double minDistanceToPoint(double px, double py, double *rx=nullptr, double *ry=nullptr) const
Returns the squared minimum distance between the point set geometry and the point (px,...
std::unique_ptr< PointSet > extractShape(int nbPtSh, int imin, int imax, int fps, int fpe, double fptx, double fpty)
Does... something completely inscrutable.
bool containsPoint(double x, double y) const
Tests whether point set contains a specified point.
static QLinkedList< PointSet * > splitPolygons(PointSet *inputShape, double labelWidth, double labelHeight)
Split a polygon using some random logic into some other polygons.
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