【发布时间】:2016-06-19 19:38:34
【问题描述】:
我正在尝试找出与给定圆相交或重叠的数据库中存储的所有圆(这些圆遍布世界各地)。我已经像这样存储了圈子:
CREATE TABLE circles(gid serial PRIMARY KEY, name varchar, code integer, the_geog geography(POLYGON,4326) );
INSERT INTO circles (gid, name, code, the_geog) VALUES (1,"hello", 11,geometry(ST_Buffer(geography(ST_GeomFromText('POINT(48.732084 -3.459144)')), 1000)));
现在,当我试图找出与给定圆相交的所有圆时,我收到了以下错误:
ERROR: Only lon/lat coordinate systems are supported in geography.
我正在使用这个查询来获取数据:
select * from circles where st_intersects (circles.the_geog,ST_Buffer(ST_Transform(ST_GeomFromText('POINT(-105.04428 39.74779)', 4326), 2877), 1500));
谁能告诉我我做错了什么?
【问题讨论】:
标签: python postgresql geometry postgis intersection