This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Copyright Paul Ramsey, 2014 | |
-- http://gis.stackexchange.com/questions/94203/how-to-group-connected-linestrings-in-postgis | |
drop table lines; | |
create table lines ( id integer primary key, geom geometry(linestring) ); | |
insert into lines (id, geom) values ( 1, 'LINESTRING(0 0, 0 1)'); | |
insert into lines (id, geom) values ( 2, 'LINESTRING(0 1, 1 1)'); | |
insert into lines (id, geom) values ( 3, 'LINESTRING(1 1, 1 2)'); | |
insert into lines (id, geom) values ( 4, 'LINESTRING(1 2, 2 2)'); | |
insert into lines (id, geom) values ( 11, 'LINESTRING(10 10, 10 11)'); |
NewerOlder