[postgis-users] Transform Points to Line
strk at refractions.net
strk at refractions.net
Thu Oct 28 00:51:24 PDT 2004
On Wed, Oct 27, 2004 at 07:26:59PM -0200, Gustavo Oliveira wrote:
> How can I tranform two points in a line?
>
> I am trying something like that:
>
> SELECT transform('LSEG((' || (esquina1.node)|| ', ' || (esquina2.node) ||
> '))'::geometry)
> FROM geo_rua arco, geo_esquina esquina1, geo_esquina esquina2
> WHERE arco.idesqini = esquina1.id AND arco.idesqfim = esquina2.id;
>
> At this statment esquina1.node and esquina2.node are columns which the type
> is point. I tried some variations of this, but all of them failed.
With Postgis from the HEAD branch of CVS you can do the following:
SELECT LineFromMultipoint(Collect(esquina1.node, esquina2.node));
--strk;
>
>
> ---
> Gustavo Borges de Oliveira
> PIPE - FAPESP
> 3WT - Wireless Web World Tech
> gustavo.oliveira at 3WT.com.br
> tel: +55 16 3371-4343
> fax: +55 16 3371-9847
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list