[postgis-users] Convert Point to Multilinestring

Fred Lehodey lehodey at gmail.com
Mon Nov 17 09:52:54 PST 2008


Hi Maria,

You need to have a field for ordering your points. (gid in this example)


SELECT ST_MakeLine(pts.the_geom)
FROM (SELECT the_geom FROM your_points_table ORDER BY gid) as pts


Fred.





On Mon, Nov 17, 2008 at 5:33 PM, Maria Arias de Reyna <marias at emergya.es>wrote:

> Hi,
>
> I'm trying to convert a table of points to a table of multilinestring. Is
> it
> posible? How?
>
> Background: I want to use PgRouting to find quickest routes and I have two
> shape files with data: a point shape and a multilinestring shape. As
> PgRouting can't work with both, I want to convert the points to little
> multilinestring so I can use them. If you know of another solution, it will
> be gladly wellcome, of course.
>
> Thanks in advance.
>
> --
> María Arias de Reyna Domínguez
> Emergya Consultoría
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20081117/9d33b3eb/attachment.html>


More information about the postgis-users mailing list