SDO_UTIL.H3_HEX_EDGELEN
Format
SDO_UTIL.H3_HEX_EDGELEN(
resolution IN NUMBER,
unit IN VARCHAR2 DEFAULT 'KM',
measure IN VARCHAR2 DEFAULT 'AVERAGE'
) RETURN NUMBER;
Description
Returns the minimum (‘MIN’), maximum (‘MAX’) or average (‘AVG’) edgelen of hexes at the given resolution.
Parameters
resolution
The H3 level to query.
unit
The unit of length measurement to use (see Table: SDO_UNITS_OF_MEASURE Table).
measure
One of the following supported values: MIN, MAX, AVG, or AVERAGE.
Usage Notes
The SDO_UTIL.H3_HEX_EDGELEN procedure returns the requested constant statistic for the given H3 level. Note that the 12 pentagons at each level have their own statistics. For hexagons (but not pentagons) the edgelen is also the distance from the hex’s center to a vertex.
If you want the area of a specific cell, rather than values for the entire level, use SDO_GEOM.SDO_AREA(SDO_UTIL.H3_BOUNDARY(h3_key), 0.00001).
Examples
The following example shows the edgelen of the smallest H3 cell (smallest level-15 cell):
SELECT SDO_UTIL.H3_HEX_EDGELEN(15, 'M', 'MAX') FROM DUAL;
64482
Related Topics