Hi all, I think I've got a bit of a problem with snapping points to lines. I had thought that using line_interpolate_point(..., line_locate_point(...)) would do the trick, but this seems not to be the case:
gis=# SELECT ST_AsText(v.the_geom), ST_SRID(v.the_geom), ST_AsText(r.the_geom), ST_SRID(r.the_geom) FROM road_segments AS r, venues AS v WHERE v.venue_id = 29 AND r.gid = 100982; st_astext | st_srid | st_astext | st_srid ------------------------------------------+---------+---------------------------------------------------------------------------------+--------- POINT(415185.606066865 7827721.52951473) | 28353 | LINESTRING(415250.679102704 7827994.85292521,415218.694181662 7827642.44920486) | 28353 (1 row) gis=# SELECT ST_Intersects(ST_line_interpolate_point(r.the_geom, ST_line_locate_point(r.the_geom, v.the_geom)), r.the_geom) FROM road_segments AS r, venues AS v WHERE v.venue_id = 29 AND r.gid = 100982; st_intersects --------------- f (1 row) gis=# SELECT postgis_full_version(); postgis_full_version ---------------------------------------------------------------------------------------- POSTGIS="1.4.1" GEOS="3.2.1-CAPI-1.6.1" PROJ="Rel. 4.7.1, 23 September 2009" USE_STATS (1 row) Any assistance would be much appreciated. Thanks, -Francis Markham
_______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users