Les03 - Spatial Tunning
Les03 - Spatial Tunning
Les03 - Spatial Tunning
Spatial Tuning
• SDO_TUNE.ESTIMATE_TILING_LEVEL
– Gives a starting point to help determine an
appropriate tiling level (SDO_LEVEL) for
creating fixed-size index tiles.
• SDO_TUNE.AVERAGE_MBR
– Calculates the average minimum bounding
rectangle for geometries in a layer.
• SDO_TUNE.EXTENT_OF
– Determines the minimum bounding rectangle
of the data in a layer.
level := MDSYS.SDO_TUNE.ESTIMATE_TILING_LEVEL
( <table-name>, <column-name>,
<number-tiles>,
<type-of-estimate> )
• <table-name> and <column-name> identify
the spatial layer.
• <number-tiles> is the number of tiles
desired
• <type-of-estimate> defines the type of
estimation to perform
Copyright Intergraph Hong Kong Limited, ®
select mdsys.sdo_tune.estimate_tiling_level (
'STATES', 'GEOM', 10000, 'LAYER_EXTENT')
from dual;
select mdsys.sdo_tune.estimate_tiling_level (
'STATES', 'GEOM', 10000, 'ALL_GID_EXTENT')
from dual;
select mdsys.sdo_tune.estimate_tiling_level (
'STATES', 'GEOM', 4, 'AVG_GID_EXTENT')
from dual;
B B B
B I I B B
B I I I I B
B I I I I B
B I I I I B
B I I I B
B I B B B
B B B
DEMO
MDSYS.SDO_TUNE.AVERAGE_MBR
( <table-name>, <column-name>,
<width>, <height> )
<geometry> := MDSYS.SDO_TUNE.EXTENT_OF
( <table-name>, <column-name> )
SELECT
mdsys.sdo_tune.extent_of('STATES','GEOM')
FROM dual;
• SDO_GEOM.VALIDATE_GEOMETRY
– Determines if a geometry is valid.
• SDO_GEOM.VALIDATE_LAYER
– Determines if all the geometries stored in a
column are valid.
MDSYS.SDO_GEOM.VALIDATE_LAYER
( <table-name>, <column-name>
<key-column>, <result-table>)