如何检查Postgres中两个多边形是否相交?

时间:2011-02-16 10:27:28

标签: postgresql

如何检查两个多边形是否在PG 8.3中相交?

##?不适用于多边形:

select polygon'((0,0), (1,2), (0,2))' # polygon'((0.5, 0), (1,0), (1,1))';
ERROR:  operator does not exist: polygon # polygon

select polygon'((0,0), (1,2), (0,2))' #? polygon'((0.5, 0), (1,0), (1,1))';
ERROR:  operator does not exist: polygon #? polygon

并且&&错误地说明了:

select polygon'((0,0), (1,2), (0,2))' && polygon'((0.5, 0), (1,0), (1,1))';
 ?column? 
----------
 t
(1 row)

1 个答案:

答案 0 :(得分:1)