<@

更新时间:
复制 MD 格式

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

ParameterDescription
gridThe grid whose spatial relationship you want to query.
geomThe 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
---------------
 f

Example 2: Test whether a grid is contained within another grid.

SELECT ST_gridfromtext('G001331032213300013') <@
        ST_gridfromtext('G001331032213300') AS t;

 t
-------------
 t