35.29 SDO_UTIL.GET_TILE_ENVELOPE
Format
SDO_UTIL.GET_TILE_ENVELOPE( tile_x IN NUMBER, tile_y IN NUMBER, tile_zoom IN NUMBER, google_ts IN BOOLEAN DEFAULT TRUE ) RETURN MDSYS.SDO_GEOMETRY;
Description
Converts a tile address into a tile envelope (an SDO geometry describing a square).
Parameters
- tile_x
-
The X ordinate of the origin point of the tile being fetched.
The minimum valid value for this parameter is zero. The maximum valid value is dependent on the zoom specified and can be computed as
max(X) = (2^tile_zoom) - 1
. Note that specifying a X ordinate outside the valid range raises an exception. - tile_y
-
The Y ordinate (in
NUMBER
format) of the origin point of the tile being fetched.The minimum valid value for this paramter is zero. The maximum valid value is dependent on the zoom specified and can be computed as
max(Y) = (2^tile_zoom) - 1
. Note that specifying a Y ordinate outside the valid range raises an exception. - tile_zoom
-
Determines the number of tiles required to divide a map. These segments can then be joined at a higher resolution without having to read in the entire map.
For instance, a
tile_zoom
of zero is a single tile of the entire map without a lot of details. Atile_zoom
ofn
breaks the map into2^n x 2^n
tiles (that is, the number of tiles along the X axis times the number of tiles along the Y axis). For example, at atile_zoom
of8
there would be65,536
tiles. This implies that higher the value ofn
, the more details there are in a tile. Note that the parameter values outside the valid range raise an exception. - google_ts
-
Boolean value that indicates if the Google tiling scheme is used.
The following two tiling schemes are supported when reading the tile addresses:
- GOOGLE: In this tiling scheme, the origin point (X,Y) of a tile is in the northwest corner. The X ordinates increase as tiles are read from west to east. The Y ordinates increase as tiles are read north to south.
- TMS: In this tiling scheme, the origin point (X,Y) of a tile is in the southwest corner. The X ordinates still increase as tiles are read from west to east, but the Y ordinates increase as tiles are read from south to north.
Usage Notes
None.
Example
The following example converts the tile coordinates into an SDO_GEOMETRY using the default Google tiling scheme.
SELECT SDO_UTIL.GET_TILE_ENVELOPE(131, 84, 8) FROM DUAL; SDO_UTIL.GET_TILE_ENVELOPE(131,84,8)(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES) ----------------------------------------------------------------------------------------------------------- SDO_GEOMETRY(2003, 3857, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 3), SDO_ORDINATE_ARRAY(465715.526, 6727436.88, 630085.712, 6891807.07))
The following example converts the tile coordinates into an SDO_GEOMETRY using the TMS tiling scheme.
SELECT SDO_UTIL.GET_TILE_ENVELOPE(131, 171, 8) FROM DUAL; SDO_UTIL.GET_TILE_ENVELOPE(131,171,8,FALSE)(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES) ------------------------------------------------------------------------------------------------------------------ SDO_GEOMETRY(2003, 3857, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 3), SDO_ORDINATE_ARRAY(465715.526, -6891807.1, 630085.712, -6727436.9))
Parent topic: SDO_UTIL Package (Utility)