|
static double | angleBetweenThreePoints (double x1, double y1, double x2, double y2, double x3, double y3) SIP_HOLDGIL |
| Calculates the angle between the lines AB and BC, where AB and BC described by points a, b and b, c. More...
|
|
static bool | angleBisector (double aX, double aY, double bX, double bY, double cX, double cY, double dX, double dY, double &pointX, double &pointY, double &angle) SIP_HOLDGIL |
| Returns the point (pointX, pointY) forming the bisector from segment (aX aY) (bX bY) and segment (bX, bY) (dX, dY). More...
|
|
static bool | angleOnCircle (double angle, double angle1, double angle2, double angle3) SIP_HOLDGIL |
| Returns true if an angle is between angle1 and angle3 on a circle described by angle1, angle2 and angle3. More...
|
|
static double | averageAngle (double a1, double a2) SIP_HOLDGIL |
| Averages two angles, correctly handling negative angles and ensuring the result is between 0 and 2 pi. More...
|
|
static double | averageAngle (double x1, double y1, double x2, double y2, double x3, double y3) SIP_HOLDGIL |
| Calculates the average angle (in radians) between the two linear segments from (x1, y1) to (x2, y2) and (x2, y2) to (x3, y3). More...
|
|
static bool | bisector (double aX, double aY, double bX, double bY, double cX, double cY, double &pointX, double &pointY) SIP_HOLDGIL |
| Returns the point (pointX, pointY) forming the bisector from point (aX, aY) to the segment (bX, bY) (cX, cY). More...
|
|
static double | ccwAngle (double dy, double dx) SIP_HOLDGIL |
| Returns the counter clockwise angle between a line with components dx, dy and the line with dx > 0 and dy = 0. More...
|
|
static bool | circleAngleBetween (double angle, double angle1, double angle2, bool clockwise) SIP_HOLDGIL |
| Returns true if, in a circle, angle is between angle1 and angle2. More...
|
|
static void | circleCenterRadius (const QgsPoint &pt1, const QgsPoint &pt2, const QgsPoint &pt3, double &radius, double ¢erX, double ¢erY) SIP_HOLDGIL |
| Returns radius and center of the circle through pt1, pt2, pt3. More...
|
|
static int | circleCircleInnerTangents (const QgsPointXY ¢er1, double radius1, const QgsPointXY ¢er2, double radius2, QgsPointXY &line1P1, QgsPointXY &line1P2, QgsPointXY &line2P1, QgsPointXY &line2P2) SIP_HOLDGIL |
| Calculates the inner tangent points for two circles, centered at center1 and center2 and with radii of radius1 and radius2 respectively. More...
|
|
static int | circleCircleIntersections (const QgsPointXY ¢er1, double radius1, const QgsPointXY ¢er2, double radius2, QgsPointXY &intersection1, QgsPointXY &intersection2) SIP_HOLDGIL |
| Calculates the intersections points between the circle with center center1 and radius radius1 and the circle with center center2 and radius radius2. More...
|
|
static int | circleCircleOuterTangents (const QgsPointXY ¢er1, double radius1, const QgsPointXY ¢er2, double radius2, QgsPointXY &line1P1, QgsPointXY &line1P2, QgsPointXY &line2P1, QgsPointXY &line2P2) SIP_HOLDGIL |
| Calculates the outer tangent points for two circles, centered at center1 and center2 and with radii of radius1 and radius2 respectively. More...
|
|
static bool | circleClockwise (double angle1, double angle2, double angle3) SIP_HOLDGIL |
| Returns true if the circle defined by three angles is ordered clockwise. More...
|
|
static double | circleLength (double x1, double y1, double x2, double y2, double x3, double y3) SIP_HOLDGIL |
| Length of a circular string segment defined by pt1, pt2, pt3. More...
|
|
static double | circleTangentDirection (const QgsPoint &tangentPoint, const QgsPoint &cp1, const QgsPoint &cp2, const QgsPoint &cp3) SIP_HOLDGIL |
| Calculates the direction angle of a circle tangent (clockwise from north in radians) More...
|
|
static QgsPoint | closestPoint (const QgsAbstractGeometry &geometry, const QgsPoint &point) |
| Returns the nearest point on a segment of a geometry for the specified point. More...
|
|
template<class T > |
static double | closestSegmentFromComponents (T &container, ComponentType ctype, const QgsPoint &pt, QgsPoint &segmentPt, QgsVertexId &vertexAfter, int *leftOf, double epsilon) |
|
static int | closestSideOfRectangle (double right, double bottom, double left, double top, double x, double y) |
| Returns a number representing the closest side of a rectangle defined by /a right, bottom, left, top to the point at (x, y), where the point may be in the interior of the rectangle or outside it. More...
|
|
static QgsPoint | closestVertex (const QgsAbstractGeometry &geom, const QgsPoint &pt, QgsVertexId &id) |
| Returns the closest vertex to a geometry for a specified point. More...
|
|
static void | coefficients (const QgsPoint &pt1, const QgsPoint &pt2, double &a, double &b, double &c) SIP_HOLDGIL |
| Returns the coefficients (a, b, c for equation "ax + by + c = 0") of a line defined by points pt1 and pt2. More...
|
|
static double | distanceToVertex (const QgsAbstractGeometry &geom, QgsVertexId id) |
| Returns the distance along a geometry from its first vertex to the specified vertex. More...
|
|
static double | distToInfiniteLine (const QgsPoint &point, const QgsPoint &linePoint1, const QgsPoint &linePoint2, double epsilon=1e-7) |
| Returns the distance between a point and an infinite line. More...
|
|
static QVector< QgsLineString * > | extractLineStrings (const QgsAbstractGeometry *geom) |
| Returns list of linestrings extracted from the passed geometry. More...
|
|
static double | gradient (const QgsPoint &pt1, const QgsPoint &pt2) SIP_HOLDGIL |
| Returns the gradient of a line defined by points pt1 and pt2. More...
|
|
static double | interpolateArcValue (double angle, double a1, double a2, double a3, double zm1, double zm2, double zm3) SIP_HOLDGIL |
| Interpolate a value at given angle on circular arc given values (zm1, zm2, zm3) at three different angles (a1, a2, a3). More...
|
|
static QgsPoint | interpolatePointOnArc (const QgsPoint &pt1, const QgsPoint &pt2, const QgsPoint &pt3, double distance) SIP_HOLDGIL |
| Interpolates a point on an arc defined by three points, pt1, pt2 and pt3. More...
|
|
static QgsPoint | interpolatePointOnLine (const QgsPoint &p1, const QgsPoint &p2, double fraction) SIP_HOLDGIL |
| Interpolates the position of a point a fraction of the way along the line from p1 to p2. More...
|
|
static QgsPointXY | interpolatePointOnLine (double x1, double y1, double x2, double y2, double fraction) SIP_HOLDGIL |
| Interpolates the position of a point a fraction of the way along the line from (x1, y1) to (x2, y2). More...
|
|
static QgsPointXY | interpolatePointOnLineByValue (double x1, double y1, double v1, double x2, double y2, double v2, double value) SIP_HOLDGIL |
| Interpolates the position of a point along the line from (x1, y1) to (x2, y2). More...
|
|
static int | leftOfLine (const double x, const double y, const double x1, const double y1, const double x2, const double y2) SIP_HOLDGIL |
| Returns a value < 0 if the point (x, y) is left of the line from (x1, y1) -> (x2, y2). More...
|
|
static int | leftOfLine (const QgsPoint &point, const QgsPoint &p1, const QgsPoint &p2) SIP_HOLDGIL |
| Returns a value < 0 if the point point is left of the line from p1 -> p2. More...
|
|
static double | lineAngle (double x1, double y1, double x2, double y2) SIP_HOLDGIL |
| Calculates the direction of line joining two points in radians, clockwise from the north direction. More...
|
|
static bool | lineCircleIntersection (const QgsPointXY ¢er, double radius, const QgsPointXY &linePoint1, const QgsPointXY &linePoint2, QgsPointXY &intersection) SIP_HOLDGIL |
| Compute the intersection of a line and a circle. More...
|
|
static bool | lineIntersection (const QgsPoint &p1, QgsVector v1, const QgsPoint &p2, QgsVector v2, QgsPoint &intersection) SIP_HOLDGIL |
| Computes the intersection between two lines. More...
|
|
static double | linePerpendicularAngle (double x1, double y1, double x2, double y2) SIP_HOLDGIL |
| Calculates the perpendicular angle to a line joining two points. More...
|
|
static bool | linesIntersection3D (const QgsVector3D &La1, const QgsVector3D &La2, const QgsVector3D &Lb1, const QgsVector3D &Lb2, QgsVector3D &intersection) SIP_HOLDGIL |
| An algorithm to calculate an (approximate) intersection of two lines in 3D. More...
|
|
static QgsPoint | midpoint (const QgsPoint &pt1, const QgsPoint &pt2) SIP_HOLDGIL |
| Returns a middle point between points pt1 and pt2. More...
|
|
static double | normalizedAngle (double angle) SIP_HOLDGIL |
| Ensures that an angle is in the range 0 <= angle < 2 pi. More...
|
|
static void | perpendicularCenterSegment (double centerPointX, double centerPointY, double segmentPoint1x, double segmentPoint1y, double segmentPoint2x, double segmentPoint2y, double &perpendicularSegmentPoint1x, double &perpendicularSegmentPoint1y, double &perpendicularSegmentPoint2x, double &perpendicularSegmentPoint2y, double segmentLength=0) SIP_HOLDGIL |
| Create a perpendicular line segment to a given segment [segmentPoint1,segmentPoint2] with its center at centerPoint. More...
|
|
static void | perpendicularOffsetPointAlongSegment (double x1, double y1, double x2, double y2, double proportion, double offset, double *x, double *y) |
| Calculates a point a certain proportion of the way along the segment from (x1, y1) to (x2, y2), offset from the segment by the specified offset amount. More...
|
|
static QgsLineString | perpendicularSegment (const QgsPoint &p, const QgsPoint &s1, const QgsPoint &s2) SIP_HOLDGIL |
| Create a perpendicular line segment from p to segment [s1, s2]. More...
|
|
static bool | pointContinuesArc (const QgsPoint &a1, const QgsPoint &a2, const QgsPoint &a3, const QgsPoint &b, double distanceTolerance, double pointSpacingAngleTolerance) SIP_HOLDGIL |
| Returns true if point b is on the arc formed by points a1, a2, and a3, but not within that arc portion already described by a1, a2 and a3. More...
|
|
static QgsPoint | pointOnLineWithDistance (const QgsPoint &startPoint, const QgsPoint &directionPoint, double distance) SIP_HOLDGIL |
| Returns a point a specified distance toward a second point. More...
|
|
static void | pointOnLineWithDistance (double x1, double y1, double x2, double y2, double distance, double &x, double &y, double *z1=nullptr, double *z2=nullptr, double *z=nullptr, double *m1=nullptr, double *m2=nullptr, double *m=nullptr) |
| Calculates the point a specified distance from (x1, y1) toward a second point (x2, y2). More...
|
|
static QgsPointSequence | pointsFromWKT (const QString &wktCoordinateList, bool is3D, bool isMeasure) |
| Returns a list of points contained in a WKT string. More...
|
|
static QDomElement | pointsToGML2 (const QgsPointSequence &points, QDomDocument &doc, int precision, const QString &ns, QgsAbstractGeometry::AxisOrder axisOrder=QgsAbstractGeometry::AxisOrder::XY) |
| Returns a gml::coordinates DOM element. More...
|
|
static QDomElement | pointsToGML3 (const QgsPointSequence &points, QDomDocument &doc, int precision, const QString &ns, bool is3D, QgsAbstractGeometry::AxisOrder axisOrder=QgsAbstractGeometry::AxisOrder::XY) |
| Returns a gml::posList DOM element. More...
|
|
static QString | pointsToJSON (const QgsPointSequence &points, int precision) |
| Returns a geoJSON coordinates string. More...
|
|
static json | pointsToJson (const QgsPointSequence &points, int precision) |
| Returns coordinates as json object. More...
|
|
static void | pointsToWKB (QgsWkbPtr &wkb, const QgsPointSequence &points, bool is3D, bool isMeasure) |
| Returns a LinearRing { uint32 numPoints; Point points[numPoints]; }. More...
|
|
static QString | pointsToWKT (const QgsPointSequence &points, int precision, bool is3D, bool isMeasure) |
| Returns a WKT coordinate list. More...
|
|
static QgsPoint | projectPointOnSegment (const QgsPoint &p, const QgsPoint &s1, const QgsPoint &s2) SIP_HOLDGIL |
| Project the point on a segment. More...
|
|
static bool | segmentIntersection (const QgsPoint &p1, const QgsPoint &p2, const QgsPoint &q1, const QgsPoint &q2, QgsPoint &intersectionPoint, bool &isIntersection, double tolerance=1e-8, bool acceptImproperIntersection=false) SIP_HOLDGIL |
| Compute the intersection between two segments. More...
|
|
static void | segmentizeArc (const QgsPoint &p1, const QgsPoint &p2, const QgsPoint &p3, QgsPointSequence &points, double tolerance=M_PI_2/90, QgsAbstractGeometry::SegmentationToleranceType toleranceType=QgsAbstractGeometry::MaximumAngle, bool hasZ=false, bool hasM=false) |
| Convert circular arc defined by p1, p2, p3 (p1/p3 being start resp. More...
|
|
static bool | segmentMidPoint (const QgsPoint &p1, const QgsPoint &p2, QgsPoint &result, double radius, const QgsPoint &mousePos) SIP_HOLDGIL |
| Calculates midpoint on circle passing through p1 and p2, closest to the given coordinate mousePos. More...
|
|
static QgsPoint | segmentMidPointFromCenter (const QgsPoint &p1, const QgsPoint &p2, const QgsPoint ¢er, bool useShortestArc=true) SIP_HOLDGIL |
| Calculates the midpoint on the circle passing through p1 and p2, with the specified center coordinate. More...
|
|
static int | segmentSide (const QgsPoint &pt1, const QgsPoint &pt3, const QgsPoint &pt2) SIP_HOLDGIL |
| For line defined by points pt1 and pt3, find out on which side of the line is point pt3. More...
|
|
static QVector< SelfIntersection > | selfIntersections (const QgsAbstractGeometry *geom, int part, int ring, double tolerance) |
| Find self intersections in a polyline. More...
|
|
static Q_DECL_DEPRECATED bool | setZValueFromPoints (const QgsPointSequence &points, QgsPoint &point) |
| A Z dimension is added to point if one of the point in the list points is in 3D. More...
|
|
static double | skewLinesDistance (const QgsVector3D &P1, const QgsVector3D &P12, const QgsVector3D &P2, const QgsVector3D &P22) SIP_HOLDGIL |
| An algorithm to calculate the shortest distance between two skew lines. More...
|
|
static bool | skewLinesProjection (const QgsVector3D &P1, const QgsVector3D &P12, const QgsVector3D &P2, const QgsVector3D &P22, QgsVector3D &X1, double epsilon=0.0001) SIP_HOLDGIL |
| A method to project one skew line onto another. More...
|
|
static double | sqrDistance2D (const QgsPoint &pt1, const QgsPoint &pt2) SIP_HOLDGIL |
| Returns the squared 2D distance between two points. More...
|
|
static double | sqrDistToLine (double ptX, double ptY, double x1, double y1, double x2, double y2, double &minDistX, double &minDistY, double epsilon) SIP_HOLDGIL |
| Returns the squared distance between a point and a line. More...
|
|
static double | sweepAngle (double centerX, double centerY, double x1, double y1, double x2, double y2, double x3, double y3) SIP_HOLDGIL |
| Calculates angle of a circular string part defined by pt1, pt2, pt3. More...
|
|
static bool | tangentPointAndCircle (const QgsPointXY ¢er, double radius, const QgsPointXY &p, QgsPointXY &pt1, QgsPointXY &pt2) SIP_HOLDGIL |
| Calculates the tangent points between the circle with the specified center and radius and the point p. More...
|
|
static bool | transferFirstMValueToPoint (const QgsPointSequence &points, QgsPoint &point) |
| A M dimension is added to point if one of the points in the list points contains an M value. More...
|
|
static bool | transferFirstZOrMValueToPoint (const QgsGeometry &geom, QgsPoint &point) |
| A Z or M dimension is added to point if one of the points in the list points contains Z or M value. More...
|
|
static bool | transferFirstZOrMValueToPoint (const QgsPointSequence &points, QgsPoint &point) |
| A Z or M dimension is added to point if one of the points in the list points contains Z or M value. More...
|
|
template<class Iterator > |
static bool | transferFirstZOrMValueToPoint (Iterator verticesBegin, Iterator verticesEnd, QgsPoint &point) |
| A Z or M dimension is added to point if one of the points in the list points contains Z or M value. More...
|
|
static bool | transferFirstZValueToPoint (const QgsPointSequence &points, QgsPoint &point) |
| A Z dimension is added to point if one of the point in the list points is in 3D. More...
|
|
static double | triangleArea (double aX, double aY, double bX, double bY, double cX, double cY) SIP_HOLDGIL |
| Returns the area of the triangle denoted by the points (aX, aY), (bX, bY) and (cX, cY). More...
|
|
static bool | verticesAtDistance (const QgsAbstractGeometry &geometry, double distance, QgsVertexId &previousVertex, QgsVertexId &nextVertex) |
| Retrieves the vertices which are before and after the interpolated point at a specified distance along a linestring (or polygon boundary). More...
|
|
static void | weightedPointInTriangle (double aX, double aY, double bX, double bY, double cX, double cY, double weightB, double weightC, double &pointX, double &pointY) SIP_HOLDGIL |
| Returns a weighted point inside the triangle denoted by the points (aX, aY), (bX, bY) and (cX, cY). More...
|
|
static QStringList | wktGetChildBlocks (const QString &wkt, const QString &defaultType=QString()) |
| Parses a WKT string and returns of list of blocks contained in the WKT. More...
|
|
static QPair< QgsWkbTypes::Type, QString > | wktReadBlock (const QString &wkt) |
| Parses a WKT block of the format "TYPE( contents )" and returns a pair of geometry type to contents ("Pair(wkbType, "contents")") More...
|
|