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 460 of file lwspheroid.c.
463 double deltaLng, baseArea, topArea;
464 double bE, tE, ratio, sign;
469 mL.
lat = latitude_min;
476 LWDEBUGF(4,
"baseArea %.12g", baseArea);
485 LWDEBUGF(4,
"topArea %.12g", topArea);
488 LWDEBUGF(4,
"deltaLng %.12g", deltaLng);
494 ratio = (bE + tE)/tE;
496 return (baseArea + topArea / ratio) * sign;
#define SIGNUM(n)
Macro that returns: -1 if n < 0, 1 if n > 0, 0 if n == 0.
#define LWDEBUGF(level, msg,...)
static double spheroid_parallel_arc_length(double latitude, double deltaLongitude, const SPHEROID *spheroid)
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.
Point in spherical coordinates on the world.
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().