From: Sandro Santilli Date: Wed, 21 Jan 2015 17:33:02 +0000 (+0000) Subject: Deprecate ST_3DLength_Spheroid (#2748) X-Git-Tag: 2.2.0rc1~700 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=484d957f5aad915789533fe6caf4ca4a250f9be8;p=postgis Deprecate ST_3DLength_Spheroid (#2748) git-svn-id: http://svn.osgeo.org/postgis/trunk@13192 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/reference_measure.xml b/doc/reference_measure.xml index ddd957de4..2b80364bb 100644 --- a/doc/reference_measure.xml +++ b/doc/reference_measure.xml @@ -2893,7 +2893,7 @@ ST_3DLength Will return 0 for anything that is not a MULTILINESTRING or LINESTRING Availability: 1.2.2 - Changed: 2.2.0 In prior versions this used to be called ST_Length_Spheroid + Changed: 2.2.0 In prior versions this used to be called ST_Length_Spheroid and used to have a ST_3DLength_Spheroid alias &Z_support; @@ -2934,7 +2934,7 @@ CAST('SPHEROID["GRS_1980",6378137,298.257222101]' As spheroid) As sph_m) as foo See Also - , , + , @@ -2972,7 +2972,7 @@ CAST('SPHEROID["GRS_1980",6378137,298.257222101]' As spheroid) As sph_m) as foo SPHEROID["GRS_1980",6378137,298.257222101] Will return 0 for anything that is not a MULTILINESTRING or LINESTRING - This is much like and except it will throw away the Z coordinate in calculations. + This is much like except it will throw away the Z coordinate in calculations. @@ -3013,53 +3013,7 @@ CAST('SPHEROID["GRS_1980",6378137,298.257222101]' As spheroid) As sph_m) as foo See Also - , , - - - - - - ST_3DLength_Spheroid - - Calculates the length of a geometry on an ellipsoid, - taking the elevation into account. This is just an alias for ST_Length_Spheroid. - - - - - - float ST_3DLength_Spheroid - geometry a_linestring - spheroid a_spheroid - - - - - - Description - - Calculates the length of a geometry on an ellipsoid, - taking the elevation into account. This is just an alias - for ST_Length_Spheroid. - - Changed: 2.0.0 In prior versions this used to return 0 for anything that is not a MULTILINESTRING or LINESTRING and in 2.0.0 on returns the perimeter of if given a polgon. - This function is just an alias for ST_Length_Spheroid. - &Z_support; - Changed: 2.0.0 In prior versions this used to be called ST_Length3d_Spheroid - - - - - Examples - - See ST_Length_Spheroid - - - - - See Also - - , , + , diff --git a/postgis/postgis.sql.in b/postgis/postgis.sql.in index a2482869e..020882d1c 100644 --- a/postgis/postgis.sql.in +++ b/postgis/postgis.sql.in @@ -1138,16 +1138,6 @@ CREATE OR REPLACE FUNCTION ST_Length(geometry) AS 'MODULE_PATHNAME', 'LWGEOM_length2d_linestring' LANGUAGE 'c' IMMUTABLE STRICT; --- this is a fake (for back-compatibility) --- uses 3d if 3d is available, 2d otherwise --- TODO: deprecate ? --- Availability: 2.0.0 -CREATE OR REPLACE FUNCTION ST_3DLength_spheroid(geometry, spheroid) - RETURNS FLOAT8 - AS 'MODULE_PATHNAME','LWGEOM_length_ellipsoid_linestring' - LANGUAGE 'c' IMMUTABLE STRICT - COST 100; - -- Availability in 2.2.0 CREATE OR REPLACE FUNCTION ST_LengthSpheroid(geometry, spheroid) RETURNS FLOAT8 @@ -1155,6 +1145,19 @@ CREATE OR REPLACE FUNCTION ST_LengthSpheroid(geometry, spheroid) LANGUAGE 'c' IMMUTABLE STRICT COST 100; +-- this is a fake (for back-compatibility) +-- uses 3d if 3d is available, 2d otherwise +-- Availability: 2.0.0 +-- Deprecation in 2.2.0 +CREATE OR REPLACE FUNCTION ST_3DLength_spheroid(geometry, spheroid) + RETURNS FLOAT8 AS + $$ SELECT _postgis_deprecate('ST_3DLength_Spheroid', 'ST_LengthSpheroid', '2.2.0'); + SELECT ST_LengthSpheroid($1,$2); + $$ + LANGUAGE 'sql' IMMUTABLE STRICT + COST 100; + + -- Availability: 1.2.2 -- Deprecation in 2.2.0 CREATE OR REPLACE FUNCTION ST_length_spheroid(geometry, spheroid)