From: Regina Obe Date: Wed, 29 Oct 2008 12:37:30 +0000 (+0000) Subject: Move over ST_Line_Interpolate_Point X-Git-Tag: 1.4.0b1~564 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=71768f860df307555da7e5d73077c397fed18243;p=postgis Move over ST_Line_Interpolate_Point git-svn-id: http://svn.osgeo.org/postgis/trunk@3200 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/reference.xml b/doc/reference.xml index a229e0349..a727e522a 100644 --- a/doc/reference.xml +++ b/doc/reference.xml @@ -543,29 +543,6 @@ Linear Referencing - - ST_line_interpolate_point(linestring geometry, locationfraction float8) - - - Returns a point interpolated along a line. First argument - must be a LINESTRING. Second argument is a float8 between 0 and 1 - representing fraction of total 2d - length the point has to be located. - - See line_locate_point() for - computing the line location nearest to a Point. - - - Since release 1.1.1 this function also interpolates M and - Z values (when present), while prior releases set them to - 0.0. - - - Availability: 0.8.2 - - - ST_Line_Substring(linestring geometry, startfraction float8, endfraction float8) @@ -624,7 +601,7 @@ WHERE n*100.00/length < 1; - + ST_line_locate_point(LineString geometry, Point geometry) diff --git a/doc/reference_new.xml b/doc/reference_new.xml index 9e8de6e9e..42ebcf850 100644 --- a/doc/reference_new.xml +++ b/doc/reference_new.xml @@ -9064,7 +9064,79 @@ GEOMETRYCOLLECTION(POINT(-2 3 1),LINESTRING(5 5 5,10 10 10),POLYGON((-7 4.2 2,-7 Linear Referencing - + + + ST_Line_Interpolate_Point + + Returns a point interpolated along a line. Second argument is a float8 between 0 and 1 + representing fraction of total length of linestring the point has to be located. + + + + + + geometry ST_Line_Interpolate_Point + geometry a_linestring + float a_fraction + + + + + + Description + + Returns a point interpolated along a line. First argument + must be a LINESTRING. Second argument is a float8 between 0 and 1 + representing fraction of total linestring length the point has to be located. + + See for + computing the line location nearest to a Point. + + + Since release 1.1.1 this function also interpolates M and + Z values (when present), while prior releases set them to + 0.0. + + Availability: 0.8.2, support Z and M 1.1.1 + + + + + + + This function supports 3d and will not drop the z-index. + + + + + Examples + + --Return point mid-way of 2d line +SELECT ST_AsEWKT(ST_Line_Interpolate_Point(the_line, 0.5)) + FROM (SELECT ST_GeomFromEWKT('LINESTRING(1 2, 4 5, 6 7)') as the_line) As foo; + st_asewkt +---------------- + POINT(3.5 4.5) + + +--Return point mid-way of 3d line +SELECT ST_AsEWKT(ST_Line_Interpolate_Point(the_line, 0.5)) + FROM (SELECT ST_GeomFromEWKT('LINESTRING(1 2 3, 4 5 6, 6 7 8)') as the_line) As foo; + + st_asewkt +-------------------- + POINT(3.5 4.5 5.5) + + + + + + + See Also + + , + +