【发布时间】:2013-10-03 12:11:22
【问题描述】:
我想使用 PostGIS 创建一个多边形表。表'point'中的每一行都有三点ID.
表'point_location'有点的位置信息。我用谷歌搜索了这个问题,但没有找到答案。下面的代码有什么问题?
SELECT ST_GeomFromText('POLYGON((' || b.x || ' ' || b.y || ',' || c.x || ' ' || c.y || ',' || d.x || ' ' || d.y || ',' || b.x || ' ' || b.y'))',4326)
AS polygon
FROM point a, point_location b, point_location c, point_location d
WHERE a.p1=b.point_id AND a.p2=c.point_id AND a.p3=d.point_id
【问题讨论】:
-
你应该在 gis.stackexchange.com 上问这个问题
标签: postgresql gis postgis