This function doesn't work for edges crossing the dateline or in the southern hemisphere.
Points are pre-conditioned in ptarray_area_spheroid.
Definition at line 455 of file lwspheroid.c.
References FP_MAX, FP_MIN, GEOGRAPHIC_POINT::lat, GEOGRAPHIC_POINT::lon, LWDEBUGF, SIGNUM, spheroid_boundingbox_area(), and spheroid_parallel_arc_length().
Referenced by ptarray_area_spheroid().
458 double deltaLng, baseArea, topArea;
459 double bE, tE, ratio, sign;
464 mL.
lat = latitude_min;
471 LWDEBUGF(4,
"baseArea %.12g", baseArea);
480 LWDEBUGF(4,
"topArea %.12g", topArea);
483 LWDEBUGF(4,
"deltaLng %.12g", deltaLng);
489 ratio = (bE + tE)/tE;
491 return (baseArea + topArea / ratio) * sign;
static double spheroid_parallel_arc_length(double latitude, double deltaLongitude, const SPHEROID *spheroid)
Point in spherical coordinates on the world.
static double spheroid_boundingbox_area(const GEOGRAPHIC_POINT *southWestCorner, const GEOGRAPHIC_POINT *northEastCorner, const SPHEROID *spheroid)
Computes the area on the spheroid of a box bounded by meridians and parallels.
#define LWDEBUGF(level, msg,...)
#define SIGNUM(n)
Macro that returns: -1 if n < 0, 1 if n > 0, 0 if n == 0.