35.47 SDO_UTIL.H3_KEY
Format
SDO_UTIL.H3_KEY( longitude IN NUMBER, latitude IN NUMBER, resolution IN NUMBER DEFAULT 15) RETURN RAW;
SDO_UTIL.H3_KEY( geometry IN mdsys.sdo_geometry, resolution IN NUMBER DEFAULT 15) RETURN RAW;
Description
Returns the H3 cell for the given geodetic point and resolution.
Parameters
- longitude
-
The longitude of the input point.
- latitude
-
The latitude of the input point.
- geometry
-
A geometry consisting of a single point in a geodetic coordinate system. SRID must be non-null. If it is not SRID 4326, then the point will be transformed to SRID 4326.
- resolution
-
The resolution of the H3 cell to return, from zero (coarsest) to 15 (finest).
Usage Notes
The SDO_UTIL.H3_KEY
function converts point locations to the
hexagonal hierarchical spatial indexing system designed by Uber. This indexing system divides
the world into 122 resolution 0 cells of 4.4 million km2 each at the top level (level
0). Cells are mapped onto an icoshedron (regular 20-sided polyhedron). Each increase in
resolution subdivides into smaller cells until level 15 which has 569,707,381,193,162 cells of
about 1 m2 each. The cells are hexagons except for 12 pentagons at each level (a
sphere cannot be tiled with just hexagons). Note that a hexagon cannot be subdivided exactly
with hexagons. As a result, cells near the border of their parent cell are not perfectly
contained in their parent cell.
H3 is always computed in SRID 4326 coordinate system.
Examples
The following example shows an H3 cell in Paris:
SELECT SDO_UTIL.H3_KEY(48.85755957774311, 2.344920508484808, 7) FROM DUAL;
0877AA5145FFFFFF
The following example shows the smallest H3 cell (level 15) containing the North Pole:
SELECT SDO_UTIL.H3_KEY(SDO_GEOMETRY(2001, 4326, SDO_POINT_TYPE(0, 90, NULL), NULL, NULL), 15);
08F0326233AB0399
Related Topics
- SDO_UTIL.H3_BASE_CELL
- SDO_UTIL.H3_BOUNDARY
- SDO_UTIL.H3_CENTER
- SDO_UTIL.H3_HEX_AREA
- SDO_UTIL.H3_HEX_EDGELEN
- SDO_UTIL.H3_IS_CLASS3
- SDO_UTIL.H3_IS_PENTAGON
- SDO_UTIL.H3_MBR
- SDO_UTIL.H3_NUM_CELLS
- SDO_UTIL.H3_PARENT
- SDO_UTIL.H3_PENTAGON_AREA
- SDO_UTIL.H3_PENTAGON_EDGELEN
- SDO_UTIL.H3_RESOLUTION
- SDO_UTIL.H3SUM_CREATE_TABLE
- SDO_UTIL.LINEAR_KEY
Parent topic: SDO_UTIL Package (Utility)