[postgis-users] line_interpolate_point problem
Rhys Stewart
rhys.stewart at gmail.com
Mon Sep 24 09:38:26 PDT 2007
Hi all,
I'm (trying) to use line_interpolate_point to essentially 'snap' some
point features to the nearest line feature. the following is the query
i cobbled together:
select b.*,distance(geo,geom) as dist0,
line_interpolate_point(geom,(line_locate_point(geom,geo)::numeric(30,24)))
as pgeo,
from switch_fix a
inner join today.feeder b on a.geo && b.geom
where distance(geo,geom) < 5
limit 50
I was under the impression that line_interpolate_point would give me a
point on the line, however when i get the distance between the
interpolated point and the line, it is never 0, doesnt intersect, but
visually it appears to intersect the line.
any suggestions?