我使用的是postgresql版本: 「在x86_64-unknown-linux-gnu上的PostgreSQL 9.3.1,由gcc(GCC)編譯4.6.3 20120306(Red Hat 4.6.3-2) ,64位「st_intersect()在postgresql中不起作用
我創建了2個表A和B,其中點和多邊形作爲數據類型。 現在我想知道點是否在多邊形內。 爲此,我試圖使用ST_Intersect(A.point_LatLong,B.polygon_abc); 我的查詢是:
SELECT A.id
FROM A, B
WHERE A.name = 'callifornia'
AND ST_Intersect(A.point_LatLong , B.polygon_abc);
這裏point_latLong
和polygon_abc
是具有表A的數據類型點和多邊形B.
列名,但此查詢給出了一個錯誤:
ERROR: function st_intersect(point, polygon) does not exist
LINE 3: WHERE city.city_name = 'callifornia' AND ST_intersect(city.c...
HINT: No function matches the given name and argument types. You might need to add
explicit type casts.
我該如何解決這個問題?我甚至無法在postgresql中使用任何其他空間方法,如st_contains()等讓我知道你是否有任何解決方案。
'st_intersect()'是PostGIS的功能,它聽起來好像你沒有安裝PostGIS。 –