2014-09-18 81 views
0

嗨,我試圖讓所有人都內的某一點爲10km的點,但我不斷收到操作不同SRIDs

ERROR: Operation on two GEOMETRIES with different SRIDs

這裏是我的查詢:

SELECT * FROM milllocations_30aug2014 WHERE st_distance(milllocations_30aug2014.shape, ST_GeomFromText('POINT(-93.62011857184822 51.02535700166606)', 4269))< 10000 

也milllocations_30aug2014.shape是這樣的:0101000020E61000007CF9F5285CAF5DC088DE3D0AD7834B40

我感謝你的幫助

回答

0

我設法使用st_transform

SELECT DISTINCT * FROM " + areaTable.getValue() + " WHERE st_distance(ST_Transform("+areaTable.getValue()+".shape,4269), ST_GeomFromText('POINT("+longitude+" "+latitude+")', 4269))< 10000 
+1

如果你設置你的表的SRID第一,而不是轉化在這樣飛你可能會獲得更好的性能來解決它​​。 – 2014-09-18 21:03:24