Format
SDO_SAM.TILED_BINS( l1 IN NUMBER, u1 IN NUMBER, l2 IN NUMBER, u2 IN NUMBER, tiling_level IN NUMBER DEFAULT NULL, srid IN NUMBER DEFAULT NULL, xdivs IN NUMBER DEFAULT NULL, ydivs IN NUMBER DEFAULT NULL ) RETURN SDO_REGIONSET;
Description
Tiles a two-dimensional space and returns geometries corresponding to those tiles.
Parameters
Lower bound of the extent in the first dimension.
Upper bound of the extent in the first dimension.
Lower bound of the extent in the second dimension.
Upper bound of the extent in the second dimension.
Level to be used to tile the specified extent. If you specify this parameter, the extent of each dimension is divided into 2^tiling_level
parts, resulting in at most 4*tiling_level
tiles. (Specify either this parameter or the combination of the xdivs
and ydivs
parameters.)
SRID value to be included for the coordinate system in the returned tile geometries.
The number of times that the extent in the first dimension is divided, such that the total number of parts is xdivs
+ 1. For example, if you specify 10 for xdivs
, the extent of the first dimension is divided into 11 parts.
The number of times that the extent in the second dimension is divided, such that the total number of parts is ydivs
+ 1. For example, if you specify 10 for ydivs
, the extent of the second dimension is divided into 11 parts.
Usage Notes
You must specify either the tiling_level
parameter or both the xdivs
and ydivs
parameters. If you specify all three of these parameters, the tiling_level
parameter is ignored and the xdivs
and ydivs
parameters are used.
If you specify the xdivs
and ydivs
parameters, the total number of grids (tiles) returned is (xdivs+1)*(ydivs+1)
.
This function returns an object of type SDO_REGIONSET. The SDO_REGIONSET object type is defined as:
TABLE OF SDO_REGION
The SDO_REGION object type is defined as:
Name Null? Type ----------------------------------------- -------- ---------------------------- ID NUMBER GEOMETRY MDSYS.SDO_GEOMETRY
Examples
The following example tiles the entire Earth's surface at the first tiling level, using the standard longitude and latitude coordinate system (SRID 8307). The resulting SDO_REGIONSET object contains four SDO_REGION objects, one for each tile.
SELECT * FROM TABLE(sdo_sam.tiled_bins(-180, 180, -90, 90, 1, 8307)) ORDER BY id; ID ---------- GEOMETRY(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES) -------------------------------------------------------------------------------- 0 SDO_GEOMETRY(2003, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 3), SDO_ORDINATE_ARR AY(-180, -90, 0, 0)) 1 SDO_GEOMETRY(2003, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 3), SDO_ORDINATE_ARR AY(-180, 0, 0, 90)) 2 SDO_GEOMETRY(2003, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 3), SDO_ORDINATE_ARR AY(0, -90, 180, 0)) 3 SDO_GEOMETRY(2003, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 3), SDO_ORDINATE_ARR AY(0, 0, 180, 90)) 4 rows selected.