7.158 SDO_GEOR.validateGeoRaster
Format
SDO_GEOR.validateGeoRaster( georaster IN SDO_GEORASTER ) RETURN VARCHAR2;
Description
Validates a GeoRaster object, checking its raster data and metadata.
Usage Notes
This function returns the string TRUE
if the GeoRaster object is valid, a null value if the GeoRaster object is null, an Oracle error code if the error is known, or FALSE
for an unknown error.You should use this function after you create, load, or modify a GeoRaster object, to ensure that it is valid before you process it further.
If this function identifies a GeoRaster object as invalid with an error code of 13454, the object's metadata is not valid according to the GeoRaster XML schema. If this happens, call the SDO_GEOR.schemaValidate function to find specific locations and other information about the errors.
This function not only validates GeoRaster metadata against the GeoRaster XML schema, but it also enforces restrictions and requirements in the current release that are not described in the XML schema. The following are some of the restrictions and requirements enforced by this function:
-
Layer numbers must be from 1 to n where n is the total number of layers.
-
The
cellRepresentationType
value must beUNDEFINED
. -
If
totalBandBlocks
orbandBlockSize
is specified in the metadata, both must be specified. If there is only one band, no band blocking is allowed. -
The total number of blocks times the blocking size along a dimension must match the dimension size plus padding size, and the size of each cell data BLOB object must match the metadata description in terms of blocking or nonblocking, or of empty or not empty.
-
The size and number of GeoRaster data blocks stored in the raster data table must be consistent with the metadata description. For cell data, the number and size of the blocks are checked; the content of the blocks is not checked.
-
The only pyramid types supported are
NONE
(no pyramids) andDECREASE
. (For more information about pyramids, see Pyramids.) -
The name of the raster data table must not contain spaces, period separators, or mixed-case letters in a quoted string, and all the alphanumeric characters must be uppercase.
-
The raster data table must be an object table of SDO_RASTER type, and the table must exist if the GeoRaster object is not blank. To use GeoRaster with Oracle Workspace Manager or Oracle Label Security (OLS), you can define an object view of SDO_RASTER type and use the object view as the raster storage.
-
There must be an entry for the GeoRaster object in the ALL_SDO_GEOR_SYSDATA view.
-
Each associated bitmap mask must have the correct number of rows in the RDT.
-
Any NODATA values and value ranges are in the valid cell value range as designated by the cell depth.
-
For an uncompressed GeoRaster object, the size of the BLOB object in each raster block is checked based on the blocking size and cell depth. However, for a compressed GeoRaster object, the size of the BLOB object in each raster block is not checked. Thus, when a compressed GeoRaster object is decompressed, the data might not be valid with respect to size. (A BLOB with zero length is valid; it is an empty raster block.)
-
For an uncompressed GeoRaster object, the raster block size of each bitmap mask is checked, based on the blocking size and
1BIT
cell depth. (A BLOB with zero length is valid; it is an empty bitmap mask raster block.) -
A generic functional fitting polynomial model is supported, as described in Functional Fitting Georeferencing Model. The limitations on offsets, scales, RMS values, pType, nVars, and number of coefficients of the polynomials are described in Functional Fitting Georeferencing Model and Table 2-4 in SDO_GEOR_SRS Object Type.
-
The SRID in the GeoRaster SRS metadata is not checked against the CS_SRS table and is not validated. To validate the SRID, call SDO_GEOR.getModelSRID and SDO_CS.VALIDATE_WKT (the latter described in Oracle Spatial Developer's Guide). The
verticalSRID
value is not used in the current release. -
Ground control points (GCPs), as the StoredFunction georeferencing model, are supported. The
gcpGeoreferenceModel
in the metadata should follow the definition of the SDO_GEOR_GCPGEOREFTYPE type as described in SDO_GEOR_GCPGEOREFTYPE Object Type, and each GCP should follow the specification of the SDO_GEOR_GCP type as described in SDO_GEOR_GCP Object Type. The number of GCPs is not checked against theFFMethod
attribute, so you can have the flexibility to add GCPs gradually. -
The
RigorousModel
georeferencing model is not supported. If the functional polynomial coefficients are set, themodelType
value must be set toFunctionalFitting
and theisReferenced
value is set asTRUE
. If are GCPs are stored in the metadata, themodelType
value must be set toStoredFunction
. If both conditions are true, twomodelType
values are added to contain bothStoredFunction
andFunctionalFitting
values. -
Spatial resolutions can be inconsistent with the affine transformation scales if the GeoRaster object is georeferenced.
-
GeoRaster temporal referencing and band referencing are not supported, although in the temporal reference system (TRS) and band reference system (BRS) you can store the beginning and ending date and time, the spectral resolution, the spectral unit, and related descriptive information.
-
Only one
layerInfo
element is supported. A layer can be defined only along one dimension, and this dimension must beBAND
. However, within thelayerInfo
element, the number ofsubLayer
elements is limited only by the total number of layers. The layer number for theobjectLayer
elements is 0, and the layer numbers forsubLayer
elements are 1 to n where n is the total number of layers. -
The scaling function, bin function, and statistical data or histogram can be stored in the GeoRaster metadata and must be valid against the XML schema, but the value ranges for these items are not restricted. GeoRaster interfaces that use this metadata are limited. Applications should validate this optional metadata before using it.
-
The numbers of colormap values and grayscale mapping values are not restricted, but there must be no duplicate colormap or grayscale values, and the values in each array must be consistent with the
cellDepth
value of the GeoRaster object and must be in ascending order. The value range of the red, green, blue, alpha, and gray components must be integers from 0 to 255. -
Complex
cellDepth
values are not supported. -
This function does not check any external tables (such as a bin table, histogram table, grayscale table, or colormap table) whose names are registered in the XML metadata.
-
This function does not validate the spatial extent geometry, or whether or not the spatial relationship between the geometry and the raster data is correct. To validate the spatial extent geometry, use the SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT or SDO_GEOM.VALIDATE_LAYER_WITH_CONTEXT procedure, which are documented in Oracle Spatial Developer's Guide.
-
This function does not validate the geometry specified in the
blockMBR
attribute in raster data tables, or whether or not the geometry precisely encloses the raster blocks. (TheblockMBR
attribute is described in blockMBR Attribute.) To validate theblockMBR
geometries, use the SDO_GEOR.validateBlockMBR function.
If there is no entry for the GeoRaster object in the ALL_SDO_GEOR_SYSDATA view (described in GeoRaster System Data Views (xxx_SDO_GEOR_SYSDATA)), this procedure returns an error stating that the GeoRaster object is not registered. To prevent this error, be sure that the GeoRaster object is inserted into a GeoRaster table and that this table has the required GeoRaster DML trigger created on it. To enable cross-schema access, you must also ensure that users calling this procedure have an appropriate privilege on both the GeoRaster table and the associated raster data table.
Examples
The following example validates the GeoRaster objects in a table.
SELECT t.georid, sdo_geor.validategeoraster(t.georaster) isvalid from georaster_table t order by georid; GEORID ISVALID ---------- ---------- 3 TRUE 4 TRUE
Parent topic: SDO_GEOR Package Reference