[postgis-users] Need to combine several multilinestrings into one

Bistrais, Bob Bob.Bistrais at maine.gov
Mon Sep 28 13:05:38 PDT 2015


I am trying to create one multilinestring from several multilinestrings.  These are the geom results from a pgRouting query:

SELECT pt.geom
                FROM pgr_dijkstra(
                                'SELECT gid AS id,
                                                sourceroute::integer as source,
                                                targetroute::integer as target,
                                                (feet / 5280)::double precision AS cost,
                                                feet::double precision as reverse_cost
                                                FROM ngrdsaroo2',2465,1713,false,true)
                                                as di
                                                JOIN ngrdsaroo2 pt on di.id2 = pt.gid

-This returns many rows of multilinesting geometry.  I want to combine these into one geometry, so that I can save it as a route for display.  I've tried ST_Union, ST_LineMerge, and others, but can't seem to get anything to work, I keep getting errors.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150928/7a4ce5d2/attachment.html>


More information about the postgis-users mailing list