[postgis-users] Nearest point between a given point and a multilinestring
Eric FRANCOIS
ericfrancois at hotmail.com
Tue Jan 30 08:34:42 PST 2007
hello,
I'm able to find the nearest multiline string from a given point with this
query:
select distance(s.the_geom, SetSRID(MakePoint(3.23,48.2), 4326)) as dist
from streets_db as s
WHERE s.the_geom && expand(SetSRID(MakePoint(3.23,48.2), 4326),0.01) AND
distance(s.the_geom, SetSRID(MakePoint(3.23,48.2), 4326)) <= 0.01
order by dist asc limit 1
But how can I find the X-Y coordinate of the nearest point on this
MULTILINESTRING to perform a
distance_sphere(the_given_point,the_finding_nearest_point_on_the_multilinest
ring)?
Thanks
ERIC
More information about the postgis-users
mailing list