7.9 SDO_GEOR.copy
Format
SDO_GEOR.copy( inGeoRaster IN SDO_GEORASTER, outGeoRaster IN OUT SDO_GEORASTER);
Description
Makes a copy of an existing GeoRaster object.
Parameters
- inGeoRaster
-
GeoRaster object to be copied.
- outGeoRaster
-
GeoRaster object to hold the result of the copy 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
inGeoRaster.
Usage Notes
The outGeoRaster object is an exact copy of the inGeoRaster object. To make any changes to the output GeoRaster object during a copy operation, use the SDO_GEOR.changeFormatCopy procedure.
If inGeoRaster is null, this procedure performs no operation.
If outGeoRaster has any raster data, it is deleted before the copy operation.
inGeoRaster and outGeoRaster must be different GeoRaster objects.
If pyramid data exists for inGeoRaster, the pyramid data is copied to outGeoRaster.
An exception is raised if one or more of the following are true:
-
inGeoRasteris invalid. -
outGeoRasterhas not been initialized. -
A raster data table for
outGeoRasterdoes not exist andoutGeoRasteris not a blank GeoRaster object.
Examples
The following example inserts an initialized GeoRaster object (gr2) into the GEORASTER column of table GEORASTER_TABLE, makes gr2 an exact copy of another GeoRaster object (gr1), and updates the row that had been inserted using gr2 for the GEORASTER column value. (It refers to a table named GEORASTER_TABLE, whose definition is presented after Example 1-1 in Storage Parameters.)
DECLARE
gr1 sdo_georaster;
gr2 sdo_georaster;
BEGIN
INSERT INTO georaster_table VALUES (11, sdo_geor.init('RDT_11', 1))
RETURNING georaster INTO gr2;
SELECT georaster INTO gr1 from georaster_table WHERE georid=1;
sdo_geor.copy(gr1, gr2);
UPDATE georaster_table SET georaster=gr2 WHERE georid=11;
COMMIT;
END;
/Parent topic: SDO_GEOR Package Reference