DBA Data[Home] [Help]

PACKAGE: MDSYS.SDO_ADMIN

Source


1 package SDO_ADMIN authid current_user as
2 
3 
4 -- NAME:
5 --    sdo_version - Return version number as a string
6 --
7 function sdo_version return varchar2;
8 pragma restrict_references(sdo_version,rnds,wnds,rnps,wnps);
9 
10 function sdo_code_size ( layer varchar2 ) return binary_integer;
11 pragma restrict_references(sdo_code_size,wnds,rnps,wnps);
12 
13 --
14 --  NAME:
15 --     populate_index - tesselate all geometric objects in a geometry table
16 --  DESCRIPTION:
17 --     This procedure creates a maximum number of tiles to cover every geometric
18 --     object in the geometry table (LAYER_sdogeom).  If the synch_flag is
19 --     TRUE only the geometric objects which do not already have corresponding
20 --     entries in the spatial index table (LAYER_sdoindex) are processed.
21 --  NOTES:
22 --     The behaviour of the POPULATE_INDEX( layer IN VARCHAR2 ) function is
23 --     determined by the values for the SDO_LEVEL and SDO_NUMTILES columns
24 --     in the <layer>_SDOLAYER table.  The behaviour is described in the
25 --     following table:
26 --
27 --     VALUE OF SDO_LEVEL   VALUE OF SDO_NUMTILES   BEHAVIOUR
28 --     ------------------   ---------------------   ------------------------
29 --           NULL                 NULL              Error (use 7.3.3)
30 --           NULL               NOT NULL            Variable Tessellation
31 --         NOT NULL               NULL              Fixed Tessellation
32 --         NOT NULL             NOT NULL            Hybrid Tessellation
33 --  ARGUMENTS:
34 --     layer         - geometry table name (LAYER_sdogeom) and spatial
35 --                     index table name (LAYER_sdoindex) input argument
36 --     gid           - Geometry IDentifier input argument
37 --     maxtiles      -  MAXimum number of TILES to generate input argument
38 --     synch_flag    - tesselate only geometric objects having no corresponding
39 --                     entries in the spatial index table if TRUE
40 --                     (default value is TRUE)
41 --     sdo_tile_flag - INTERNAL PARAMETER; DO NOT MODIFY
42 --
43 procedure populate_index ( layer IN VARCHAR2 );
44 
45 procedure populate_index (layer IN VARCHAR2, maxtiles IN INTEGER,
46                           synch_flag IN BOOLEAN := TRUE,
47                           sdo_tile_flag IN BOOLEAN := FALSE );
48 
49 procedure populate_index_fixed (layer IN VARCHAR2, tile_size IN INTEGER,
50                                 synch_flag IN BOOLEAN := TRUE,
51                                 sdo_tile_flag IN BOOLEAN := FALSE,
52                                 sdo_maxcode_flag IN BOOLEAN := TRUE );
53 
54 --
55 --  NAME:
56 --     update_index - tesselate a single geometric object
57 --  DESCRIPTION:
58 --     This procedure creates a maximum number of tiles to cover a geometric
59 --     object in the geometry table (LAYER_sdogeom).  If the replace_flag is
60 --     TRUE then any existing tiles for the specified object are first
61 --     removed from the index table (LAYER_sdoindex).
62 --  NOTES:
63 --     The behaviour of the POPULATE_INDEX( layer IN VARCHAR2 ) function is
64 --     determined by the values for the SDO_LEVEL and SDO_NUMTILES columns
65 --     in the <layer>_SDOLAYER table.  The behaviour is described in the
66 --     following table:
67 --
68 --     VALUE OF SDO_LEVEL   VALUE OF SDO_NUMTILES   BEHAVIOUR
69 --     ------------------   ---------------------   ------------------------
70 --           NULL                 NULL              Error (use 7.3.3)
71 --           NULL               NOT NULL            Variable Tessellation
72 --         NOT NULL               NULL              Fixed Tessellation
73 --         NOT NULL             NOT NULL            Hybrid Tessellation
74 --  ARGUMENTS:
75 --     layer        - geometry table name (LAYER_sdogeom) and
76 --                    index table name (LAYER_sdoindex) input argument
77 --     gid          - Geometry IDentifier input argument
78 --     maxtiles     - MAXimum number of TILES to generate input argument
79 --     replace_flag - REPLACE existing tiles in LAYER_sdoindex if TRUE
80 --                    (default value is TRUE)
81 --     sdo_tile_flag - INTERNAL PARAMETER; DO NOT MODIFY
82 --
83 procedure update_index (layer varchar2, gid number);
84 
85 procedure update_index (layer IN VARCHAR2, gid IN NUMBER, maxtiles IN INTEGER,
86                         replace_flag IN BOOLEAN := TRUE,
87                         sdo_tile_flag IN BOOLEAN := FALSE);
88 
89 procedure update_index_fixed (layer IN VARCHAR2, gid IN NUMBER,
90                               tile_size IN INTEGER,
91                               replace_flag IN BOOLEAN := TRUE,
92                               sdo_tile_flag IN BOOLEAN := FALSE,
93                               sdo_maxcode_flag IN BOOLEAN := TRUE );
94 
95 --
96 --  NAME:
97 --     change_index_parameters - modify parameters in <layer>_SDOLAYER table
98 --  DESCRIPTION:
99 --     This function allows the user to modify the values of the SDO_LEVEL and
100 --     SDO_NUMTILES columns AND also takes the appropriate action to synchron-
101 --     ize the index according to the following rules:
102 --
103 --     VALUE OF LEVEL   VALUE OF MXTILES   BEHAVIOUR
104 --     --------------   ----------------   ---------------------------------
105 --          NULL             NULL          Do nothing.
106 --
107 --          NULL           NOT NULL        Call POPULATE_INDEX().  _SDOINDEX
108 --                                         table must be empty.
109 --        NOT NULL           NULL          Use UPDATE statement to update
110 --                                         SDO_GROUPCODE column.
111 --        NOT NULL         NOT NULL        Call POPULATE_INDEX(). _SDOINDEX
112 --                                         table must be empty.
113 --  ARGUMENTS:
114 --     layer        - name of LAYER to modify
115 --     sdo_level    - new value for SDO_LEVEL column
116 --     sdo_numtiles - new value for SDO_NUMTILES column
117 --
118 procedure change_index_parameters( layer varchar2,
119                                    sdo_level number,
120                                    sdo_numtiles number );
121 
122   --------------------------------------------------------------------------------
123   --
124   -- Description:
125   --
126   --   This routine is ONLY for creating fixed tiles for point data.
127   --   All rows with SDO_CODE is NULL will be tiled.
128   --   This routine will perform a database commit.
129   --
130   --   The <layer>_sdolayer table must be populated before this routine is called.
131   --   The <layer>_sdodim table must be populated before this routine is called.
132   --   The <layer>_sdogeom table must be populated before this routine is called.
133   --   The <layer>_sdogeom table must contain the SDO_CODE column.
134   --   The <layer>_sdogeom table can optionally contain the SDO_TILE column.
135   --
136   -- Parameters:
137   --                layer         - The layer to tile
138   --                sdo_tile_flag - If TRUE, will generate the sdo_tile column.
139   --                                Default is FALSE.
140   --                commit_cnt     - Routine updates in increments of commit_cnt,
141   --                                 and commits each increment.
142   --
143   --------------------------------------------------------------------------------
144   PROCEDURE populate_index_fixed_points (layer         varchar2,
145                                          sdo_tile_flag boolean := FALSE,
146                                          commit_cnt    number := 50);
147 
148   --------------------------------------------------------------------------------
149   --
150   -- Description:
151   --
152   --   This routine is ONLY for creating fixed tiles for point data.
153   --   Set SDO_CODE column to NULL for all rows in layer.
154   --   This routine will performe a database commit.
155   --
156   --   The <layer>_sdogeom table must contain the SDO_CODE column.
157   --
158   -- Parameters:
159   --                layer - The layer to tile
160   --                commit_cnt - Routine updates in increments of commit_cnt,
161   --                             and commits each increment.
162   --
163   --------------------------------------------------------------------------------
164   PROCEDURE set_code_null (layer         varchar2,
165                            commit_cnt    number := 50);
166 
167 
168 
169 end SDO_ADMIN;