From: Regina Obe Date: Fri, 17 Oct 2008 17:58:53 +0000 (+0000) Subject: Move over ST_length2d, ST_length3d X-Git-Tag: 1.4.0b1~604 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=94980f39a8ab56295f3c96f0638da9d14c19285e;p=postgis Move over ST_length2d, ST_length3d git-svn-id: http://svn.osgeo.org/postgis/trunk@3136 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/reference.xml b/doc/reference.xml index a4d35fef6..4883e479b 100644 --- a/doc/reference.xml +++ b/doc/reference.xml @@ -643,24 +643,6 @@ - - ST_length2d(geometry) - - - Returns the 2-dimensional length of the geometry if it is a - linestring or multi-linestring. - - - - - ST_length3d(geometry) - - - Returns the 3-dimensional length of the geometry if it is a - linestring or multi-linestring. - - - ST_length_spheroid(geometry,spheroid) diff --git a/doc/reference_new.xml b/doc/reference_new.xml index 7f23363f6..1e4cca359 100644 --- a/doc/reference_new.xml +++ b/doc/reference_new.xml @@ -4827,13 +4827,13 @@ SELECT ST_Intersects('POINT(0 0)'::geometry, 'LINESTRING ( 0 0, 0 2 )'::geometry ST_Length - Returns the length of the geometry if it is a linestring or multilinestring. + Returns the 2d length of the geometry if it is a linestring or multilinestring. float ST_Length - geometry g1 + geometry a_2dlinestring @@ -4881,6 +4881,94 @@ st_length + + + ST_Length2D + + Returns the 2-dimensional length of the geometry if it is a + linestring or multi-linestring. This is an alias for ST_Length + + + + + + float ST_Length2D + geometry a_2dlinestring + + + + + + Description + + Returns the 2-dimensional length of the geometry if it is a + linestring or multi-linestring. This is an alias for ST_Length + + + + + + See Also + + , + + + + + + ST_Length3D + + Returns the 3-dimensional or 2-dimensional length of the geometry if it is a + linestring or multi-linestring. + + + + + + float ST_Length3D + geometry a_3dlinestring + + + + + + Description + + Returns the 3-dimensional or 2-dimensional length of the geometry if it is a + linestring or multi-linestring. For 2-d lines it will just return the 2-d length (same as ST_Length and ST_Length2d) + + + + + + + This function supports 3d and will not drop the z-index. + + + + + Examples + + Return length in feet for a 3D cable. Note this is in feet because 2249 is + Mass State Plane Feet + +SELECT ST_Length3D(ST_GeomFromText('LINESTRING(743238 2967416 1,743238 2967450 1,743265 2967450 3, +743265.625 2967416 3,743238 2967416 3)',2249)); +st_length3d +----------- +122.704716741457 + + + + + + See Also + + , + + + + ST_OrderingEquals