The &&& operator tests whether the spatial range of a geographic grid intersects with a geometry. It returns true if the ranges intersect, and false otherwise.
Syntax
The operator accepts the following type combinations:
Grid and standard geometry:
bool &&&(geometry geom3d, geomgrid gridcode)
bool &&&(geomgrid gridcode, geometry geom3d)Grid and mesh geometry:
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)Grid and grid:
bool &&&(geomgrid gridcode1, geomgrid gridcode2)Parameters
| Parameter | Description |
|---|---|
gridcode / gridcode1 / gridcode2 | The geographic grid object. |
geom3d | The 3D geometry. |
Description
The &&& operator returns the spatial relationship between a geographic grid and a 3D geometry by checking whether their spatial ranges intersect.
Spatial reference system requirement: The geometry must use the CGC2000 spatial reference system. The Spatial Reference System Identifier (SRID) of the geometry must be 4490.
Examples
Example 1: Grid and point geometry (no intersection)
SELECT ST_GridFromText('GZ00262064446046072072') &&&
'srid=4490;POINT(116.31522216796875 39.910277777777778 1001.8)'::geometry;Output:
st_3dintersects
-----------------
fExample 2: Two grids (intersecting)
SELECT ST_GridFromText('GZ00262064') &&& ST_GridFromText('GZ00262063');Output:
st_3dintersects
-----------------
tWhat's next
ST_GridFromText— convert a grid code string to ageomgridobject