跳转至
Apache Sedona 1.9.0 已正式发布,新增 Spark 4.1 支持、proj4sedona 坐标系转换、Bing Tile 函数等众多特性!

ST_Intersects

Introduction: Return true if two geographies share any portion of space.

ST_Intersects on the sphere: two geographies intersect

Format:

ST_Intersects (geogA: Geography, geogB: Geography)

Return type: Boolean

Since: v1.9.1

Geography polygons follow the spherical right-hand rule: a counter-clockwise ring's interior is the enclosed region, so the polygon below is counter-clockwise. A clockwise ring would denote the complementary region on the sphere.

SQL Example:

SELECT ST_Intersects(ST_GeogFromWKT('POLYGON ((0 0, 2 0, 2 2, 0 2, 0 0))', 4326), ST_GeogFromWKT('POINT (1 1)', 4326))

Output:

true