【发布时间】:2011-03-24 00:11:36
【问题描述】:
我正在尝试使用 PostGIS 模板将一些数据输入到 PostgreSQL 8.4 数据库中。我无法UPDATE多边形:
> UPDATE my_table SET coords = POINT(1, 1)
UPDATE 0 1
> UPDATE my_table SET box = POLYGON(((1, 1), (2, 3), (3, 3), (1, 1)))
ERROR: function polygon(record) does not exist
> UPDATE my_table SET box = POLYGON((1, 1), (2, 3), (3, 3), (1, 1))
ERROR: function polygon(record, record, record, record) does not exist
> UPDATE my_table SET box = POLYGON(1, 1, 2, 3, 3, 3, 1, 1)
ERROR: function polygon(numeric, numeric, numeric, numeric, numeric, numeric, numeric, numeric) does not exist
> UPDATE my_table SET box = ((1, 1), (2, 3), (3, 3), (1, 1))
ERROR: column "box" is of type polygon but expression is of type record
如何插入多边形?请注意,数据已存在于表中,并用NULL 字段代替了空间数据。我需要UPDATE,而不是INSERT,但这应该没什么区别。
【问题讨论】:
-
您可以在专用站点gis.stackexchange.com找到更多有关GIS相关问题的专家解答
-
@amercader 谢谢!我不知道
gis.meta.stackexchange.com...
标签: sql spatial postgis postgresql