9.4 SDO_GEOR_AGGR.getMosaicStatistics
Format
SDO_GEOR_AGGR.getMosaicStatistics( inGeoRasters IN SYS_REFCURSOR, skipFactor IN NUMBER DEFAULT 1, genHistogram IN VARCHAR2 DEFAULT 'FALSE', outStatistics OUT SDO_NUMBER_ARRAYSET, outHistograms OUT SDO_GEOR_HISTOGRAM_ARRAY);
or
SDO_GEOR_AGGR.getMosaicStatistics( georasterTableNames IN VARCHAR2, georasterColumnNames IN VARCHAR2, skipFactor IN NUMBER DEFAULT 1, genHistogram IN VARCHAR2 DEFAULT 'FALSE', outStatistics OUT SDO_NUMBER_ARRAYSET, outHistograms OUT SDO_GEOR_HISTOGRAM_ARRAY);
Description
Calculates and returns the estimated statistics of a virtual mosaic or a collection of GeoRaster objects.
Parameters
- inGeoRasters
-
Source GeoRaster objects in a cursor.
- georasterTableNames
-
Names (comma-separated) of the tables containing the source GeoRaster objects.
- georasterColumnNames
-
Names (comma-separated) of the columns of type SDO_GEORASTER in tables corresponding to the table names in
georasterTableNames. - skipFactor
-
Number indicating every nth image to be used during the calculation. For example, if
skipFactoris 3, then every third image in the source images is used in the statistics calculation. TheskipFactorparameter can be used to reduce the calculation time for a large image set. The default is 1 (that is, every image is used; no images are skipped). - genHistogram
-
String (
trueorfalse) whether to return the estimated histogram of the virtual mosaic. The default isfalse. - outStatistics
-
The returned statistics in the order of the bands of the source images. For each band, if
genHistogramisfalse, the statistics that are returned are min, max, mean, and std; but ifgenHistogramistrue, the statistics that are returned are min, max, mean, std, median, and mode.For example, if the source images have three bands and
-
if
genHistogramisfalse, theourStatisticsparameter has the value:sdo_number_arrayset(sdo_number_array(17.0, 255.0, 154.64, 71.29), sdo_number_array(14.0, 255.0, 155.86, 56.08), sdo_number_array(0.0, 255.0, 98.60, 73.08)) -
if
genHistogramistrue, theourStatisticsparameter has the value:sdo_number_arrayset(sdo_number_array(17.0, 255.0, 154.64, 71.29, 112.0, 255.0), sdo_number_array(14.0, 255.0, 155.86, 56.08, 143.0, 255.0), sdo_number_array(0.0, 255.0, 98.60, 73.08, 61.0, 0.0))
The SDO_NUMBER_ARRAYSET type is defined as
VARRAY(1048576) OF SDO_NUMBER_ARRAY. -
- outHistograms
-
If
genHistogramis the stringtrue,outHistogramswill contain the returned histograms as an array of type SDO_GEOR_HISTOGRAM_ARRAY Collection Type, with each item containing the histogram for each band.If
genHistogramis the stringfalse,outHistogramswill be null.
Usage Notes
To calculate the statistics of the source images, the statistics of the source images must be present in the GeoRaster object's metadata.
The source images must have the same number of bands and same celldepth.
The returned statistics for non-overlapping source images with celldepth less than or equal to 16bit are accurate calculations; otherwise, the returned statistics are close estimates.
Examples
The following example shows how to get the statistics when the virtual mosaic or the collection of GeoRaster objects is a cursor. The skipFactor is 1 and genHistogram parameter is false.
declare
cur sys_refcursor,
outStats sdo_number_arrayset := null;
outHists sdo_geor_histogram_array := null;
begin
open cur for select georaster from georaster_table_1 union all select georaster from georaster_table_2;
sdo_geor_aggr.getMosaicStatistics(cur, 1, 'false', outStats, outHists);
close cur;
end;
/
The following example shows how to get the statistics by specifying the table column names. The skipFactor is 5 and genHistogram parameter is true.
declare
outStats sdo_number_arrayset := null;
outHists sdo_geor_histogram_array := null;
begin
sdo_geor_aggr.getMosaicStatistics('georaster_table_1, georaster_table_2', 'georaster, georaster', 5, 'true', outStats, outHists);
end;
/
Parent topic: SDO_GEOR_AGGR Package Reference