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