jeudi 26 mars 2015

How to Insert geom line in geom geometry column?


I am a beginners and I have the coordinates of a lot of points in a table. In pgadmin I want to make a line that passes on these points. I already have my Coordinate point im my table. I want to make line with those cooirdinate point that already have in my table. In the same table I want to INSERT geom line in the geom geometry column


enter image description here Description of the table: ID,X,Y, description column, length, description column. I want to make the line that passes on this point.


I have done this query:



SELECT AddGeometryColumn('MyTable', 'geom', 32634, 'LINESTRING', 2);
UPDATE "MyTable"
SET geom = ST_SetSRID(ST_MakeLINE((ST_MakePOINT1("X", "Y"), ST_MakePOINT2("X", "Y")), 32634));


but it doesn't work. Can anyone help me please?





Aucun commentaire:

Enregistrer un commentaire