[postgis-users] Sorting/ordering linestrings

Charles Galpin cgalpin at lhsw.com
Wed Mar 30 09:24:22 PDT 2011


Does anyone have any bright ideas on how to sort linestrings (with postgis or anything else for that matter).

The idea is I have some set of linestrings which mostly if not all will be part of an interconnected "route" or roadway, but not sorted from start to finish in say a particular direction.

My goal is to sort/order them so that they are in order as you'd traverse the network, keeping in mind there may be gaps or other randomness to the linestrings but ill be generally related.  I don't have a start/end or I'd route between them to get the ordering.

Thanks,
charles




More information about the postgis-users mailing list