Partager via


ST_OVERLAPS

✅ Azure Stream Analytics ✅ Fabric Eventstream

Retourne 1 si une zone géographique se chevauche avec une autre. Si les zones géographiques ne se chevauchent pas ou qu’elles se trouvent dans une autre zone, elles retournent 0.

Syntaxe

ST_OVERLAPS (polygonA, polygonB)  

Raisonnement

PolygonA

Polygone qui peut chevaucher polygonB.

PolygonB

Polygone qui peut chevaucher polygonA.

Type renvoyé

Retourne 1 si un polygone se chevauche avec un autre polygone, s’il ne retourne pas 0.

Exemple :

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

Exemple d’entrée

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] ]}

Exemple de sortie

0

1

Voir aussi