<@
更新时间:
复制 MD 格式
Returns true if a grid is contained within a geometry, or if one grid is contained within another grid.
Syntax
boolean <@(geomgrid grid, geometry geom);
boolean <@(geometry geom, geomgrid grid);
boolean <@(geomgrid grid1, geomgrid grid2);Parameters
| Parameter | Description |
|---|---|
grid | The grid to test for containment. |
geom | The geometry to test against. |
Description
The <@ operator checks whether a grid or geometry is spatially contained within another grid or geometry.
The geometry argument must use the CGC2000 spatial reference system — the Chinese national coordinate standard. Its spatial reference system identifier (SRID) must be 4490.
Examples
Example 1: Check whether a geometry point is contained in a grid. The point falls outside the grid, so the result is f.
SELECT ST_GeomFromText('POINT(116.31522216796875 39.910277777777778)', 4490) <@
ST_GridFromText('G001331032213300013') AS is_contained; is_contained
--------------
fExample 2: Check whether a smaller grid is contained in a larger grid. The result is t.
SELECT ST_GridFromText('G001331032213300013') <@
ST_GridFromText('G001331032213300') AS is_contained; is_contained
--------------
t该文章对您有帮助吗?