ST_OVERLAPS (Azure 串流分析)

如果 geography 與另一個地理位置重迭,則傳回 1。 如果地理位置不重迭,或一個位於另一個地理位置內,則會傳回 0。

Syntax

ST_OVERLAPS (polygonA, polygonB)  

引數

PolygonA

可與多邊形B 重迭的多邊形。

多邊形B

可與多邊形A 重迭的多邊形。

傳回類型

如果多邊形與另一個多邊形重迭,則傳回 1,否則會傳回 0。

範例

SELECT  
     ST_OVERLAPS(input.datacenterArea, input.stormArea)  
FROM input  
  

輸入範例

datacenterArea stormArea
{"type": "Polygon", "coordinates": [ [0.0, 0.0], [10.0, 0.0], [10.0, 10.0], [0.0, 10.0], [0.0, 0.0] ]} {「type」:「Polygon」, 「coordinates」: [ [30.0, 30.0], [40.0, 30.0], [40.0, 40.0], [30.0, 40.0], [30.0, 30.0] ]}
{「type」:「Polygon」, 「coordinates」: [ [0.0, 0.0], [20.0, 0.0], [20.0, 20.0], [0.0, 20.0], [0.0, 0.0] ]} {「type」:「Polygon」, 「coordinates」: [ [10.0, 10.0], [40.0, 10.0], [40.0, 40.0], [40.0, 20.0], [40.0, 40.0] ]}

輸出範例

0

1

另請參閱