1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/geometry/qgsgeometryutils_base.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsGeometryUtilsBase
{
%Docstring(signature="appended")
Convenience functions for geometry utils.
.. versionadded:: 3.34
%End
%TypeHeaderCode
#include "qgsgeometryutils_base.h"
%End
public:
static double sqrDistance3D( double x1, double y1, double z1, double x2, double y2, double z2 ) /HoldGIL/;
%Docstring
Returns the squared 3D distance between (``x1``, ``y1``, ``z1``) and
(``x2``, ``y2``, ``z2``).
.. warning::
No check is done if z contains NaN value. This is the caller's responsibility.
.. versionadded:: 3.36
%End
static double distance3D( double x1, double y1, double z1, double x2, double y2, double z2 ) /HoldGIL/;
%Docstring
Returns the 3D distance between (``x1``, ``y1``, ``z1``) and (``x2``,
``y2``, ``z2``).
.. warning::
No check is done if z contains NaN value. This is the caller's responsibility.
.. versionadded:: 3.36
%End
static double sqrDistance2D( double x1, double y1, double x2, double y2 ) /HoldGIL/;
%Docstring
Returns the squared 2D distance between (``x1``, ``y1``) and (``x2``,
``y2``).
%End
static double distance2D( double x1, double y1, double x2, double y2 ) /HoldGIL/;
%Docstring
Returns the 2D distance between (``x1``, ``y1``) and (``x2``, ``y2``).
%End
static double sqrDistToLine( double ptX, double ptY, double x1, double y1, double x2, double y2, double &minDistX /Out/, double &minDistY /Out/, double epsilon ) /HoldGIL/;
%Docstring
Returns the squared distance between a point and a line.
%End
static int leftOfLine( const double x, const double y, const double x1, const double y1, const double x2, const double y2 ) /HoldGIL/;
%Docstring
Returns a value < 0 if the point (``x``, ``y``) is left of the line from
(``x1``, ``y1``) -> (``x2``, ``y2``). A positive return value indicates
the point is to the right of the line.
If the return value is 0, then the test was unsuccessful (e.g. due to
testing a point exactly on the line, or exactly in line with the
segment) and the result is undefined.
%End
static void perpendicularOffsetPointAlongSegment( double x1, double y1, double x2, double y2, double proportion, double offset, double *x /Out/, double *y /Out/ );
%Docstring
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.
:param x1: x-coordinate of start of segment
:param y1: y-coordinate of start of segment
:param x2: x-coordinate of end of segment
:param y2: y-coordinate of end of segment
:param proportion: proportion of the segment's length at which to place
the point (between 0.0 and 1.0)
:param offset: perpendicular offset from segment to apply to point. A
negative ``offset`` shifts the point to the left of the
segment, while a positive ``offset`` will shift it to the
right of the segment.
Example
-------------------------------------
.. code-block:: python
# Offset point at center of segment by 2 units to the right
x, y = QgsGeometryUtils.perpendicularOffsetPointAlongSegment( 1, 5, 11, 5, 0.5, 2 )
# (6.0, 3.0)
# Offset point at center of segment by 2 units to the left
x, y = QgsGeometryUtils.perpendicularOffsetPointAlongSegment( 1, 5, 11, 5, 0.5, -2 )
# (6.0, 7.0)
:return: - x: calculated point x-coordinate
- y: calculated point y-coordinate
.. versionadded:: 3.20
%End
static double ccwAngle( double dy, double dx ) /HoldGIL/;
%Docstring
Returns the counter clockwise angle between a line with components dx,
dy and the line with dx > 0 and dy = 0
%End
static void circleCenterRadius( double x1, double y1, double x2, double y2, double x3, double y3, double &radius /Out/,
double ¢erX /Out/, double ¢erY /Out/ ) /HoldGIL/;
%Docstring
Returns radius and center of the circle through (``x1`` ``y1``), (``x2``
``y2``), (``x3`` ``y3``)
%End
static bool circleClockwise( double angle1, double angle2, double angle3 ) /HoldGIL/;
%Docstring
Returns ``True`` if the circle defined by three angles is ordered
clockwise.
The angles are defined counter-clockwise from the origin, i.e. using
Euclidean angles as opposed to geographic "North up" angles.
%End
static bool circleAngleBetween( double angle, double angle1, double angle2, bool clockwise ) /HoldGIL/;
%Docstring
Returns ``True`` if, in a circle, angle is between angle1 and angle2
%End
static bool angleOnCircle( double angle, double angle1, double angle2, double angle3 ) /HoldGIL/;
%Docstring
Returns ``True`` if an angle is between angle1 and angle3 on a circle
described by angle1, angle2 and angle3.
%End
static double circleLength( double x1, double y1, double x2, double y2, double x3, double y3 ) /HoldGIL/;
%Docstring
Length of a circular string segment defined by pt1, pt2, pt3
%End
static double sweepAngle( double centerX, double centerY, double x1, double y1, double x2, double y2, double x3, double y3 ) /HoldGIL/;
%Docstring
Calculates angle of a circular string part defined by pt1, pt2, pt3
%End
static double interpolateArcValue( double angle, double a1, double a2, double a3, double zm1, double zm2, double zm3 ) /HoldGIL/;
%Docstring
Interpolate a value at given angle on circular arc given values (zm1,
zm2, zm3) at three different angles (a1, a2, a3).
%End
static double normalizedAngle( double angle ) /HoldGIL/;
%Docstring
Ensures that an angle is in the range 0 <= angle < 2 pi.
:param angle: angle in radians
:return: equivalent angle within the range [0, 2 pi)
%End
static double lineAngle( double x1, double y1, double x2, double y2 ) /HoldGIL/;
%Docstring
Calculates the direction of line joining two points in radians,
clockwise from the north direction.
:param x1: x-coordinate of line start
:param y1: y-coordinate of line start
:param x2: x-coordinate of line end
:param y2: y-coordinate of line end
:return: angle in radians. Returned value is undefined if start and end
point are the same.
%End
static double angleBetweenThreePoints( double x1, double y1, double x2, double y2,
double x3, double y3 ) /HoldGIL/;
%Docstring
Calculates the angle between the lines AB and BC, where AB and BC
described by points a, b and b, c.
:param x1: x-coordinate of point a
:param y1: y-coordinate of point a
:param x2: x-coordinate of point b
:param y2: y-coordinate of point b
:param x3: x-coordinate of point c
:param y3: y-coordinate of point c
:return: angle between lines in radians. Returned value is undefined if
two or more points are equal.
%End
static double linePerpendicularAngle( double x1, double y1, double x2, double y2 ) /HoldGIL/;
%Docstring
Calculates the perpendicular angle to a line joining two points.
Returned angle is in radians, clockwise from the north direction.
:param x1: x-coordinate of line start
:param y1: y-coordinate of line start
:param x2: x-coordinate of line end
:param y2: y-coordinate of line end
:return: angle in radians. Returned value is undefined if start and end
point are the same.
%End
static double averageAngle( double x1, double y1, double x2, double y2, double x3, double y3 ) /HoldGIL/;
%Docstring
Calculates the average angle (in radians) between the two linear
segments from (``x1``, ``y1``) to (``x2``, ``y2``) and (``x2``, ``y2``)
to (``x3``, ``y3``).
%End
static double averageAngle( double a1, double a2 ) /HoldGIL/;
%Docstring
Averages two angles, correctly handling negative angles and ensuring the
result is between 0 and 2 pi.
:param a1: first angle (in radians)
:param a2: second angle (in radians)
:return: average angle (in radians)
%End
static int closestSideOfRectangle( double right, double bottom, double left, double top, double x, double y );
%Docstring
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.
The returned value may be:
1. Point is closest to top side of rectangle
2. Point is located on the top-right diagonal of rectangle, equally close to the top and right sides
3. Point is closest to right side of rectangle
4. Point is located on the bottom-right diagonal of rectangle, equally close to the bottom and right sides
5. Point is closest to bottom side of rectangle
6. Point is located on the bottom-left diagonal of rectangle, equally close to the bottom and left sides
7. Point is closest to left side of rectangle
8. Point is located on the top-left diagonal of rectangle, equally close to the top and left sides
.. note::
This method effectively partitions the space outside of the rectangle into Voronoi cells, so a point
to the top left of the rectangle may be assigned to the left or top sides based on its position relative
to the diagonal line extended from the rectangle's top-left corner.
.. versionadded:: 3.20
%End
static void perpendicularCenterSegment( double centerPointX, double centerPointY,
double segmentPoint1x, double segmentPoint1y,
double segmentPoint2x, double segmentPoint2y,
double &perpendicularSegmentPoint1x /Out/, double &perpendicularSegmentPoint1y /Out/,
double &perpendicularSegmentPoint2x /Out/, double &perpendicularSegmentPoint2y /Out/,
double segmentLength = 0
) /HoldGIL/;
%Docstring
Create a perpendicular line segment to a given segment
[``segmentPoint1``,``segmentPoint2``] with its center at
``centerPoint``.
May be used to split geometries. Unless ``segmentLength`` is specified
the new centered perpendicular line segment will have double the length
of the input segment.
The result is a line (segment) centered in point p and perpendicular to
segment [segmentPoint1, segmentPoint2].
:param centerPointX: x-coordinate of the point where the center of the
perpendicular should be located
:param centerPointY: y-coordinate of the point where the center of the
perpendicular should be located
:param segmentPoint1x: : x-coordinate of segmentPoint1, the segment's
start point
:param segmentPoint1y: : y-coordinate of segmentPoint1, the segment's
start point
:param segmentPoint2x: : x-coordinate of segmentPoint2, the segment's
end point
:param segmentPoint2y: : y-coordinate of segmentPoint2, the segment's
end point
:param segmentLength: (optional) Trims to given length. A segmentLength
value of 0 refers to the default length which is
double the length of the input segment. Set to 1
for a normalized length.
:return: - perpendicularSegmentPoint1x: : x-coordinate of the
perpendicularCenterSegment's start point
- perpendicularSegmentPoint1y: : y-coordinate of the
perpendicularCenterSegment's start point
- perpendicularSegmentPoint2x: : x-coordinate of the
perpendicularCenterSegment's end point
- perpendicularSegmentPoint2y: : y-coordinate of the
perpendicularCenterSegment's end point
.. versionadded:: 3.24
%End
static double skewLinesDistance( const QgsVector3D &P1, const QgsVector3D &P12,
const QgsVector3D &P2, const QgsVector3D &P22 ) /HoldGIL/;
%Docstring
An algorithm to calculate the shortest distance between two skew lines.
:param P1: is the first point of the first line,
:param P12: is the second point on the first line,
:param P2: is the first point on the second line,
:param P22: is the second point on the second line.
:return: the shortest distance
%End
static bool skewLinesProjection( const QgsVector3D &P1, const QgsVector3D &P12,
const QgsVector3D &P2, const QgsVector3D &P22,
QgsVector3D &X1 /Out/,
double epsilon = 0.0001 ) /HoldGIL/;
%Docstring
A method to project one skew line onto another.
:param P1: is a first point that belonds to first skew line,
:param P12: is the second point that belongs to first skew line,
:param P2: is the first point that belongs to second skew line,
:param P22: is the second point that belongs to second skew line,
:param epsilon: the tolerance to use.
:return: - ``True`` if such point exists, ``False`` - otherwise.
- X1: is the result projection point of line P2P22 onto line
P1P12,
%End
static bool linesIntersection3D( const QgsVector3D &La1, const QgsVector3D &La2,
const QgsVector3D &Lb1, const QgsVector3D &Lb2,
QgsVector3D &intersection /Out/ ) /HoldGIL/;
%Docstring
An algorithm to calculate an (approximate) intersection of two lines in
3D.
:param La1: is the first point on the first line,
:param La2: is the second point on the first line,
:param Lb1: is the first point on the second line,
:param Lb2: is the second point on the second line,
:return: - ``True`` if the intersection can be found, ``False`` -
otherwise.
- intersection: is the result intersection, of it can be found.
Example
-------------------------------------
.. code-block:: python
QgsGeometryUtils.linesIntersection3D(QgsVector3D(0,0,0), QgsVector3D(5,0,0), QgsVector3D(2,1,0), QgsVector3D(2,3,0))
# (True, PyQt5.QtGui.QgsVector3D(2.0, 0.0, 0.0))
QgsGeometryUtils.linesIntersection3D(QgsVector3D(0,0,0), QgsVector3D(5,0,0), QgsVector3D(2,1,0), QgsVector3D(2,0,0))
# (True, PyQt5.QtGui.QgsVector3D(2.0, 0.0, 0.0))
QgsGeometryUtils.linesIntersection3D(QgsVector3D(0,0,0), QgsVector3D(5,0,0), QgsVector3D(0,1,0), QgsVector3D(0,3,0))
# (True, PyQt5.QtGui.QgsVector3D(0.0, 0.0, 0.0))
QgsGeometryUtils.linesIntersection3D(QgsVector3D(0,0,0), QgsVector3D(5,0,0), QgsVector3D(0,1,0), QgsVector3D(0,0,0))
# (True, PyQt5.QtGui.QgsVector3D(0.0, 0.0, 0.0))
QgsGeometryUtils.linesIntersection3D(QgsVector3D(0,0,0), QgsVector3D(5,0,0), QgsVector3D(5,1,0), QgsVector3D(5,3,0))
# (False, PyQt5.QtGui.QgsVector3D(0.0, 0.0, 0.0))
QgsGeometryUtils.linesIntersection3D(QgsVector3D(0,0,0), QgsVector3D(5,0,0), QgsVector3D(5,1,0), QgsVector3D(5,0,0))
# (False, PyQt5.QtGui.QgsVector3D(0.0, 0.0, 0.0))
QgsGeometryUtils.linesIntersection3D(QgsVector3D(1,1,0), QgsVector3D(2,2,0), QgsVector3D(3,1,0), QgsVector3D(3,2,0))
# (True, PyQt5.QtGui.QgsVector3D(3.0, 3.0, 0.0))
QgsGeometryUtils.linesIntersection3D(QgsVector3D(1,1,0), QgsVector3D(2,2,0), QgsVector3D(3,2,0), QgsVector3D(3,1,0))
# (True, PyQt5.QtGui.QgsVector3D(3.0, 3.0, 0.0))
QgsGeometryUtils.linesIntersection3D(QgsVector3D(5,5,5), QgsVector3D(0,0,0), QgsVector3D(0,5,5), QgsVector3D(5,0,0))
# (True, PyQt5.QtGui.QgsVector3D(2.5, 2.5, 2.5))
QgsGeometryUtils.linesIntersection3D(QgsVector3D(2.5,2.5,2.5), QgsVector3D(0,5,0), QgsVector3D(2.5,2.5,2.5), QgsVector3D(5,0,0))
# (True, PyQt5.QtGui.QgsVector3D(2.5, 2.5, 2.5))
QgsGeometryUtils.linesIntersection3D(QgsVector3D(2.5,2.5,2.5), QgsVector3D(5,0,0), QgsVector3D(0,5,5), QgsVector3D(5,5,5))
# (True, PyQt5.QtGui.QgsVector3D(0.0, 5.0, 5.0))
%End
static double triangleArea( double aX, double aY, double bX, double bY, double cX, double cY ) /HoldGIL/;
%Docstring
Returns the area of the triangle denoted by the points (``aX``, ``aY``),
(``bX``, ``bY``) and (``cX``, ``cY``).
.. versionadded:: 3.10
%End
static double pointFractionAlongLine( double x1, double y1, double x2, double y2, double px, double py );
%Docstring
Given the line (``x1``, ``y1``) to (``x2``, ``y2``) and a point (``px``,
``py``) returns the fraction of the line length at which the point lies.
.. warning::
this method requires that the point definitely lies on the line!
.. versionadded:: 3.32
%End
static void weightedPointInTriangle( double aX, double aY, double bX, double bY, double cX, double cY,
double weightB, double weightC, double &pointX /Out/, double &pointY /Out/ ) /HoldGIL/;
%Docstring
Returns a weighted point inside the triangle denoted by the points
(``aX``, ``aY``), (``bX``, ``bY``) and (``cX``, ``cY``).
:param aX: x-coordinate of first vertex in triangle
:param aY: y-coordinate of first vertex in triangle
:param bX: x-coordinate of second vertex in triangle
:param bY: y-coordinate of second vertex in triangle
:param cX: x-coordinate of third vertex in triangle
:param cY: y-coordinate of third vertex in triangle
:param weightB: weighting factor along axis A-B (between 0 and 1)
:param weightC: weighting factor along axis A-C (between 0 and 1)
:return: - pointX: x-coordinate of generated point
- pointY: y-coordinate of generated point
.. versionadded:: 3.10
%End
static bool pointsAreCollinear( double x1, double y1, double x2, double y2, double x3, double y3, double epsilon );
%Docstring
Given the points (``x1``, ``y1``), (``x2``, ``y2``) and (``x3``, ``y3``)
returns ``True`` if these points can be considered collinear with a
specified tolerance ``epsilon``.
.. versionadded:: 3.32
%End
static bool angleBisector( double aX, double aY, double bX, double bY, double cX, double cY, double dX, double dY,
double &pointX /Out/, double &pointY /Out/, double &angle /Out/ ) /HoldGIL/;
%Docstring
Returns the point (``pointX``, ``pointY``) forming the bisector from
segment (``aX`` ``aY``) (``bX`` ``bY``) and segment (``bX``, ``bY``)
(``dX``, ``dY``). The bisector segment of AB-CD is (point, projection of
point by ``angle``)
:param aX: x-coordinate of first vertex of the segment ab
:param aY: y-coordinate of first vertex of the segment ab
:param bX: x-coordinate of second vertex of the segment ab
:param bY: y-coordinate of second vertex of the segment ab
:param cX: x-coordinate of first vertex of the segment cd
:param cY: y-coordinate of first vertex of the segment cd
:param dX: x-coordinate of second vertex of the segment cd
:param dY: y-coordinate of second vertex of the segment cd
:return: - ``True`` if the bisector exists (A B and C D are not
collinear)
- pointX: x-coordinate of generated point
- pointY: y-coordinate of generated point
- angle: angle of the bisector from pointX, pointY origin on
[ab-cd]
.. versionadded:: 3.18
%End
static bool bisector( double aX, double aY, double bX, double bY, double cX, double cY,
double &pointX /Out/, double &pointY /Out/ ) /HoldGIL/;
%Docstring
Returns the point (``pointX``, ``pointY``) forming the bisector from
point (``aX``, ``aY``) to the segment (``bX``, ``bY``) (``cX``, ``cY``).
The bisector segment of ABC is (A-point)
:param aX: x-coordinate of first vertex in triangle
:param aY: y-coordinate of first vertex in triangle
:param bX: x-coordinate of second vertex in triangle
:param bY: y-coordinate of second vertex in triangle
:param cX: x-coordinate of third vertex in triangle
:param cY: y-coordinate of third vertex in triangle
:return: - ``True`` if the bisector exists (A B and C are not collinear)
- pointX: x-coordinate of generated point
- pointY: y-coordinate of generated point
.. versionadded:: 3.18
%End
static bool lineIntersection( double p1x, double p1y, QgsVector v1, double p2x, double p2y, QgsVector v2, double &intersectionX /Out/, double &intersectionY /Out/ ) /HoldGIL/;
%Docstring
Computes the intersection between two lines. Z dimension is supported
and is retrieved from the first 3D point amongst ``p1`` and ``p2``.
:param p1x: x-coordinate of point on the first line
:param p1y: y-coordinate of point on the first line
:param v1: Direction vector of the first line
:param p2x: x-coordinate of second point on the first line
:param p2y: y-coordinate of second point on the first line
:param v2: Direction vector of the second line
:return: - Whether the lines intersect
- intersectionX: x-coordinate of the intersection point
- intersectionY: y-coordinate of the intersection point
%End
static bool segmentIntersection( double p1x, double p1y, double p2x, double p2y, double q1x, double q1y, double q2x, double q2y, double &intersectionPointX /Out/, double &intersectionPointY /Out/, bool &isIntersection /Out/, double tolerance = 1e-8, bool acceptImproperIntersection = false ) /HoldGIL/;
%Docstring
Compute the intersection between two segments
:param p1x: x-coordinate of the first segment start point
:param p1y: y-coordinate of the first segment start point
:param p2x: x-coordinate of the first segment end point
:param p2y: y-coordinate of the first segment end point
:param q1x: x-coordinate of the second segment start point
:param q1y: y-coordinate of the second segment start point
:param q2x: x-coordinate of the second segment end point
:param q2y: y-coordinate of the second segment end point
:param tolerance: The tolerance to use
:param acceptImproperIntersection: By default, this method returns
``True`` only if segments have proper
intersection. If set true, returns
also ``True`` if segments have
improper intersection (end of one
segment on other segment ; continuous
segments).
:return: - Whether the segments intersect
- intersectionPointX: Output parameter, x-coordinate of the
intersection point
- intersectionPointY: Output parameter, y-coordinate of the
intersection point
- isIntersection: Output parameter, return ``True`` if an
intersection is found
%End
static void project( double aX, double aY, double aZ, double distance, double azimuth, double inclination, double &resultX /Out/, double &resultY /Out/, double &resultZ /Out/ ) /HoldGIL/;
%Docstring
Returns coordinates of a point which corresponds to this point projected
by a specified distance with specified angles (azimuth and inclination),
using Cartesian mathematics. M value is preserved. resultX, resultY,
resultZ are coordinates of the point projected. If a 2D point is
projected a 3D point will be returned except if inclination is 90. A 3D
point is always returned if a 3D point is projected.
:param aX: x-coordinate of the point to project
:param aY: y-coordinate of the point to project
:param aZ: z-coordinate of the point to project
:param distance: distance to project
:param azimuth: angle to project in X Y, clockwise in degrees starting
from north
:param inclination: angle to project in Z (3D). If the point is 2D, the
Z value is assumed to be 0.
:return: - resultX: Output parameter, x-coordinates of the point
projected.
- resultY: Output parameter, y-coordinates of the point
projected.
- resultZ: Output parameter, z-coordinates of the point
projected.
.. versionadded:: 3.34
%End
static double azimuth( double x1, double y1, double x2, double y2 ) /HoldGIL/;
%Docstring
Calculates Cartesian azimuth between points (``x1``, ``y1``) and
(``x2``, ``y2``) (clockwise in degree, starting from north)
:param x1: x-coordinate of the start point
:param y1: y-coordinate of the start point
:param x2: x-coordinate of the end point
:param y2: y-coordinate of the end point
.. versionadded:: 3.34
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/geometry/qgsgeometryutils_base.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|