7.152 SDO_GEOR.setULTCoordinate
Format
SDO_GEOR.setULTCoordinate( georaster IN OUT SDO_GEORASTER, ultCoord IN SDO_NUMBER_ARRAY);
Description
Sets or adjusts the cell coordinate values of the upper-left corner of a GeoRaster object.
Parameters
- georaster
-
GeoRaster object.
- ultCoord
-
An array of two numbers (row and column ordinates) if the rasterType value is 20001, or three numbers (row, column, and band ordinates) if the rasterType value is 21001. If you specify three numbers, the third one (band number) must be 0. For more information about the ULTCoordinate, see GeoRaster Data Model.
Usage Notes
If the metadata contains spatial reference information and the GeoRaster object is georeferenced, the spatial reference information is checked for validity. If it is valid, the spatial reference information including the georeferencing information is updated and adjusted according to the new ULT coordinates; otherwise, an exception is raised.
To return the upper-left coordinate values for a GeoRaster object, use the SDO_GEOR.getULTCoordinate function.
An exception is raised if ultCoord
is null or of the wrong array size or has any null array elements.
Examples
The following example sets the row and column ordinates of the upper-left corner of a GeoRaster object, with logic to handle whether the rasterType value is 20001 or 21001. (The example refers to a table named GEORASTER_TABLE, whose definition is presented after Example 1-1 in Storage Parameters.)
DECLARE grobj sdo_georaster; BEGIN SELECT georaster INTO grobj FROM georaster_table WHERE georid=1 FOR UPDATE; if grobj.rasterType = 20001 then sdo_geor.setULTCoordinate(grobj, sdo_number_array(0, 0)); elsif grobj.rasterType = 21001 then sdo_geor.setULTCoordinate(grobj, sdo_number_array(0, 0, 0)); end if; UPDATE georaster_table SET georaster = grobj WHERE georid=1; COMMIT; END; /
Parent topic: SDO_GEOR Package Reference