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

Shoaib Burq shoaib at nomad-labs.com
Sun Jan 21 02:55:01 PST 2007


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, 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
>



More information about the postgis-users mailing list