RES: [postgis-users] Transform Points to Line

strk at refractions.net strk at refractions.net
Thu Oct 28 07:08:23 PDT 2004


On Thu, Oct 28, 2004 at 11:03:14AM -0200, Gustavo Oliveira wrote:
> Isn't there another way to convert?
> 
> Something like GeometryFromText('LINESTRING(200509.7414
> 7564876.6272,201884.7341 7563144.9198)', -1)
> 
> The statement above I have strings and so I can make a line, but if I have
> points instead of strings?

You can use x(geometry) and y(geometry) to extract x/y values from a point.
(not sure this is what you're asking)

--strk;

> 
> []s
> 
> 
> -----Mensagem original-----
> De: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net]Em nome de
> strk at refractions.net
> Enviada em: quinta-feira, 28 de outubro de 2004 07:27
> Para: PostGIS Users Discussion
> Cc: Paul Ramsey
> Assunto: Re: [postgis-users] Transform Points to Line
> 
> 
> 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
> _______________________________________________
> 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