From: Paul Ramsey Date: Thu, 8 Oct 2009 17:10:58 +0000 (+0000) Subject: Change radius figure to common average. X-Git-Tag: 1.5.0b1~389 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a13d8da8432e7a59f5031308b8e830ac367eb089;p=postgis Change radius figure to common average. git-svn-id: http://svn.osgeo.org/postgis/trunk@4626 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/postgis/geography.h b/postgis/geography.h index 931431be5..77c2539fa 100644 --- a/postgis/geography.h +++ b/postgis/geography.h @@ -14,11 +14,12 @@ ** Spherical radius. ** Moritz, H. (1980). Geodetic Reference System 1980, by resolution of the XVII General Assembly of the IUGG in Canberra. ** http://en.wikipedia.org/wiki/Earth_radius +** http://en.wikipedia.org/wiki/World_Geodetic_System */ -#define WGS84_RADIUS 6371009.0 -/* For reference, the old value used in distance_sphere was 6370986.884258304 */ - +#define WGS84_MAJOR_AXIS 6378137.0 +#define WGS84_MINOR_AXIS 6356752.314245 +#define WGS84_RADIUS ((2.0 * WGS84_MAJOR_AXIS + WGS84_MINOR_AXIS ) / 3.0) /********************************************************************** ** Useful functions for all GEOGRAPHY handlers.