Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/76.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
postgresql/postgis_Sql_Postgis_Postgresql 9.1 - Fatal编程技术网

postgresql/postgis

postgresql/postgis,sql,postgis,postgresql-9.1,Sql,Postgis,Postgresql 9.1,我使用以下命令行在Postgres/Postgis中创建了点几何体列(coordenadas): SELECT AddGeometryColumn ('public', 'tb_amostra', 'coordenadas', 4326, 'POINT',2,false); 我在tb_amostra表中有两列,LONGITUGE和LATITUDE,我需要根据经度和纬度列中的值将(lon,lat)的8位小数点创建到coordenadas列中。 有什么帮助吗? 提前感谢您抽出时间 @lat lo

我使用以下命令行在Postgres/Postgis中创建了点几何体列(coordenadas):

SELECT AddGeometryColumn ('public', 'tb_amostra', 'coordenadas', 4326, 'POINT',2,false); 
我在tb_amostra表中有两列,LONGITUGE和LATITUDE,我需要根据经度和纬度列中的值将(lon,lat)的8位小数点创建到coordenadas列中。 有什么帮助吗?
提前感谢您抽出时间

@lat long在运行您建议的更新命令行后,我得到了一个长字符串(0101000020E610000324ABF58F2EB36C06C46F28B25DF44C0)。好像出了什么事。对此有何评论?update命令是否应该在coordenadas列中创建一个值,如下所示:POINT(lon,lat)?
UPDATE tb_amostra SET coordenadas = ST_SetSRID(ST_MakePoint(lon,lat),4326);