PointSet class
Contents
Derived classes
- class FeaturePart
- Main class to handle feature.
- class LabelPosition
- LabelPosition is a candidate feature label position.
Public static functions
- static void splitPolygons(QLinkedList<PointSet*>& shapes_toProcess, QLinkedList<PointSet*>& shapes_final, double xrm, double yrm)
- Split a concave shape into several convex shapes.
Public functions
- auto containsLabelCandidate(double x, double y, double width, double height, double alpha = 0) const -> bool
- Tests whether a possible label candidate will fit completely within the shape.
- auto containsPoint(double x, double y) const -> bool
- Tests whether point set contains a specified point.
- auto geos() const -> const GEOSGeometry*
- Returns the point set's GEOS geometry.
- auto getHoleOf() -> PointSet*
- Returns NULL if this isn't a hole. Otherwise returns pointer to parent pointset.
- void getPointByDistance(double* d, double* ad, double dl, double* px, double* py)
- Gets a point a set distance along a line geometry.
- auto isClosed() const -> bool
- Returns true if pointset is closed.
- auto length() const -> double
- Returns length of line geometry.
- auto minDistanceToPoint(double px, double py, double* rx = nullptr, double* ry = nullptr) const -> double
- Returns the squared minimum distance between the point set geometry and the point (px,py) Optionally, the nearest point is stored in (rx,ry).
Function documentation
bool pal:: PointSet:: 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.
| Parameters | |
|---|---|
| x | x-coordinate of label candidate |
| y | y-coordinate of label candidate |
| width | label width |
| height | label height |
| alpha | label angle |
| Returns | true if point set completely contains candidate label |
bool pal:: PointSet:: containsPoint(double x,
double y) const
Tests whether point set contains a specified point.
| Parameters | |
|---|---|
| x | x-coordinate of point |
| y | y-coordinate of point |
| Returns | true if point set contains a specified point |
void pal:: PointSet:: getPointByDistance(double* d,
double* ad,
double dl,
double* px,
double* py)
Gets a point a set distance along a line geometry.
| Parameters | |
|---|---|
| d | array of distances between points |
| ad | cumulative total distance from pt0 to each point (ad0 = pt0->pt0) |
| dl | distance to traverse along line |
| px | final x coord on line |
| py | final y coord on line |
double pal:: PointSet:: 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,py) Optionally, the nearest point is stored in (rx,ry).
| Parameters | |
|---|---|
| px | x coordinate of the point |
| py | y coordinate of the points |
| rx | pointer to x coorinates of the nearest point (can be NULL) |
| ry | pointer to y coorinates of the nearest point (can be NULL) |
| Returns | minimum distance |