7.159 SDO_GEOR.warp
Format
SDO_GEOR.warp( inGeoRaster IN SDO_GEORASTER, pyramidLevel IN NUMBER DEFAULT 0, outSRS IN NUMBER, cropArea IN SDO_GEOMETRY DEFAULT NULL, dimensionSize IN SDO_NUMBER_ARRAY DEFAULT NULL, layerNumbers IN VARCHAR2 DEFAULT NULL, elevationParam IN VARCHAR2 DEFAULT NULL, resampleParam IN VARCHAR2 DEFAULT NULL, storageParam IN VARCHAR2 DEFAULT NULL, outGeoRaster IN OUT SDO_GEORASTER, bgValues IN SDO_NUMBER_ARRAY DEFAULT NULL, parallelParam IN VARCHAR2 DEFAULT NULL);
or
SDO_GEOR.warp( inGeoRaster IN SDO_GEORASTER, pyramidLevel IN NUMBER DEFAULT 0, outSRS IN NUMBER, cropArea IN SDO_GEOMETRY DEFAULT NULL, dimensionSize IN SDO_NUMBER_ARRAY DEFAULT NULL, layerNumbers IN VARCHAR2 DEFAULT NULL, elevationParam IN VARCHAR2 DEFAULT NULL, resampleParam IN VARCHAR2 DEFAULT NULL, storageParam IN VARCHAR2 DEFAULT NULL, rasterBlob IN OUT NOCOPY BLOB, outArea OUT SDO_GEOMETRY, outWindow OUT SDO_NUMBER_ARRAY, bgValues IN SDO_NUMBER_ARRAY DEFAULT NULL, parallelParam IN VARCHAR2 DEFAULT NULL);
Description
Perform geometric transformation on the input GeoRaster object to produce an output GeoRaster object with the specified output spatial reference system.
Parameters
- inGeoRaster
-
GeoRaster object on which to perform the operation. It must be georeferenced (see Georeferencing GeoRaster Objects and Advanced Georeferencing).
- pyramidLevel
-
Pyramid level of the source GeoRaster object for the operation.
-
For BLOB output, this parameter is required.
-
For SDO_GEORASTER output, if this parameter is null, all pyramid levels from the input GeoRaster object are processed.
-
If the number 0 or greater is specified, only that pyramid level is used for the rectification, producing a result in scale based on that pyramid level image.
-
- outSRS
-
Coordinate system (spatial reference system) for the output GeoRaster object. Must be either null or a value from the SRID column of the MDSYS.CS_SRS table. If it is null, the output GeoRaster object will have the same SRID as the input GeoRaster object.
- cropArea
-
Defines the shape of the area to be covered by the output image. Areas outside this polygon will be filled with the background value. If this parameter is not specified, no cropping is performed.
- dimensionSize
-
Dimension size array of the GeoRaster object. Defines the extent of the image in cell space.
- layerNumbers
-
String specifying one or more numbers of layers from
inGeoRaster
to be transferred tooutGeoRaster
. 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. If this parameter is null (the default), all the layers will be processed. - elevationParam
-
A string containing one or more of the elevation parameters
average
(average surface height),scale
(scale value applied to allDEM
values), andoffset
(offset applied to allDEM
values), where the new value is(value + offset) * scale
. This parameter must be a quoted string that contains one or more keyword=value pairs (for example,'average=800 scale=3.2808399 offset=10'
). If this parameter is null, 0 is assumed foraverage
andoffset
, and 1 is used forscale
. Anyscale
andoffset
values are ignored ifDEM
is not specified.The use of the
elevationParam
parameter requires that the input GeoRaster object have a 3D model SRID.When the input GeoRaster object has a 3D model SRID, the average elevation is important for defining the extents of the output image. If that information is available, it should be specified even if
DEM
is also specified. If the average elevation is not specified, the procedure will calculate an approximate value for the average elevation.Note:
For any numbers in string (VARCHAR2) parameters to GeoRaster subprograms, the period (.) must be used for any decimal points regardless of the locale.
- resampleParam
-
A comma-separated quoted string of keyword=value pairs for specifying resampling parameters. See the Usage Notes for more information.
- storaageParam
-
A string specifying storage parameters, as explained in Storage Parameters.
- outGeoRaster
-
GeoRaster object to hold the result of the 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
- rasterBlob
-
BLOB to hold the output reflecting the rectification. It must exist or have been initialized before the operation.
- outArea
-
An SDO_GEOMETRY object containing the MBR (minimum bounding rectangle) in the model coordinate system of the resulting object.
- outWindow
-
An SDO_NUMBER_ARRAY object identifying the coordinates of the upper-left and lower-right corners of the output window in the cell space.
- 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 defaultbgValues
are zero (0).The filling values must be valid cell values as specified by the target cell depth background values for filling sparse data.
- parallelParam
-
Specifies the degree of parallelism for the operation. If specified, must be in the form
parallel=
n, where n is greater than 1. The database optimizer uses the degree of parallelism specified by this parameter. If not specified, then by default there is no parallel processing. (For more information, see Parallel Processing in GeoRaster.)If parallelism is specified, the procedure performs an internal commit operation. If an error occurs (even if it is raised by the Oracle parallel server), you must delete the resulting output GeoRaster object explicitly in order to roll back the operation.
Usage Notes
This procedure has two formats:
-
One format generates a GeoRaster object for persistent storage in the database.
-
The other format generates a BLOB for temporary storage or immediate use, such as to display data on the screen.
This procedure uses a non-parametric rectification method that takes the georeferencing polynomials from the input GeoRaster object to transform the original image space into the georeferencing polynomials given by the outSRS
parameter. Therefore, the input GeoRaster object must be georeferenced (see the SDO_GEOR.georeference subprogram).
For more information, see Image Warping.
Examples
In the following example, the output (generated) GeoRaster object will have the same spatial reference system (coordinate system) as outSRS
. The input GeoRaster object is a fully georeferenced image.
DECLARE srs sdo_geor_srs; gr2 sdo_georaster; gr3 sdo_georaster; gr4 sdo_georaster; BEGIN select georaster into gr2 from georaster_table where georid = 2; srs := sdo_geor.getSRS(gr2); select georaster into gr3 from georaster_table where georid = 3; insert into georaster_table values(4, 'Warped', sdo_geor.init('warp_rdt',4)) returning raster into gr4; sdo_geor.warp( inGeoRaster => gr3, pyramidLevel => null, outSRS => srs, cropArea => null, dimensionSize => sdo_number_array(518,518), layerNumbers => ‘4,5,3’, elevationParam => `average=300`, resampleParam => ‘resampling=AVERAGE4’, storageParam => ‘pyramid=true’, outGeoRaster => gr4, bgValues => sdo_number_array(0,0,0), parallelParam => ‘parellel=4’ ); update georaster_table set georaster = gr4 where georid = 4; commit; END;
Parent topic: SDO_GEOR Package Reference