跳转至
🎉 SedonaDB 0.4.0 已正式发布!🗺️ 新增 Python DataFrame API、R dplyr 接口、Geography 支持及 GPU 加速空间连接。阅读发布博客 →

ST_Within

Introduction: Return true if geography A is fully within geography B.

ST_Within on the sphere: A within B

Format:

ST_Within (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_Within(ST_GeogFromWKT('POINT (1 1)', 4326), ST_GeogFromWKT('POLYGON ((0 0, 2 0, 2 2, 0 2, 0 0))', 4326))

Output:

true