SDO_UTIL.H3SUM_ESTIMATE_RESOLUTION
Format
SDO_UTIL.H3SUM_ESTIMATE_RESOLUTION(
h3_table IN VARCHAR2 DEFAULT NULL,
tile_zoom IN NUMBER,
hexes IN NUMBER DEFAULT NULL
) RETURN NUMBER;
Description
Provides an H3 resolution which will result in approximately the requested number of hexes in the given tile.
Parameters
h3_table
The H3 table used to get the extent of the data. If NULL, then it is assumed that the data extent is global.
tile_zoom
The zoom value. This value is mandatory.
hexes
The number of hexes required in the given tile. If NULL, then a default value of 300 is used.
Usage Notes
The SDO_UTIL.H3SUM_ESTIMATE_RESOLUTION procedure returns a number between 0 and 15 inclusive.
Increasing or decreasing the resolution by 1 changes the number of hexes by approximately a factor of 7. Also, note that the tiles near the equator represent areas as much as 130x larger than tiles at the poles. Therefore, the actual number of hexes in a tile will vary considerably from the goal value.
Examples
The following example queries use the SDO_UTIL.H3SUM_ESTIMATE_RESOLUTION procedure to determine the estimated H3 resolution:
SELECT SDO_UTIL.H3SUM_ESTIMATE_RESOLUTION(tile_zoom=>7) FROM DUAL;
SDO_UTIL.H3SUM_ESTIMATE_RESOLUTION(TILE_ZOOM=>7)
------------------------------------------------
5
SELECT SDO_UTIL.H3SUM_ESTIMATE_RESOLUTION(tile_zoom=>7, hexes=>500) FROM DUAL;
SDO_UTIL.H3SUM_ESTIMATE_RESOLUTION(500,TILE_ZOOM=>7)
----------------------------------------------------
6
SELECT SDO_UTIL.H3SUM_ESTIMATE_RESOLUTION('QUTTINIRPAAQ_H3', tile_zoom=>7, hexes=>500);
SDO_UTIL.H3SUM_ESTIMATE_RESOLUTION('QUTTINIRPAAQ_H3',TILE_ZOOM=>7,HEXES=>500)
-----------------------------------------------------------------------------
7
Related Topics