[postgis-users] Fw: please help me about postgis

alireza ghahremanian mat2ag at yahoo.com
Sun Jan 21 03:47:24 PST 2007


I have found the solution :-)

SELECT makeline(makepoint(x,y)) FROM test;

thanks a lot

----- Original Message ----
From: Shoaib Burq <shoaib at nomad-labs.com>
To: PostGIS Users Discussion <postgis-users at postgis.refractions.net>
Sent: Sunday, January 21, 2007 3:04:33 PM
Subject: Re: [postgis-users] Fw: please help me about postgis

Ah sorry... I missread you email must have been sleeping...

To create a linestring you need at least two points.

What is the error you get?

On 1/21/07, Shoaib Burq <shoaib at nomad-labs.com> wrote:
> Ah sorry... I miss read you email must have been sleeping...
> to create a linestring you need atleast two points.
>
> What is the error you get?
>
> On 1/21/07, alireza ghahremanian <mat2ag at yahoo.com> wrote:
> > I need create a line from this point which are dynamically updated so the line should be updated.
> >
> > ----- Original Message ----
> > From: Shoaib Burq <saburq at gmail.com>
> > To: PostGIS Users Discussion <postgis-users at postgis.refractions.net>
> > Cc: alireza ghahremanian <mat2ag at yahoo.com>
> > Sent: Sunday, January 21, 2007 2:24:25 PM
> > Subject: Re: [postgis-users] Fw: please help me about postgis
> >
> > Alireza,
> >
> > There is no need to specify x and y data values explicitly. The
> > AddGeometryColumn() takes care of it. If you need a table with point
> > data then do something like:
> >
> > CREATE TABLE test
> > {
> >  id integer NOT NULL,
> >  name varchar(128),
> >  CONSTRAINT test_pk PRIMARY KEY (id)
> > }
> > WITHOUTOIDS;
> >
> > SELECT AddGeometryColumn('test', 'test_geom', 4326, 'POINT', 2 );
> >
> > have a read of this
> > http://postgis.refractions.net/docs/ch04.html#id2837854 for a detailed
> > explanation of the process.
> >
> > hope this helps
> > Shoaib
> > --
> > http://geospatial.nomad-labs.com
> >
> > On 1/21/07, Shoaib Burq <saburq at gmail.com> wrote:
> > > The table you created is not spatial. to make it spatial you need to
> > > add a spatial column to it using AddGeometryColumn() function.
> > >
> > > There is no need to specify x and y and explicitly. The
> > > AddGeometryColumn() takes care of it. If you need a table with point
> > > data then do something like:
> > >
> > > CREATE TABLE test
> > > {
> > >   id integer NOT NULL,
> > >   name varchar(128),
> > >   CONSTRAINT test_pk PRIMARY KEY (id)
> > > }
> > > WITHOUTOIDS;
> > >
> > > SELECT AddGeometryColumn('test', 'test_geom', 4326, 'POINT', 2 );
> > >
> > > have a read of this
> > > http://postgis.refractions.net/docs/ch04.html#id2837854 for a detailed
> > > explanation of the process.
> > >
> > > hope this helps
> > > Shoaib
> > > --
> > > http://geospatial.nomad-labs.com
> > >
> > > On 1/21/07, alireza ghahremanian <mat2ag at yahoo.com> wrote:
> > > > I have a table like this:
> > > >
> > > > CREATE TABLE test
> > > > (
> > > >   id integer NOT NULL,
> > > >   x double precision,
> > > >   y double precision,
> > > >   CONSTRAINT test_pk PRIMARY KEY (id)
> > > > )
> > > > WITHOUT OIDS;
> > > >
> > > > which contains some coordinates  (x,y) of a track now I want to insert a geometry entry from this data in another table with a SELECT command something like this
> > > >
> > > > SELECT  GeomFromText('LINESTRING(x y)') FROM test;
> > > >
> > > > but it does not work please help me. I should note that the data in table test will update every 5 sec. so I must my geometry tables with respect to test table data.
> > > >
> > > > with special thanks
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > ____________________________________________________________________________________
> > > > Food fight? Enjoy some healthy debate
> > > > in the Yahoo! Answers Food & Drink Q&A.
> > > > http://answers.yahoo.com/dir/?link=list&sid=396545367
> > > >
> > > > Dear Sandro Santilli
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > ____________________________________________________________________________________
> > > > Yahoo! Music Unlimited
> > > > Access over 1 million songs.
> > > > http://music.yahoo.com/unlimited
> > > > _______________________________________________
> > > > postgis-users mailing list
> > > > postgis-users at postgis.refractions.net
> > > > http://postgis.refractions.net/mailman/listinfo/postgis-users
> > > >
> > >
> >
> >
> >
> >
> >
> >
> > ____________________________________________________________________________________
> > Expecting? Get great news right away with email Auto-Check.
> > Try the Yahoo! Mail Beta.
> > http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html
> >
>
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users





 
____________________________________________________________________________________
Looking for earth-friendly autos? 
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/



More information about the postgis-users mailing list