[postgis-users] Break lines at intersections
iacovlev.pavel at gmail.com
Wed Mar 28 13:10:21 PDT 2012
Thank you for your suggestion Nicolas Ribot, I will give it a go.
On Wed, Mar 28, 2012 at 6:04 PM, Nicolas Ribot <nicolas.ribot at gmail.com> wrote:
> On 28 March 2012 15:43, Pavel Iacovlev <iacovlev.pavel at gmail.com> wrote:
>> Thank you for you help Sandro,
>> As I understand something like this in theory:
>> SELECT ST_Node(ST_Collect(the_geom)) FROM roads;
>> Then I generate series from the result and using ST_Contains find to
>> what initial "road" geometry the segment belongs and get it's gid or
>> another attribute.
>> Also you know (or maybe someone else knows) is it possible to
>> accomplish this in PostGIS 1.5 ?
> Yes it is. Look at st_union() and st_dump.
> st_union will cut the lines at their intersection points:
> select st_astext((st_dump(st_union(geometry))).geom) from lines;
> postgis-users mailing list
> postgis-users at postgis.refractions.net
More information about the postgis-users