DBA Data[Home] [Help]

PACKAGE: MDSYS.SDO_GEOR_RA

Source


1 PACKAGE       SDO_GEOR_RA AUTHID CURRENT_USER AS
2 
3 --
4 -- Math Operator constants
5 --
6    OPERATOR_ADD               CONSTANT PLS_INTEGER := 0;
7    OPERATOR_ADDCONST          CONSTANT PLS_INTEGER := 1;
8    OPERATOR_SUBTRACT          CONSTANT PLS_INTEGER := 2;
9    OPERATOR_SUBTRACTCONST     CONSTANT PLS_INTEGER := 3;
10    OPERATOR_MULTIPLY          CONSTANT PLS_INTEGER := 4;
11    OPERATOR_MULTIPLYCONST     CONSTANT PLS_INTEGER := 5;
12    OPERATOR_DIVIDE            CONSTANT PLS_INTEGER := 6;
13    OPERATOR_DIVIDECONST       CONSTANT PLS_INTEGER := 7;
14    OPERATOR_ABSOLUTE          CONSTANT PLS_INTEGER := 8;
15    OPERATOR_INVERT            CONSTANT PLS_INTEGER := 9;
16    OPERATOR_LOG               CONSTANT PLS_INTEGER := 10;
17    OPERATOR_EXP               CONSTANT PLS_INTEGER := 11;
18 
19 
20 
21 --
22 -- NAME:
23 --      findCells procedure
24 --
25 -- DESCRIPTION
26 --       generate a new georaster object based on the "condition" parameter.
27 --       The "condition" parameter is a boolean expression, for each pixel
28 --       in the inGeoRaster, the value of corresponding pixel of outGeoraster
29 --       is same, if "condition" is true, otherwise bgValues is used to set
30 --       the pixel's value of outGeoraster.
31 --
32 --
33 -- ARGUMENTS
34 --      inGeoRaster    - The SDO_GEORASTER object to be applied with condition
35 --      condition      - A boolean expression used to filter out pixels, the
36 --                       syntax details are explained in GeoRaster Manual
37 --      storageParam   - A string specifying storage parameters for the target
38 --                       georaster object. The details are explained in GeoRaster
39 --                       Manual
40 --      outGeoRaster   - The new GeoRaster Object
41 --      bgValues       - background values for filling pixels which make
42 --                       conditon return false, if it is null, then 0 will
43 --                       be used as background color.
44 --      nodata         - if 'true', then keep original value for all nodata pixel
45 --                       if 'false',then treat nodata as regular data.
46 --      parallelParam     - specify if executing operations in parallel if
47 --                       possible, but note if parameter parallelParam is 'true',
48 --                       then some execution units of this procedure will run
49 --                       as autonomous transactions, that means some changes
50 --                       are submitted and you can't rollback.
51 --                       You can fully rollback all of your changes if
52 --                       parameter parallelParam is 'false'.
53 --
54 -- RETURNS
55 --
56 PROCEDURE findCells
57 (
58    inGeoRaster  IN      MDSYS.SDO_GEORASTER,
59    condition    IN      VARCHAR2,
60    storageParam IN      VARCHAR2,
61    outGeoraster IN OUT  MDSYS.SDO_GEORASTER,
62    bgValues     IN      SDO_NUMBER_ARRAY DEFAULT NULL,
63    nodata       IN      VARCHAR2 DEFAULT 'false',
64    parallelParam IN     VARCHAR2 DEFAULT NULL
65 );
66 
67 
68 -- NAME:
69 --      classify procedure
70 --
71 -- DESCRIPTION
72 --      Generate a new GeoRaster object after applying classification operation on the source GeoRaster object.
73 --
74 -- ARGUMENTS
75 --      inGeoRasters   - GeoRaster cursor.
76 --      expression     - A math expression used to classify cell values, the
77 --                       syntax details are explained in GeoRaster Manual
78 --      rangeArray     - A number array, which defines ranges to classify cell
79 --                       values, it must have at least one element.
80 --      valueArray     - A number array, which defines target cell value for
81 --                       each range. it's length must be "length of rangeArray"+1
82 --      storageParam   - A string specifying storage parameters for the copy
83 --                       The details are explained in GeoRaster Manual
84 --      outGeoRaster   - The new GeoRaster Object
85 --      nodata         - if 'true', then assign nodataValue to all nodata pixels in the target georaster
86 --                       if 'false',then treat all nodata as regular data.
87 --      nodataValue    - nodata value in the target georaster object,if nodataValue is null then 0 is used for nodataValue
88 --      parallelParam     - specify if executing operations in parallel if
89 --                       possible, but note if parameter parallelParam is 'true',
90 --                       then some execution units of this procedure will run
91 --                       as autonomous transactions, that means some changes
92 --                       are submitted and can't be rollback.
93 --                       You can fully rollback all of your changes if
94 --                       parameter parallelParam is 'false'.
95 --
96 -- RETURNS
97 --
98 PROCEDURE classify
99 (
100    inGeoRasters IN      SYS_REFCURSOR,
101    expression   IN      VARCHAR2,
102    rangeArray   IN      SDO_NUMBER_ARRAY,
103    valueArray   IN      SDO_NUMBER_ARRAY,
104    storageParam IN      VARCHAR2,
105    outGeoraster IN OUT  MDSYS.SDO_GEORASTER,
106    nodata       IN      VARCHAR2 DEFAULT 'false',
107    nodataValue  IN      NUMBER default 0,
108    parallelParam   IN      VARCHAR2 DEFAULT NULL
109 );
110 
111 -- NAME:
112 --      classify procedure
113 --
114 -- DESCRIPTION
115 --      Generate a new GeoRaster object after applying classification operation on the source GeoRaster object.
116 --
117 -- ARGUMENTS
118 --      inGeoRaster    - GeoRaster object.
119 --      expression     - A math expression used to classify cell values, the
120 --                       syntax details are explained in GeoRaster Manual
121 --      rangeArray     - A number array, which defines ranges to classify cell
122 --                       values, it must have at least one element.
123 --      valueArray     - A number array, which defines target cell value for
124 --                       each range. it's length must be "length of rangeArray"+1
125 --      storageParam   - A string specifying storage parameters for the copy
126 --                       The details are explained in GeoRaster Manual
127 --      outGeoRaster   - The new GeoRaster Object
128 --      nodata         - if 'true', then assign nodataValue to all nodata pixels in the target georaster
129 --                       if 'false',then treat all nodata as regular data.
130 --      nodataValue    - nodata value in the target georaster object,if nodataValue is null then 0 is used for nodataValue
131 --      parallelParam     - specify if executing operations in parallel if
132 --                       possible, but note if parameter parallelParam is 'true',
133 --                       then some execution units of this procedure will run
134 --                       as autonomous transactions, that means some changes
135 --                       are submitted and can't be rollback.
136 --                       You can fully rollback all of your changes if
137 --                       parameter parallelParam is 'false'.
138 --
139 -- RETURNS
140 --
141 PROCEDURE classify
142 (
143    inGeoRaster  IN      MDSYS.SDO_GEORASTER,
144    expression   IN      VARCHAR2,
145    rangeArray   IN      SDO_NUMBER_ARRAY,
146    valueArray   IN      SDO_NUMBER_ARRAY,
147    storageParam IN      VARCHAR2,
148    outGeoraster IN OUT  MDSYS.SDO_GEORASTER,
149    nodata       IN      VARCHAR2 DEFAULT 'false',
150    nodataValue  IN      NUMBER default 0,
151    parallelParam   IN      VARCHAR2 DEFAULT NULL
152 );
153 
154 -- NAME:
155 --      classify procedure
156 --
157 -- DESCRIPTION
158 --      Generate a new GeoRaster object after applying classification operation on the source GeoRaster objects.
159 --
160 -- ARGUMENTS
161 --      georArray      - An array of GeoRaster objects.
162 --      expression     - A math expression used to classify cell values, the
163 --                       syntax details are explained in GeoRaster Manual
164 --      rangeArray     - A number array, which defines ranges to classify cell
165 --                       values, it must have at least one element.
166 --      valueArray     - A number array, which defines target cell value for
167 --                       each range. it's length must be "length of rangeArray"+1
168 --      storageParam   - A string specifying storage parameters for the copy
169 --                       The details are explained in GeoRaster Manual
170 --      outGeoRaster   - The new GeoRaster Object
171 --      nodata         - if 'true', then assign nodataValue to all nodata pixels in the target georaster
172 --                       if 'false',then treat all nodata as regular data.
173 --      nodataValue    - nodata value in the target georaster object,if nodataValue is null then 0 is used for nodataValue
174 --      parallelParam     - specify if executing operations in parallel if
175 --                       possible, but note if parameter parallelParam is 'true',
176 --                       then some execution units of this procedure will run
177 --                       as autonomous transactions, that means some changes
178 --                       are submitted and can't be rollback.
179 --                       You can fully rollback all of your changes if
180 --                       parameter parallelParam is 'false'.
181 --
182 -- RETURNS
183 --
184 PROCEDURE classify
185 (
186    georArray    IN      SDO_GEORASTER_ARRAY,
187    expression   IN      VARCHAR2,
188    rangeArray   IN      SDO_NUMBER_ARRAY,
189    valueArray   IN      SDO_NUMBER_ARRAY,
190    storageParam IN      VARCHAR2,
191    outGeoraster IN OUT  MDSYS.SDO_GEORASTER,
192    nodata       IN      VARCHAR2 DEFAULT 'false',
193    nodataValue  IN      NUMBER default 0,
194    parallelParam IN      VARCHAR2 DEFAULT NULL
195 );
196 
197 --
198 -- NAME:
199 --      rasterMathOp procedure
200 --
201 -- DESCRIPTION
202 --      generate a new georaster object from input georaster objects
203 --      and math operations, the target georaster object is stored
204 --      based on the parameter storageParam.
205 --
206 -- ARGUMENTS
207 --      inGeoRaster     - The source SDO_GEORASTER object
208 --      operation       - An array of varying length Oracle STRING,each STRING
209 --                        is a valid expression, which is mapping to a target
210 --                        band in the target georaster object, and specifies
211 --                        how to calculate cell value based on source georaster
212 --                        objects.
213 --      storageParam    - A string specifying storage parameters for the copy
214 --                        The details are explained in GeoRaster Manual
215 --      outGeoRaster    - The new GeoRaster Object
216 --      nodata         - if 'true', then assign nodataValue to all nodata pixels in the target georaster
217 --                       if 'false',then treat all nodata as regular data.
218 --      nodataValue    - nodata value in the target georaster object,if nodataValue is null then 0 is used for nodataValue
219 --      parallelParam     - specify if executing operations in parallel if
220 --                       possible, but note if parameter parallelParam is 'true',
221 --                       then some execution units of this procedure will run
222 --                       as autonomous transactions, that means some changes
223 --                       are submitted and can't be rollback.
224 --                       You can fully rollback all of your changes if
225 --                       parameter parallelParam is 'false'.
226 --
227 --
228 PROCEDURE rasterMathOp
229 (
230    inGeoRaster   IN      MDSYS.SDO_GEORASTER,
231    operation     IN      SDO_STRING2_ARRAY,
232    storageParam  IN      VARCHAR2,
233    outGeoraster  IN OUT  MDSYS.SDO_GEORASTER,
234    nodata        IN      VARCHAR2 DEFAULT 'false',
235    nodataValue   IN      NUMBER default 0,
236    parallelParam IN      VARCHAR2 DEFAULT NULL
237 );
238 
239 --
240 -- NAME:
241 --      rasterMathOp procedure
242 --
243 -- DESCRIPTION
244 --      generate a new georaster object from input georaster objects
245 --      and math operations, the target georaster object is stored
246 --      based on the parameter storageParam.
247 --
248 -- ARGUMENTS
249 --      inGeoRasters    - GeoRaster cursor.
250 --      operation       - An array of varying length Oracle STRING,each STRING
254 --                        objects.
251 --                        is a valid expression, which is mapping to a target
252 --                        band in the target georaster object, and specifies
253 --                        how to calculate cell value based on source georaster
255 --      storageParam    - A string specifying storage parameters for the copy
256 --                        The details are explained in GeoRaster Manual
257 --      outGeoRaster    - The new GeoRaster Object
258 --      nodata         - if 'true', then assign nodataValue to all nodata pixels in the target georaster
259 --                       if 'false',then treat all nodata as regular data.
260 --      nodataValue    - nodata value in the target georaster object,if nodataValue is null then 0 is used for nodataValue
261 --      parallelParam     - specify if executing operations in parallel if
262 --                       possible, but note if parameter parallelParam is 'true',
263 --                       then some execution units of this procedure will run
264 --                       as autonomous transactions, that means some changes
265 --                       are submitted and can't be rollback.
266 --                       You can fully rollback all of your changes if
267 --                       parameter parallelParam is 'false'.
268 --
269 --
270 PROCEDURE rasterMathOp
271 (
272    inGeoRasters  IN      SYS_REFCURSOR,
273    operation     IN      SDO_STRING2_ARRAY,
274    storageParam  IN      VARCHAR2,
275    outGeoraster  IN OUT  MDSYS.SDO_GEORASTER,
276    nodata        IN      VARCHAR2 DEFAULT 'false',
277    nodataValue   IN      NUMBER default 0,
278    parallelParam IN      VARCHAR2 DEFAULT NULL
279 );
280 
281 --
282 -- NAME:
283 --      rasterMathOp procedure
284 --
285 -- DESCRIPTION
286 --      generate a new georaster object from input georaster objects
287 --      and math operations, the target georaster object is stored
288 --      based on the parameter storageParam.
289 --
290 -- ARGUMENTS
291 --      georArray       - An array of GeoRaster objects.
292 --      operation       - An array of varying length Oracle STRING,each STRING
293 --                        is a valid expression, which is mapping to a target
294 --                        band in the target georaster object, and specifies
295 --                        how to calculate cell value based on source georaster
296 --                        objects.
297 --      storageParam    - A string specifying storage parameters for the copy
298 --                        The details are explained in GeoRaster Manual
299 --      outGeoRaster    - The new GeoRaster Object
300 --      nodata         - if 'true', then assign nodataValue to all nodata pixels in the target georaster
301 --                       if 'false',then treat all nodata as regular data.
302 --      nodataValue    - nodata value in the target georaster object,if nodataValue is null then 0 is used for nodataValue
303 --      parallelParam     - specify if executing operations in parallel if
304 --                       possible, but note if parameter parallelParam is 'true',
305 --                       then some execution units of this procedure will run
306 --                       as autonomous transactions, that means some changes
307 --                       are submitted and can't be rollback.
308 --                       You can fully rollback all of your changes if
309 --                       parameter parallelParam is 'false'.
310 --
311 --
312 PROCEDURE rasterMathOp
313 (
314    georArray     IN      SDO_GEORASTER_ARRAY,
315    operation     IN      SDO_STRING2_ARRAY,
316    storageParam  IN      VARCHAR2,
317    outGeoraster  IN OUT  MDSYS.SDO_GEORASTER,
318    nodata        IN      VARCHAR2 DEFAULT 'false',
319    nodataValue   IN      NUMBER default 0,
320    parallelParam IN      VARCHAR2 DEFAULT NULL
321 );
322 
323 
324 
325 
326 --
327 -- NAME:
328 --      rasterMathOp procedure
329 --
330 -- DESCRIPTION
331 --      apply mathematical operation on two or one georatser objects
332 --
333 -- ARGUMENTS
334 --      geoRaster0     - The left operand
335 --      geoRaster1     - The right operand
336 --      constant       - constant value for some operators like addConst,divideConst.
337 --      operator       - operator which should be one of math operators defined in the package
338 --      storageParam   - A string specifying storage parameters for the target georaster object
339 --                       The details are explained in GeoRaster Manual
340 --      outGeoRaster   - The new GeoRaster Object
341 --      bgValues       - background values for sparse data
342 --      nodata         - if 'true', then assign nodataValue to all nodata pixels in the target georaster
343 --                       if 'false',then treat all nodata as regular data.
344 --      nodataValue    - nodata value in the target georaster object,if nodataValue is null then 0 is used for nodataValue
345 --      parallelParam     - specify if executing operations in parallel if
346 --                       possible, but note if parameter parallelParam is 'true',
347 --                       then some execution units of this procedure will run
348 --                       as autonomous transactions, that means some changes
349 --                       are submitted and you can't rollback.
350 --                       You can fully rollback all of your changes if
351 --                       parameter parallelParam is 'false'.
352 --
353 -- RETURNS
354 --
355 
356 PROCEDURE rasterMathOp
357 (
358    georaster0   IN      MDSYS.SDO_GEORASTER,
359    georaster1   IN      MDSYS.SDO_GEORASTER,
360    constant     IN      NUMBER,
361    operator     IN      PLS_INTEGER,
362    storageParam IN      VARCHAR2,
363    outGeoraster IN OUT  MDSYS.SDO_GEORASTER,
364    bgValues     IN      SDO_NUMBER_ARRAY DEFAULT NULL,
365    nodata       IN      VARCHAR2 DEFAULT 'false',
366    nodataValue  IN      NUMBER default 0,
367    parallelParam IN      VARCHAR2 DEFAULT NULL
368 );
369 
370 
371 
372 --
373 -- NAME:
374 --      rasterUpdate procedure
375 --
376 -- DESCRIPTION
377 --       Based on conditions and expressions to update raster cellValue.
378 --       The "condition" parameter is a array of boolean expressions,
379 --       the "values" parameter is a array of arrays of math expressions,
380 --       for each pixel, if a "condition" is true, then it's value
381 --       will get updated based on calculation of corresponding array of
382 --       math expression.
383 --
384 --
385 -- ARGUMENTS
386 --      geoRaster      - The SDO_GEORASTER object to be updated based on conditions
387 --      pyramidLevel   - specifiy which pyramid level gets updated, if null, then all
388 --                       pyramid levels get updated
389 --      condition      - A array of boolean expressions to pick pixels, the
390 --                       syntax details are explained in GeoRaster Manual
391 --      values         - A array of arrays of math expressions,the outer array is
392 --                       corresponding to each conditions, and inner array is
393 --                       corresponding to each band
394 --      bgValues       - background values
395 --      nodata         - if 'true', then keep original value for all nodata
396 --                       if 'false',then treat nodata as regular data.
397 --      parallelParam     - specify if executing operations in parallel if
398 --                       possible, but note if parameter parallelParam is 'true',
399 --                       then some execution units of this procedure will run
400 --                       as autonomous transactions, that means some changes
401 --                       are submitted and you can't rollback.
402 --                       You can fully rollback all of your changes if
403 --                       parameter parallelParam is 'false'.
404 --
405 -- RETURNS
406 --
407 PROCEDURE rasterUpdate
408 (
409    geoRaster    IN out  MDSYS.SDO_GEORASTER,
410    pyramidLevel IN      NUMBER,
411    conditions   IN      SDO_STRING2_ARRAY,
412    vals         IN      SDO_STRING2_ARRAYSET,
413    bgValues     IN      SDO_NUMBER_ARRAY DEFAULT NULL,
414    nodata       IN      VARCHAR2 DEFAULT 'false',
415    parallelParam IN     VARCHAR2 DEFAULT NULL
416 );
417 
418 
419 --
420 -- NAME:
421 --      isOverlap
422 --
423 -- DESCRIPTION
424 --       This helper function will check if two georaster objects have .
425 --       same row/column dimension sizes, and if they are overlapped in
426 --       the model space if they are georeferenced
427 --
428 --
429 -- ARGUMENTS
430 --      geoRaster1      - The SDO_GEORASTER 1
431 --      geoRaster2      - The SDO_GEORASTER 2
432 --      tolerance       - Specifies the tolerance used to decide if two pixels in cell space are
433 --                        overlapped in the model spce. The value should be between 0
434 --                        and 1 and is in pixel unit. for example, 0.5 means half pixel.
435 --
436 -- RETURNS
437 --   'TRUE' if overlapped, otherwise 'FALSE'
438 
439 FUNCTION isOverlap
440 (
441   georaster1 IN MDSYS.SDO_GEORASTER,
442   georaster2 IN MDSYS.SDO_GEORASTER,
443   tolerance  IN NUMBER default 0.5
444 )
445 RETURN VARCHAR2  DETERMINISTIC PARALLEL_ENABLE;
446 
447 --
448 -- NAME:
449 --      isOverlap
450 --
451 -- DESCRIPTION
452 --       This helper function will check if an array of georaster objects have .
453 --       same row/column dimension sizes, and if they are overlapped in
454 --       the model space if they are georeferenced
455 --
456 --
457 -- ARGUMENTS
458 --      geor_array      - The SDO_GEORASTER array
459 --      tolerance       - Specifies the tolerance used to decide if two pixels in cell space are
460 --                        overlapped in the model spce. The value should be between 0
461 --                        and 1 and is in pixel unit. for example, 0.5 means half pixel.
462 --
463 -- RETURNS
464 --   'TRUE' if overlapped, otherwise 'FALSE'
465 
466 FUNCTION isOverlap
467 (
468   georArray  IN SDO_GEORASTER_ARRAY,
469   tolerance  IN NUMBER default 0.5
470 )
471 RETURN VARCHAR2  DETERMINISTIC PARALLEL_ENABLE;
472 
473 --
474 -- NAME:
475 --      isOverlap
476 --
477 -- DESCRIPTION
478 --       This helper function will check if a cursor of georaster objects have .
479 --       same row/column dimension sizes, and if they are overlapped in
480 --       the model space if they are georeferenced
481 --
482 --
483 -- ARGUMENTS
484 --      geor_cur        - The SDO_GEORASTER cursor
485 --      tolerance       - Specifies the tolerance used to decide if two pixels in cell space are
486 --                        overlapped in the model spce. The value should be between 0
487 --                        and 1 and is in pixel unit. for example, 0.5 means half pixel.
488 --
489 -- RETURNS
490 --   'TRUE' if overlapped, otherwise 'FALSE'
491 
492 FUNCTION isOverlap
493 (
494   geor_cur   IN SYS_REFCURSOR,
495   tolerance  IN NUMBER default 0.5
496 )
497 RETURN VARCHAR2  DETERMINISTIC PARALLEL_ENABLE;
498 
499 
500 END SDO_GEOR_RA;