1

我正在使用 PostgreSQL 9.1 和 PostGIS 2.0.1。

列的类型locationpoint。类型latitudelongitude双精度。

为什么这个更新声明

update list_of_location SET location = ST_SetSRID(ST_MakePoint(longitude,latitude), 4326);

返回

LINE 1: update list_of_location SET location = ST_SetSRID(ST_MakePoint(longit...
                                               ^
HINT:  You will need to rewrite or cast the expression.
4

1 回答 1

3

要使用 PostGIS 2.0+,location类型应该是geometry(Point,4326),而不是 point

于 2012-07-31T19:33:39.280 回答