2016-06-19 20 views
0

私は、指定された円と交差または重複するデータベースに保存されているすべての円(世界中に存在する円)を見つけようとしています。私はこのエラーを取得しています、与えられた円を交差するすべての円を見つけるためにしようとしているとき、今PostGISの特定の円と交差するすべての円を取得する方法は?

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)); 

私が間違っていることを教えてもらえますか?

答えて

0

私が使用してこの作業を得た:

select * from circles where st_intersects (circles.the_geog,geometry(ST_Buffer(geography(ST_GeomFromText('POINT(13.28527 52.521711)')), 1000))); 
関連する問題