Hello, I think you could order your points using st_distance. Something like this request should work :
select st_distance(st_startpoint(a.the_geom), st_intersection(a.the_geom, b.the_geom)), st_intersection(a.the_geom, b.the_geom) the_geom from my_single_linestring a, my_table_of_linestrings b where st_intersects (a.the_geom, b.the_geom) order by st_distance(st_startpoint(a.the_geom), st_intersection(a.the_geom, b.the_geom)) I don't know how to have a simple id (1, 2, 3, ..., n) without creating a new table with serial column or using a plpg function with a loop. Hugues -------- Message d'origine-------- De: postgis-users-boun...@postgis.refractions.net de la part de Ed Linde Date: ven. 15/06/2012 22:44 À: PostGIS Users Discussion Objet : [postgis-users] Linestring intersections + intersection order Hi all, I am trying to compute the intersection between a given linestring and a whole set of linestrings in a table. So the idea is that this single linestring will get intersected by the lines in the table at multiple points. Only thing is that i know the start and end of the linestring and I would like to know the ORDER in which these intersections took place. So the end result is that I get to see my query linestring along with all the "intersection points" with an increasing ID to indicate which point comes before the other. Hope that made sense. :) Cheers, Ed
<<winmail.dat>>
_______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users