> 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. >
Hi Hugues :) By creating a sequence and calling nextval('sequence'), you will be able to generate a series of numbers. Nico _______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users