> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# ST_Covers

> 判断多边形是否覆盖一个点，包括边界。

判断点是否位于多边形内部、外环边界或孔洞边界上。

## 语法

```sql theme={null}
BOOLEAN ST_Covers(GEOGRAPHY polygon, GEOGRAPHY point)
BOOLEAN ST_Covers(GEOMETRY polygon, GEOMETRY point)
```

`polygon` 必须是 XY `POLYGON` 或 `MULTIPOLYGON`，`point` 必须是 XY `POINT`。`GEOMETRY` 描述符必须匹配。`NULL` 传递，`EMPTY` 输入返回 `false`。

## 示例

```SQL theme={null}
SELECT ST_Covers(
    ST_GeogFromText('POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))'),
    ST_GeogFromText('POINT (0 5)'));
-- true
```

## 关键词

ST\_COVERS,ST,COVERS

## 相关数据类型

[GEOGRAPHY](/documents/cn/4.2/sql-reference/data-types/spatial-types/GEOGRAPHY.md), [GEOMETRY](/documents/cn/4.2/sql-reference/data-types/spatial-types/GEOMETRY.md), [BOOLEAN](/documents/cn/4.2/sql-reference/data-types/numeric/BOOLEAN.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.