From: Paul Ramsey Date: Wed, 4 Nov 2009 03:27:33 +0000 (+0000) Subject: Change ST_Area(geog) to defaul to spheroid calculation. X-Git-Tag: 1.5.0b1~300 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ea980f2a5af20d1df7176d1867ac27a8d9d13903;p=postgis Change ST_Area(geog) to defaul to spheroid calculation. git-svn-id: http://svn.osgeo.org/postgis/trunk@4733 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/postgis/geography.sql.in.c b/postgis/geography.sql.in.c index 15943dbda..233532158 100644 --- a/postgis/geography.sql.in.c +++ b/postgis/geography.sql.in.c @@ -479,11 +479,11 @@ CREATE OR REPLACE FUNCTION ST_Area(geography, boolean) AS 'MODULE_PATHNAME','geography_area' LANGUAGE 'C' IMMUTABLE STRICT; --- Currently defaulting to sphere calculations +-- Currently defaulting to spheroid calculations -- Availability: 1.5.0 CREATE OR REPLACE FUNCTION ST_Area(geography) RETURNS float8 - AS 'SELECT ST_Area($1, false)' + AS 'SELECT ST_Area($1, true)' LANGUAGE 'SQL' IMMUTABLE STRICT; -- Availability: 1.5.0 diff --git a/postgis/geography_measurement.c b/postgis/geography_measurement.c index 70e8c5190..d8531be5c 100644 --- a/postgis/geography_measurement.c +++ b/postgis/geography_measurement.c @@ -179,7 +179,7 @@ Datum geography_area(PG_FUNCTION_ARGS) /* Test for cases that are currently not handled by spheroid code */ if ( use_spheroid ) { - /* We don't handle the poles right now */ + /* We can't circle the poles right now */ if( FP_GTEQ(gbox.zmax,1.0) || FP_LTEQ(gbox.zmin,-1.0) ) use_spheroid = LW_FALSE; /* We can't cross the equator right now */