This topic describes the @> operator, which queries whether a grid contains a geometry.
boolean @>(geomgrid grid, geometry geom); boolean @>(geometry geom, geomgrid grid); boolean @>(geomgrid grid1, geomgrid grid2);
|grid||The grid whose spatial relationship you want to query.|
|geom||The geometry whose spatial relationship you want to query.|
This function returns the spatial relationship between a grid and a geometry. The geometry must use the CGC2000 spatial reference system. In addition, the spatial reference system identifier (SRID) of the geometry must be 4490.
select ST_gridfromtext('G001331032213300013') @> ST_geomfromtext('POINT(116.31522216796875 39.910277777777778)',4490) as t; t --------------- f select ST_gridfromtext('G00133103221330') @> ST_gridfromtext('G001331032213300013') as t t ------------- t