7.109 SDO_GEOR.mergeLayers

Format

SDO_GEOR.mergeLayers(
     targetGeoRaster    IN OUT SDO_GEORASTER, 
     sourceGeoRaster    IN SDO_GEORASTER, 
     sourceLayerNumbers IN VARCHAR2 DEFAULT NULL, 
     bgValues           IN SDO_NUMBER_ARRAY DEFAULT NULL);

or

SDO_GEOR.mergeLayers(
     source1GeoRaster    IN SDO_GEORASTER, 
     source1LayerNumbers IN VARCHAR2, 
     source2GeoRaster    IN SDO_GEORASTER, 
     source2LayerNumbers IN VARCHAR2, 
     storageParam        IN VARCHAR2, 
     outGeoRaster        IN OUT SDO_GEORASTER, 
     bgValues            IN SDO_NUMBER_ARRAY DEFAULT NULL, 
     pyramidLevel        IN NUMBER DEFAULT NULL);

Description

Merges the layers of two GeoRaster objects, either by appending source layers to a target GeoRaster object (first format) or by performing a union operation (second format).

Parameters

targetGeoRaster

GeoRaster object to which layers in sourceGeoRaster are to be appended. Cannot be the same GeoRaster object as sourceGeoRaster. (Be sure to make a copy of this object before calling this procedure.)

sourceGeoRaster

GeoRaster object in which specified layers are to be appended to targetGeoRaster.

sourceLayerNumbers

String specifying one or more layer numbers of layers in sourceGeoRaster to be appended to targetGeoRaster. Use commas to delimit numbers or ranges, and use a hyphen to indicate a range. Example: '1,3-5,7' for layers 1, 3, 4, 5, and 7.

source1GeoRaster

One GeoRaster object in which specified layers are to be joined in a union operation with layers from source2GeoRaster in the output GeoRaster object outGeoRaster.

source1LayerNumbers

String specifying one or more layer numbers of layers in source1GeoRaster to be joined in a union operation with layers from source2GeoRaster in the output GeoRaster object outGeoRaster. Use commas to delimit numbers or ranges, and use a hyphen to indicate a range. Example: '1,3-5,7' for layers 1, 3, 4, 5, and 7.

source2GeoRaster

One GeoRaster object in which specified layers are to be joined in a union operation with layers from source1GeoRaster in the output GeoRaster object outGeoRaster.

source2LayerNumbers

String specifying one or more layer numbers of layers in source2GeoRaster to be joined in a union operation with layers from source1GeoRaster in the output GeoRaster object outGeoRaster. Use commas to delimit numbers or ranges, and use a hyphen to indicate a range. Example: '1,3-5,7' for layers 1, 3, 4, 5, and 7.

storageParam

A string specifying storage parameters to be applied in creating outGeoRaster. Storage parameters are explained in Storage Parameters.

outGeoRaster

The new SDO_GEORASTER object that reflects the results of the union operation. Must be either a valid existing GeoRaster object or an empty GeoRaster object. (Empty GeoRaster objects are explained in Blank and Empty GeoRaster Objects.) Cannot be the same GeoRaster object as source1GeoRaster or source2GeoRaster.

bgValues

Background values for filling partially empty raster blocks. It is only useful when the source GeoRaster object has empty raster blocks and the current operation leads to partially empty raster blocks (see Empty Raster Blocks). The number of elements in the SDO_NUMBER_ARRAY object must be either one (same filling value used for all bands) or the band dimension size (a different filling value for each band, respectively). For example, SDO_NUMBER_ARRAY(1,5,10) fills the first band with 1, the second band with 5, and the third band with 10. The default bgValues are zero (0).

The filling values must be valid cell values as specified by the target cell depth background values for filling sparse data.

pyramidLevel

A number specifying the pyramid level at which the source GeoRaster objects are merged. If not specified, pyramid level 0 is used.

Usage Notes

Note:

Be sure to make a copy of the targetGeoRaster object before you call this procedure, because the changes made to this GeoRaster object might not be reversible after the procedure completes.

The resulting GeoRaster object (georaster or outGeoRaster parameter) must not be the same GeoRaster object as sourceGeoRaster, source1GeoRaster, or source2GeoRaster.

The two GeoRaster objects to be appended or unioned together must have the same spatial dimension sizes and cover the same area. If one of the GeoRaster objects is georeferenced, the other one must also be georeferenced, have the same model SRID and spatial resolutions, and cover the same area in the model space. If neither GeoRaster object is georeferenced, their ultCoordinates must be the same.

The two GeoRaster objects to be appended or unioned together need not have the same cell depth. By default, the cell depth of the first source GeoRaster object will be used for the resulting GeoRaster object. To avoid data loss, or change the output cell depth, you can specify a different cellDepth in the storageParam for the resulting GeoRaster object.

Examples

The following example merges specified layers of two GeoRaster objects into a third GeoRaster object, by performing a union operation.

declare
 gr1 sdo_georaster;
 gr2 sdo_georaster;
 gr3 sdo_georaster;
begin
 select georaster into gr1 from georaster_table where georid=1;
 select georaster into gr2 from georaster_table where georid=2;
 insert into georaster_table(georid, georaster) values (3, sdo_geor.init('RDT_1'))
    returning georaster into gr3;
 sdo_geor.mergeLayers(gr1, '3', gr2, '2,1', 'blocking=false', gr3);
 update georaster_table set georaster=gr3 where georid=3;
 commit;
end;
/

For an example of using SDO_GEOR.mergLayers to append several layers to an existing GeoRaster object, see the example in Band Merging.