All Products
Search
Document Center

PolarDB:@@>

Last Updated:Mar 28, 2026

The @@> operator indicates whether the spatial range represented by a 3D geographic grid is included by a 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

ParameterDescription
gridcode / gridcode1 / gridcode2The geographic grid object
geom3dThe 3D geometry

Description

Returns the spatial relationship between a 3D geographic grid and a geometry. The geometry must use the CGC2000 spatial reference system (SRID 4490).

Both argument orderings are supported as separate overloads: geometry @@> geomgrid and geomgrid @@> geometry share the same containment semantics. The result column in query output appears as st_3dcontains.

Examples

Grid contains a 3D point — returns t when the point falls within the grid's spatial range:

SELECT ST_GridFromText('GZ00262064446046072072') @@>
'srid=4490;POINT(116.31522216796875 39.910277777777778 1001.8)'::geometry;
 st_3dcontains
-----------------
 t

Grid contains a smaller grid — returns t when gridcode1 spatially contains gridcode2:

SELECT ST_GridFromText('GZ00262064') @@> ST_GridFromText('GZ002620643');
 st_3dcontains
-----------------
 t

See also

  • ST_GridFromText — constructs a geomgrid from a grid code string