[postgis-users] Retrieving linestring data between endpoints

Francois Hugues hugues.francois at irstea.fr
Thu Sep 6 04:34:08 PDT 2012


Maybe you could simply try to merge every segment and make a dump of this unique multiline to keep only the ones which are simple lines.

Select st_dump(st_union(geom)) from mytable


-----Message d'origine-----
De : postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] De la part de Max Pyziur
Envoyé : mercredi 5 septembre 2012 19:16
À : postgis-users at postgis.refractions.net
Objet : [postgis-users] Retrieving linestring data between endpoints


I'm trying to figure out a way of constructing linestrings between endpoints.

Shapefile data for pipelines and railroads does not present continuous lines; instead they are in the form of small line segments. The applications are using data for roads, pipelines, or railroads.

Interstate 70 is not one complete linestring between Washington DC and the middle of Utah; instead it is a series of segments. The same with pipeline and railroad data.

The problem becomes more cumbersome (at least to me) when there is no knowledge of the data between two points (say Edmonton and Vancouver) and you want to see if there is a way to string a set of segments between two points (to answer a question like is there a railline between Edmonton and Vancouver)?

I would appreciate any advice on how to proceed.

Much thanks,

Max Pyziur
pyz at brama.com
postgis-users mailing list
postgis-users at postgis.refractions.net

More information about the postgis-users mailing list