[postgis-users] Transform Points to Line

strk at refractions.net strk at refractions.net
Thu Oct 28 02:26:52 PDT 2004


Gustavo, just a note to warn you that postgis HEAD branch is
still under development (well.. this is tautologic).

I've just committed a new function so you can do:

	SELECT makeline(esquina1.node, esquina2.node);

More constructors/editors are to come, but testing the
CVS version is an hard task as often you'll need to dump/restore
your database until the code gets to a stable state.

A dump/restore process will be needed for the upcoming 1.0.0 release
anyway as internal postgis structures has changed (optimized).

--strk;

On Thu, Oct 28, 2004 at 09:51:24AM +0200, strk at refractions.net wrote:
> 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
> _______________________________________________
> 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