[postgis-users] Postgis 1.4 - Obtain closest point of point over polylines layer (without st_ClosestPoint)
Aitor Gil Martin
agmartin at getxo.net
Fri Feb 1 06:52:53 PST 2013
I´ve got a polylines layer (pipes) and a points layer (valves) and In Postgis 1.4 I would like to obtain the closest points but exactly on the closest polyline. In other words, i need to locate each valve over the closest point on a pipe but taking into account that there is not only one polyline but many and that i am using postgis 1.4 and St_ClosestPoint() that could help to solve this problem doesn't still exist on my postgis version.
I read that the following statement works if it is used for one polyline, but I need to be processed for all the polylines on the table:
SELECT ST_Line_Interpolate_Point(
line_to_project_onto.the_geom,
ST_Line_Locate_Point(
line_to_project_onto.the_geom,
points_to_project_onto_line.the_geom
)
)
FROM line_to_project_onto, points_to_project_onto_line;
If theres a way to add the St_ClosestPoint() function to my Postgis 1.4 could also help but i think i need to create a new function for this. Thanks in advance.
Regards,
Aitor Gil Martin
Departamento Informática
Getxoko Udala / Ayto Getxo
Tel: 94 466 02 16 Ext.- 3457
www.getxo.net <http://www.getxo.net/>
agmartin <mailto:agmartin at getxo.net> @getxo.net <mailto:agmartin at getxo.net>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20130201/e382c44f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 31896 bytes
Desc: image001.gif
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20130201/e382c44f/attachment.gif>
More information about the postgis-users
mailing list