61 double x[4] = {0, 0, 0, 0};
62 double y[4] = {0, 0, 0, 0};
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;
128 static QVector<PointSet *>
splitPolygons(
PointSet *inputShape,
double labelWidth,
double labelHeight );
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;
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.
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.
static QVector< PointSet * > splitPolygons(PointSet *inputShape, double labelWidth, double labelHeight)
Split a polygon using some random logic into some other polygons.
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.
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