Queries whether a grid is contained in a geometry.
Syntax
boolean <@(geomgrid grid, geometry geom);
boolean <@(geometry geom, geomgrid grid);
boolean <@(geomgrid grid1, geomgrid grid2);Parameters
| Parameter | Description |
|---|---|
grid | The grid whose spatial relationship you want to query. |
geom | The geometry whose spatial relationship you want to query. |
Usage notes
The geometry must use the CGC2000 spatial reference system. The spatial reference system identifier (SRID) of the geometry must be 4490.
Examples
Example 1: Test whether a geometry is contained within a grid. The point is not contained in the specified grid, so the operator returns f.
SELECT ST_geomfromtext('POINT(116.31522216796875 39.910277777777778)', 4490) <@
ST_gridfromtext('G001331032213300013') AS t;
t
---------------
fExample 2: Test whether a grid is contained within another grid.
SELECT ST_gridfromtext('G001331032213300013') <@
ST_gridfromtext('G001331032213300') AS t;
t
-------------
t该文章对您有帮助吗?