Returns true if a geometry spatially contains a 3D geographic grid — that is, the grid's spatial range falls within the geometry.
Syntax
bool @@>(geometry geom3d, geomgrid gridcode);
bool @@>(geomgrid gridcode, geometry geom3d);
bool @@>(meshgeom geom3d, geomgrid gridcode);
bool @@>(geomgrid gridcode, meshgeom geom3d);
bool @@>(sfmesh geom3d, geomgrid gridcode);
bool @@>(geomgrid gridcode, sfmesh geom3d);
bool @@>(vomesh geom3d, geomgrid gridcode);
bool @@>(geomgrid gridcode, vomesh geom3d);
bool @@>(geomgrid gridcode1, geomgrid gridcode2);Parameters
| Parameter | Type | Description |
|---|---|---|
gridcode / gridcode1 / gridcode2 | geomgrid | The geographic grid object. |
geom3d | geometry, meshgeom, sfmesh, or vomesh | The 3D geometry. |
Returns
Returns true if the geometry contains the spatial range of the grid. Returns false otherwise.
Description
@@> checks the spatial containment relationship between a 3D geographic grid and a geometry. The result is true when the geometry's spatial range contains the grid.
The geometry must use the CGC2000 spatial reference system. The Spatial Reference System Identifier (SRID) of the geometry must be 4490.
Examples
Check whether a point geometry contains a grid
The following example checks whether the 3D point at coordinates (116.315°E, 39.910°N, 1001.8) contains grid GZ00262064446046072072. The result t confirms that the point geometry contains the grid's spatial range.
SELECT ST_GridFromText('GZ00262064446046072072') @@>
'srid=4490;POINT(116.31522216796875 39.910277777777778 1001.8)'::geometry;
st_3dcontains
-----------------
tCheck whether one grid contains another grid
The following example checks whether grid GZ00262064 contains grid GZ002620643. The result t confirms that the first grid contains the second grid's spatial range.
SELECT ST_GridFromText('GZ00262064') @@> ST_GridFromText('GZ002620643');
st_3dcontains
-----------------
t