60 double x[4] = { 0, 0, 0, 0 };
61 double y[4] = { 0, 0, 0, 0 };
91 std::unique_ptr< PointSet >
extractShape(
int nbPtSh,
int imin,
int imax,
int fps,
int fpe,
double fptx,
double fpty );
96 std::unique_ptr< PointSet >
clone()
const;
127 static QVector<PointSet *>
splitPolygons(
PointSet *inputShape,
double labelWidth,
double labelHeight );
153 double minDistanceToPoint(
double px,
double py,
double *rx =
nullptr,
double *ry =
nullptr )
const;
155 void getCentroid(
double &px,
double &py,
bool forceInside =
false )
const;
168 bool boundingBoxIntersects(
const PointSet *other )
const;
183 void getPointByDistance(
double *d,
double *ad,
double dl,
double *px,
double *py )
const;
193 double lineLocatePoint(
const GEOSGeometry *point )
const;
203 double length()
const;
213 bool isClosed()
const;
218 QString toWkt()
const;
223 std::tuple< std::vector< double >,
double > edgeDistances()
const;
226 std::vector< double >
x;
227 std::vector< double >
y;
254 double xmin = std::numeric_limits<double>::max();
255 double xmax = std::numeric_limits<double>::lowest();
256 double ymin = std::numeric_limits<double>::max();
257 double ymax = std::numeric_limits<double>::lowest();
260 mutable const GEOSPreparedGeometry *mGeosPreparedBoundary =
nullptr;
261 mutable const GEOSPreparedGeometry *mPreparedGeom =
nullptr;
264 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