]> granicus.if.org Git - postgis/commitdiff
Change radius figure to common average.
authorPaul Ramsey <pramsey@cleverelephant.ca>
Thu, 8 Oct 2009 17:10:58 +0000 (17:10 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Thu, 8 Oct 2009 17:10:58 +0000 (17:10 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@4626 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/geography.h

index 931431be51efd5be7f1e70d18a3b32a1a65858f4..77c2539fadf8d00af85327d746ee0ad245c9a8b1 100644 (file)
 ** 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.