Deprecate ST_3DLength_Spheroid (#2748)

git-svn-id: http://svn.osgeo.org/postgis/trunk@13192 b70326c6-7e19-0410-871a-916f4a2858ee
This commit is contained in:
Sandro Santilli 2015-01-21 17:33:02 +00:00
parent d681e94694
commit 484d957f5a
2 changed files with 17 additions and 60 deletions

View 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>

View 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)