Computes the spherical area of a triangle.
If C is to the left of A/B, the area is negative. If C is to the right of A/B, the area is positive.
- Parameters
-
a | The first triangle vertex. |
b | The second triangle vertex. |
c | The last triangle vertex. |
- Returns
- the signed area in radians.
Definition at line 741 of file lwgeodetic.c.
743 double angle_a, angle_b, angle_c;
744 double area_radians = 0.0;
752 area_radians = angle_a + angle_b + angle_c - M_PI;
764 return side * area_radians;
static int edge_point_side(const GEOGRAPHIC_EDGE *e, const GEOGRAPHIC_POINT *p)
Returns -1 if the point is to the left of the plane formed by the edge, 1 if the point is to the righ...
static double sphere_angle(const GEOGRAPHIC_POINT *a, const GEOGRAPHIC_POINT *b, const GEOGRAPHIC_POINT *c)
Returns the angle in radians at point B of the triangle formed by A-B-C.
Two-point great circle segment from a to b.
References edge_point_side(), GEOGRAPHIC_EDGE::end, sphere_angle(), and GEOGRAPHIC_EDGE::start.
Referenced by ptarray_area_sphere().