]> granicus.if.org Git - postgis/commitdiff
Deprecate ST_3DLength_Spheroid (#2748)
authorSandro Santilli <strk@keybit.net>
Wed, 21 Jan 2015 17:33:02 +0000 (17:33 +0000)
committerSandro Santilli <strk@keybit.net>
Wed, 21 Jan 2015 17:33:02 +0000 (17:33 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@13192 b70326c6-7e19-0410-871a-916f4a2858ee

doc/reference_measure.xml
postgis/postgis.sql.in

index ddd957de4d31a2df0e93ba55abceed19e43c2b78..2b80364bb04af89c063467edbbd8188d829a6541 100644 (file)
@@ -2893,7 +2893,7 @@ ST_3DLength
                <note><para>Will return 0 for anything that is not a MULTILINESTRING or LINESTRING</para></note>
 
                <para>Availability: 1.2.2</para>
-               <para>Changed: 2.2.0 In prior versions this used to be called ST_Length_Spheroid</para>
+               <para>Changed: 2.2.0 In prior versions this used to be called ST_Length_Spheroid and used to have a ST_3DLength_Spheroid alias</para>
                <para>&Z_support;</para>
          </refsection>
 
@@ -2934,7 +2934,7 @@ CAST('SPHEROID["GRS_1980",6378137,298.257222101]' As spheroid) As sph_m)  as foo
          <refsection>
                <title>See Also</title>
 
-               <para><xref linkend="ST_GeometryN" />, <xref linkend="ST_Length" />, <xref linkend="ST_3DLength_Spheroid" /></para>
+               <para><xref linkend="ST_GeometryN" />, <xref linkend="ST_Length" /></para>
          </refsection>
        </refentry>
 
@@ -2972,7 +2972,7 @@ CAST('SPHEROID["GRS_1980",6378137,298.257222101]' As spheroid) As sph_m)  as foo
 
                <literallayout>SPHEROID["GRS_1980",6378137,298.257222101]</literallayout>
                <note><para>Will return 0 for anything that is not a MULTILINESTRING or LINESTRING</para></note>
-               <note><para>This is much like <xref linkend="ST_Length_Spheroid" /> and <xref linkend="ST_3DLength_Spheroid" /> except it will throw away the Z coordinate in calculations.</para></note>
+               <note><para>This is much like <xref linkend="ST_Length_Spheroid" /> except it will throw away the Z coordinate in calculations.</para></note>
 
          </refsection>
 
@@ -3013,53 +3013,7 @@ CAST('SPHEROID["GRS_1980",6378137,298.257222101]' As spheroid) As sph_m)  as foo
          <refsection>
                <title>See Also</title>
 
-               <para><xref linkend="ST_GeometryN" />, <xref linkend="ST_Length_Spheroid" />, <xref linkend="ST_3DLength_Spheroid" /></para>
-         </refsection>
-       </refentry>
-
-       <refentry id="ST_3DLength_Spheroid">
-         <refnamediv>
-               <refname>ST_3DLength_Spheroid</refname>
-
-               <refpurpose>Calculates the length of a geometry on an ellipsoid,
-                       taking the elevation into account. This is just an alias for ST_Length_Spheroid. </refpurpose>
-         </refnamediv>
-
-         <refsynopsisdiv>
-               <funcsynopsis>
-                 <funcprototype>
-                       <funcdef>float <function>ST_3DLength_Spheroid</function></funcdef>
-                       <paramdef><type>geometry </type> <parameter>a_linestring</parameter></paramdef>
-                       <paramdef><type>spheroid </type> <parameter>a_spheroid</parameter></paramdef>
-                 </funcprototype>
-               </funcsynopsis>
-         </refsynopsisdiv>
-
-         <refsection>
-               <title>Description</title>
-
-               <para>Calculates the length of a geometry on an ellipsoid,
-                       taking the elevation into account. This is just an alias
-                       for ST_Length_Spheroid. </para>
-
-               <note><para>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.</para></note>
-               <note><para>This function is just an alias for ST_Length_Spheroid. </para></note>
-               <para>&Z_support;</para>
-               <para>Changed: 2.0.0 In prior versions this used to be called ST_Length3d_Spheroid</para>
-         </refsection>
-
-
-         <refsection>
-               <title>Examples</title>
-
-               <programlisting>See ST_Length_Spheroid</programlisting>
-         </refsection>
-
-         <!-- Optionally add a "See Also" section -->
-         <refsection>
-               <title>See Also</title>
-
-               <para><xref linkend="ST_GeometryN" />, <xref linkend="ST_Length" />, <xref linkend="ST_Length_Spheroid" /></para>
+               <para><xref linkend="ST_GeometryN" />, <xref linkend="ST_Length_Spheroid" /></para>
          </refsection>
        </refentry>
 
index a2482869edb1342edd05905a9aa94beb4a92f7f5..020882d1cca5060dafa83c7e1f2f5a79b3261c41 100644 (file)
@@ -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)