[postgis-users] line_locate_point() function

strk at refractions.net strk at refractions.net
Fri Jan 13 01:12:05 PST 2006


Thank you for reporting this.
It was a bug. Fixed in CVS HEAD.

--strk;

On Thu, Jan 12, 2006 at 01:41:07PM -0800, Emily Gouge wrote:
> Hi all,
> 
> I have a linestring and a point that I am passing to the 
> line_locate_point() function.  The point is identical to the last 
> coordinate of the linestring, however the line_locate_point() function is 
> not returning 1 as I would expect.  Is this a bug or am I doing something 
> wrong?
> 
> The query:
> 
> select line_locate_point(geomfromtext('LINESTRING(-1953743.873 
> 471070.784,-1953735.105 471075.419,-1953720.034 471081.649)', 6269), 
> geomfromtext('POINT(-1953720.034 471081.
> 649)', 6269));
>  line_locate_point
> -------------------
>   0.99895463120899
> (1 row)
> 
> 
> An interesting thing to note is if I remove the middle coordinate of the 
> linestring I do get 1:
> select line_locate_point(geomfromtext('LINESTRING(-1953743.873 
> 471070.784,-1953720.034 471081.649)', 6269), 
> geomfromtext('POINT(-1953720.034 471081.649)', 6269));
>  line_locate_point
> -------------------
>                  1
> 
> select * from postgis_full_version();
>                            postgis_full_version
> --------------------------------------------------------------------------
>  POSTGIS="1.1.1CVS" GEOS="2.1.1" PROJ="Rel. 4.4.9, 29 Oct 2004" USE_STATS
> 
> 
> Thanks,
> Emily
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-- 

 /"\    ASCII Ribbon Campaign
 \ /    Respect for low technology.
  X     Keep e-mail messages readable by any computer system.
 / \    Keep it ASCII. 




More information about the postgis-users mailing list