PK
u*Aoa, mimetypeapplication/epub+zipPK u*A iTunesMetadata.plistP
The MDSYS.SDO_GEOR_ADMIN package contains subprograms (functions and procedures) for administrative operations related to GeoRaster. This chapter presents reference information, with one or more examples, for each subprogram.
Format
SDO_GEOR_ADMIN.checkSysdataEntries() RETURN SDO_STRING2_ARRAY;
Description
Checks the USER_SDO_GEOR_SYSDATA view for any invalid entries.
Parameters
None.
Usage Notes
This function returns an array of comma-delimited list of GeoRaster system data entries that are invalid. It checks for errors such as the following:
The RDT name is not unique.
The GeoRaster table does not exist.
The GeoRaster column does not exist.
The GeoRaster objects does not exist.
The GeoRaster object is non-empty or nonblank, but the RDT does not exist.
Duplicate GeoRaster objects exist (that is, one or more non-unique combinations of RDT and raster ID).
If you call this function while connected as the MDSYS user, the entries in the ALL_SDO_GEOR_SYSDATA view instead of the USER_SDO_GEOR_METADATA view are checked.
The USER_SDO_GEOR_DATA and ALL_SDO_GEOR_SYSDATA views are described in Section 2.4.
Examples
The following example checks the USER_SDO_GEOR_SYSDATA view for invalid entries.
SELECT * FROM THE (SELECT SDO_GEOR_ADMIN.checkSysdataEntries FROM DUAL); COLUMN_VALUE -------------------------------------------------------------------------------- The RDT name "RDT1" is not unique The GeoRaster object GEOR_TEST1.TABLE1.GEOR: RDT=RDT2 RID=3 is associated with a non-existing RDT table! The specification of GeoRaster column GEOR_TEST1.TABLE1.c1 is not correct. The GeoRaster object GEOR_TEST1.TABLE1.geor: RDT=dt3 RID=2 doesn't exist! The GeoRaster table GEOR_TEST1.t1 doesn't exist!
Format
SDO_GEOR_ADMIN.isRDTNameUniquer(
rdtName VARCHAR2)
RETURN VARCHAR2;
Description
Checks if the specified raster data table (RDT) name is unique among RDT names in the database.
Parameters
Name to be checked for uniqueness.
Usage Notes
You can use this function to check, before you create an RDT, if the RDT name that you plan to use is unique.
This function returns the string TRUE
if the name is unique and the string FALSE
if the name is not unique.
Examples
The following example checks if the name MY_RDT
is unique.
SELECT SDO_GEOR_ADMIN.IsRDTNameUnique('MY_RDT') FROM DUAL; SDO_GEOR_ADMIN.ISRDTNAMEUNIQUE('MY_RDT') -------------------------------------------------------------------------------- TRUE
Format
SDO_GEOR_ADMIN.isUpgradeNeeded() RETURN SDO_STRING2_ARRAY;
Description
Checks the GeoRaster system data entries and GeoRaster data for the current schema.
Parameters
None.
Usage Notes
This function returns an array of comma-delimited list of GeoRaster system data entries and GeoRaster columns and objects that are invalid. It can report errors such as the following:
System data entry error, the RDT name is not unique.
System data entry error, the RDT/RID pair is not unique.
System data entry error, the GeoRaster table does not exist.
System data entry error, the GeoRaster column does not exist.
System data entry error, the GeoRaster object does not exist.
The GeoRaster object is non-empty or nonblank, but the RDT does not exist.
Duplicate GeoRaster objects exist (that is, one or more non-unique combinations of RDT and raster ID).
There is a non-registered pair of (GeoRaster column, GeoRaster object).
If you call this function while connected as the MDSYS user, the GeoRaster system data entries and GeoRaster data for the entire database are checked.
Examples
The following example checks the GeoRaster system data entries and GeoRaster data. It assumes that you are connected as the MDSYS user.
SELECT * FROM THE (SELECT SDO_GEOR_ADMIN.isUpgradeNeeded FROM DUAL); COLUMN_VALUE -------------------------------------------------------------------------------- The following GeoRaster columns aren't registered: SCHEMA:GEOR_TEST TABLE:TABLE1 COLUMN:GEOR The following GeoRaster objects aren't registered: SCHEMA:GEOR_TEST TABLE:TABLE1 COLUMN:GEOR RDT:RDT RID:3 SCHEMA:GEOR_TEST TABLE:TABLE1 COLUMN:GEOR RDT:RDT RID:4
Format
SDO_GEOR_ADMIN.listGeoRasterColumns() RETURN SDO_STRING2_ARRAYSET;
Description
Lists the GeoRaster columns defined in the current schema.
Parameters
None.
Usage Notes
This function returns an array of comma-delimited list of GeoRaster columns with their registration status. The list contains the following information:
Schema name (only if you are connected as the MDSYS user)
GeoRaster table name
GeoRaster column name
Status: registered (a DML trigger is created for the GeoRaster column) or unregistered (no DML trigger is created for the GeoRaster column)
If you call this function while connected as the MDSYS user, all GeoRaster columns defined in the database are listed.
Examples
The following example lists the GeoRaster columns defined in the current schema.
SELECT * FROM THE (SELECT SDO_GEOR_ADMIN.listGeoRasterColumns FROM DUAL); COLUMN_VALUE --------------------------------------------------------------------------------- SDO_STRING2_ARRAY('TEST_TABLE1', 'GEOR', 'registered') SDO_STRING2_ARRAY('TEST_TABLE2', 'GEOR', 'registered')
Format
SDO_GEOR_ADMIN.listGeoRasterObjects() RETURN SDO_STRING2_ARRAYSET;
Description
Lists the GeoRaster objects defined in the current schema.
Parameters
None.
Usage Notes
This function returns an array of comma-delimited list of GeoRaster objects with their registration status. The list contains the following information:
Schema name (only if you are connected as the MDSYS user)
GeoRaster table name
GeoRaster column name
RDT name
Raster ID
Status: registered (the GeoRaster object has been registered is the SYSDATA table) or unregistered (the GeoRaster object has not been registered is the SYSDATA table)
If you call this function while connected as the MDSYS user, all GeoRaster objects defined in the database are listed.
Examples
The following example lists the GeoRaster objects defined in the current schema.
SELECT * FROM THE (SELECT SDO_GEOR_ADMIN.listGeoRasterObjects FROM DUAL); COLUMN_VALUE --------------------------------------------------------------------------------- SDO_STRING2_ARRAY('TEST_TABLE1', 'GEOR', 'RDT_REGULAR_01', '1', 'registered') SDO_STRING2_ARRAY('TEST_TABLE2', 'GEOR', 'RDT_REGULAR_01', '2', 'registered')
Format
SDO_GEOR_ADMIN.listGeoRasterTables() RETURN SDO_STRING2_ARRAYSET;
Description
Lists the GeoRaster tables defined in the current schema.
Parameters
None.
Usage Notes
This function returns an array of comma-delimited list of GeoRaster tables. The list contains the following information:
Schema name (only if you are connected as the MDSYS user)
GeoRaster table name
If you call this function while connected as the MDSYS user, all GeoRaster tables defined in the database are listed.
Examples
The following example lists the GeoRaster tables defined in the database. It assumes that you are connected as the MDSYS user.
SELECT * FROM THE (SELECT SDO_GEOR_ADMIN.listGeoRasterTables FROM DUAL); COLUMN_VALUE --------------------------------------------------------------------------------- SDO_STRING2_ARRAY('GEOR_TEST', 'TEST_TABLE1') SDO_STRING2_ARRAY('GEOR_TEST', 'TEST_TABLE2')
Format
SDO_GEOR_ADMIN.listDanglingRasterData() RETURN SDO_STRING2_ARRAYSET;
Description
Checks the GeoRaster system data entries and GeoRaster data, and lists all dangling raster data.
Parameters
None.
Usage Notes
Raster data table (RDT) rows might exist for nonexistent GeoRaster objects or GeoRaster objects that are not referred to in the SYSDATA table. The raster blocks associated with such rows are referred to dangling blocks. The dangling raster blocks cause wasted disk space in the RDT although otherwise they do not present a problem as long as the necessary primary key is defined on the RDT. To find these dangling blocks in the current schema or in all schemas, call the SDO_GEOR_ADMIN.listDanglingRasterData function.
Before you call this function, you should call SDO_GEOR_ADMIN.registerGeoRasterObjects to register all existing GeoRaster objects.
To remove the dangling raster block data from an RDT, delete the rows associated with the problems discovered by the SDO_GEOR_ADMIN.listDanglingRasterData function.
This function returns an array of comma-delimited list of dangling raster data. The list contains the following information:
Schema name (only if you are connected as the MDSYS user)
RDT name
Raster ID
If you call this function while connected as the MDSYS user, all dangling raster data in the database is listed.
Examples
The following example lists all dangling raster data in the current schema.
SELECT * FROM THE (SELECT SDO_GEOR_ADMIN.listDanglingRasterData FROM DUAL); COLUMN_VALUE -------------------------------------------------------------------------------- SDO_STRING2_ARRAY('RDT11', '3')
Format
SDO_GEOR_ADMIN.listRDT() RETURN SDO_STRING2_ARRAYSET;
Description
Lists the raster data tables (RDTs) defined in the current schema.
Parameters
None.
Usage Notes
This function returns an array of comma-delimited list of RDTs. The list contains the following information:
Schema name (only if you are connected as the MDSYS user)
RDT name
If you call this function while connected as the MDSYS user, all RDTs defined in the database are listed.
Examples
The following example lists the RDTs defined in the current schema.
SELECT * FROM THE (SELECT SDO_GEOR_ADMIN.listRDT FROM DUAL); COLUMN_VALUE --------------------------------------------------------------------------------- SDO_STRING2_ARRAY('RDT_REGULAR_01') SDO_STRING2_ARRAY('RDT_REGULAR_02')
Format
SDO_GEOR_ADMIN.listRegisteredRDT() RETURN SDO_STRING2_ARRAYSET;
Description
Lists the registered raster data tables (RDTs) defined in the current schema. An RDT is registered if at least one entry in the SYSDATA table refers to it.
Parameters
None.
Usage Notes
This function returns an array of comma-delimited list of RDTs. The list contains the following information:
Schema name (only if you are connected as the MDSYS user)
RDT name
If you call this function while connected as the MDSYS user, all registered RDTs defined in the database are listed.
Examples
The following example lists the registered RDTs defined in the current schema.
SELECT * FROM THE (SELECT SDO_GEOR_ADMIN.listRegisteredRDT FROM DUAL); COLUMN_VALUE --------------------------------------------------------------------------------- SDO_STRING2_ARRAY('RDT1_REGULAR_01')
Format
SDO_GEOR_ADMIN.listUnregusteredRDT() RETURN SDO_STRING2_ARRAYSET;
Description
Lists the unregistered raster data tables (RDTs) defined in the current schema. An RDT is unregistered if no entries in the SYSDATA table refer to it.
Parameters
None.
Usage Notes
This function returns an array of comma-delimited list of RDTs. The list contains the following information:
Schema name (only if you are connected as the MDSYS user)
RDT name
If you call this function while connected as the MDSYS user, all unregistered RDTs defined in the database are listed.
Examples
The following example lists the unregistered RDTs defined in the current schema.
SELECT * FROM THE (SELECT SDO_GEOR_ADMIN.listUnregisteredRDT FROM DUAL); COLUMN_VALUE --------------------------------------------------------------------------------- SDO_STRING2_ARRAY('RDT_REGULAR_02')
Format
SDO_GEOR_ADMIN.maintainSysdataEntries() RETURN SDO_STRING2_ARRAY;
Description
Checks the USER_SDO_GEOR_SYSDATA view for any invalid entries, and takes corrective action as appropriate.
Parameters
None.
Usage Notes
This function performs the same checks as the SDO_GEOR_ADMIN.checkSysdataEntries function, and it takes the corrective action that is appropriate (if any). For each of the following errors, the function does the following:
The RDT name is not unique. If you are connected as a user other then MDSYS, no action is taken; if you are connected as user MDSYS, duplicate RDTs are renamed so that their names are unique.
The GeoRaster table does not exist. The entry is deleted.
The GeoRaster column does not exist. The entry is deleted.
The GeoRaster objects does not exist. The entry is deleted.
The GeoRaster object is non-empty or nonblank, but the RDT does not exist. The entry is deleted.
Duplicate GeoRaster objects exist (that is, one or more non-unique combinations of RDT and raster ID). The entry is deleted.
If you call this function while connected as the MDSYS user, the entries in the ALL_SDO_GEOR_SYSDATA view instead of the USER_SDO_GEOR_METADATA view are checked.
The USER_SDO_GEOR_DATA and ALL_SDO_GEOR_SYSDATA views are described in Section 2.4.
Examples
The following example checks the USER_SDO_GEOR_SYSDATA view for invalid entries, and performs corrective action as appropriate.
DECLARE ret SDO_STRING2_ARRAY; BEGIN ret:=sdo_geor_admin.MAINTAINSYSDATAENTRIES; for i in 1..ret.count loop dbms_output.put_line(ret(i)); end loop; END; / The RDT name GEOR_TEST1.RDT2 is renamed to GEOR_TEST1.RDT1! The sysdata entry (SCHEMA=GEOR_TEST1 RDT=dt1 RID=1) is deleted! PL/SQL procedure successfully completed.
Format
SDO_GEOR_ADMIN.registerGeoRasterColumns;
Description
Creates DML triggers for all GeoRaster columns defined in the current schema.
Parameters
None.
Usage Notes
You should not normally need to execute this procedure. You should execute it only if some error or other condition has resulted in GeoRaster columns without associated DML triggers.
If you execute this procedure while connected as the MDSYS user, DML triggers are created for all GeoRaster columns defined in all schemas.
Examples
The following example creates DML triggers for all GeoRaster columns defined in the current schema.
EXECUTE sdo_geor_admin.registerGeoRasterColumns;
Format
SDO_GEOR_ADMIN.registerGeoRasterObjects;
Description
Registers all GeoRaster objects defined in the current schema.
Parameters
None.
Usage Notes
If you execute this procedure while connected as the MDSYS user, all GeoRaster objects defined in all schemas are registered.
Examples
The following example registers all GeoRaster objects defined in the current schema.
EXECUTE sdo_geor_admin.registerGeoRasterObjects;
Format
SDO_GEOR_ADMIN.upgradeGeoRaster() RETURN SDO_STRING2_ARRAY;
Description
Checks the GeoRaster system data entries and GeoRaster data for the current schema, and performs any corrective action as appropriate.
Parameters
None.
Usage Notes
This function performs the same checks as the SDO_GEOR_ADMIN.isUpgradeNeeded function, and it takes the corrective action that is appropriate (if any) for the following errors:
System data entry error, the RDT name is not unique.
System data entry error, the RDT/RID pair is not unique.
System data entry error, the GeoRaster table does not exist.
System data entry error, the GeoRaster column does not exist.
System data entry error, the GeoRaster object does not exist.
The GeoRaster object is non-empty or nonblank, but the RDT does not exist.
Duplicate GeoRaster objects exist (that is, one or more non-unique combinations of RDT and raster ID).
There is a non-registered pair of (GeoRaster column, GeoRaster object).
If you call this function while connected as the MDSYS user, the GeoRaster system data entries and GeoRaster data for the entire database are checked, and any appropriate corrective actions are taken.
Examples
The following example checks the GeoRaster system data entries and GeoRaster data for the current schema, and performs any corrective action as appropriate.
SELECT SDO_GEOR_ADMIN.upgradeGeoRaster FROM DUAL;
This section describes new and changed features of Oracle Spatial GeoRaster for Oracle Database Release 11.
The following are new and changed features for Oracle Database 11g Release 2 (11.2).
GeoRaster now includes a Java API, which consists of interfaces and classes that support features available with the GeoRaster feature of Oracle Spatial. For more information, see Section 1.13.
You can use ground control points (GCPs) to georeference GeoRaster objects. The support for this feature includes several new data types and PL/SQL subprograms, as well as enhancements to some existing types and subprograms. For information, see the following:
Section 2.3.5, "SDO_GEOR_SRS Object Type" (includes all GCP-related information)
SDO_GEOR.deleteControlPoint procedure
SDO_GEOR.georeference (new function formats for using GCPs)
SDO_GEOR.getControlPoint function
SDO_GEOR.getGCPGeorefMethod function
SDO_GEOR.getGCPGeorefModel function
SDO_GEOR.getSRS function (includes GCP-related information)
SDO_GEOR.setControlPoint procedure
SDO_GEOR.setGCPGeorefMethod procedure
SDO_GEOR.setGCPGeorefModel procedure
SDO_GEOR.setSRS procedure (includes GCP-related information)
Appendix A, "GeoRaster Metadata XML Schema" (includes new GCP-related elements)
You can reproject a GeoRaster object to a different Oracle Spatial coordinate system by using the new SDO_GEOR.reproject, which is documented in Chapter 4.
For raster data that is blocked, you can specify the new OPTIMALPADDING keyword to cause any user-specified blockSize
value for storage parameters to be adjusted automatically to an optimal value to reduce padding space. For more information, see the descriptions on the blocking
and blockSize
keywords in Table 1-1, "storageParam Keywords for Raster Data" in Section 1.4.1.
You can also use the new SDO_GEOR_UTL.calcOptimizedBlockSize procedure (documented in Chapter 6) to calculate an optimal blockSize
value that will use less padding space in the GeoRaster object storage, and you can apply the result in any subprogram that has the storageParam
parameter.
The new SDO_GEOR.evaluateDouble function (documented in Chapter 4) evaluates a direct location based on neighboring cell values by using a specified interpolation method, and returns the raster values (double precision numbers) for the specified bands or layers for that location.
The SDO_GEOR.getRasterSubset and SDO_GEOR.subset procedures (documented in Chapter 4) are enhanced. In previous releases, only the MBR (rectangle) of the query polygon was used. Now, you can also clip the query result along the (irregular) polygon boundary.
The new SDO_GEOR.setModelCoordLocation procedure (documented in Chapter 4) enables you to change the cell coordinate system from CENTER to UPPERLEFT or from UPPERLEFT to CENTER. It applies only to georeferenced GeoRaster objects, and it automatically adjusts the functional fitting coefficients of the GeoRaster SRS accordingly to reflect the change (to ensure that the relationship between cell coordinates and model coordinates does not change).
The SDO_GEOR.getCellValue function (documented in Chapter 4) is enhanced to return cell values of multiple layers or bands for a specified location. In previous releases, it returned only a single cell value of a specified layer or band.
The SDO_GEOR.getGeoreferenceType function (documented in Chapter 4) can return the following values for georeference type in addition to those documented in the previous release of this manual: 5 for cubic polynomial, 6 for quadratic rational polynomial, or 7 for quadratic polynomial.
The following are new and changed features for Oracle Database 11g Release 1 (11.1).
For the current release, GeoRaster automates certain tasks that previously needed to be performed manually, and it provides new administrative tools for users who need to perform specialized tasks.
When you create a GeoRaster table, you no longer need to create the GeoRaster DML triggers for the table. These DML triggers are created automatically, and their automatic creation and operation provides greater reliability.
When you import GeoRaster data using the Data Pump Import utility, you no longer need to create GeoRaster DML triggers for the imported tables or GeoRaster system data entries for the imported GeoRaster objects. These triggers and entries are now created automatically.
Internal enhancements that monitor DDL events on raster tables and activities on GeoRaster system data improve the manageability, reliability, robustness, and usability of GeoRaster.
The new SDO_GEOR_ADMIN PL/SQL package contains subprograms to retrieve information that may be useful and to help you manage and maintain GeoRaster databases, including performing migration and upgrade operations. The SDO_GEOR_ADMIN subprograms are documented in Chapter 5.
Raster data versioning with Oracle Workspace Manager is supported, as explained in Section 3.18.
Raster data row-level security with Oracle Label Security is supported, as explained in Section 3.18.
For more information about GeoRaster and database management, see Section 1.11.
The current release provides support for new GeoRaster metadata and raster types:
A generic and complex functional fitting georeferencing model is supported for georeferencing rectified and unrectified airborne photos and satellite images. The affine transformation, DLT, RPC, and other models are supported as special cases of this generic model. For more information, see Section 1.6.
Bitmap masks (special one-bit deep rectangular raster grids with each pixel having either the value of 0 or 1) can be stored for GeoRaster objects and individual bands or layers. These masks are stored inside the GeoRaster objects. Pyramids of masks can also be created and stored inside the GeoRaster objects. For more information about bitmap masks, see Section 1.8.
Multiple NODATA values and multiple NODATA value ranges are supported for GeoRaster objects and their individual bands or layers. For more information, see Section 1.9.
GeoRaster objects can have empty raster blocks to save storage space and improve processing speed. For more information, see Section 1.4.4.
Random blocking size is supported. Although each block must still have the same size, the raster blocking sizes can be randomly different numbers along row and column dimensions, not necessarily a power of 2.
The current release provides many new subprograms and other enhancements related to the GeoRaster PL/SQL API and other features, including the following:
Update, query, and other DML operations on the new georeferencing models, bitmap masks, and multiple NODATA values and value ranges are supported.
Existing subprograms are enhanced to support empty raster blocks, random blocking sizes, and the new metadata.
Mosaic support allows for gaps, overlaps, and missing source GeoRaster objects. For information about mosaic support, see the description of the SDO_GEOR.mosaic procedure in Chapter 4.
The union or merging of GeoRaster objects and layers is supported. For information, see the description of the SDO_GEOR.mergeLayers procedure in Chapter 4.
Partial edit and update on a window of raster data and its pyramids using another image or gridded data is supported. For information, see the description of the SDO_GEOR.updateRaster procedure in Chapter 4.
New GeoRaster template functions are provided to facilitate third-party software integration. For more information, see Section 3.17.
Statistical analysis and histogram generation are supported. For information, see the description of the SDO_GEOR.generateStatistics procedure in Chapter 4.
Sub-cell or sub-pixel addressing (floating row and column numbers) is supported in the GeoRaster cell spaces, as explained in Section 1.3.
A new constructor is added to the SDO_GEOR_SRS object type, as explained in Section 2.3.5.
Calculation of the actual and nominal storage sizes of a GeoRaster object is supported. (The nominal size does not consider compression and sparse data.) For more information, see the sections about the SDO_GEOR_UTL.calcRasterStorageSize and SDO_GEOR_UTL.calcRasterNominalSize functions in Chapter 6.
GeoRaster validation is enhanced to require that each valid GeoRaster object must be registered (with an entry in the ALL_SDO_GEOR_SYSDATA view), the raster data table name attribute of the GeoRaster object must not contain spaces, period separators, or mixed-case letters in a quoted string, and all the alphanumeric characters must be uppercase. For information about validating GeoRaster objects, see Section 3.4, which also refers to specific functions for performing validation.
GeoRaster supports the use of SecureFile LOBs (SecureFiles) which were introduced in Release 11.1 to supplement the original BasicFile LOBs. For more information, see Section 3.1.2.
GeoTiff, JPEG 2000, and Digital Globe RPC file formats are supported for loading and exporting GeoRaster objects. JPEG files can be loaded without decompression. For more information about the GeoRaster loader and exporter tools, see Section 1.14.
The GeoRaster viewer is enhanced to display masks, generic georeferencing models, empty raster blocks, and other features. For more information about the GeoRaster viewer tool, see Section 1.14.
The following table lists the new PL/SQL subprograms for this release. (It does not include existing subprograms that were significantly enhanced for this release.)
PL/SQL Package | New Subprograms |
---|---|
SDO_GEOR (documented in Chapter 4) | SDO_GEOR.addNODATA
SDO_GEOR.getModelCoordLocation SDO_GEOR.getRasterBlockLocator |
SDO_GEOR_ADMIN (documented in Chapter 5) | (All subprograms are new because the SDO_GEOR_ADMIN package is new for this release.) |
SDO_GEOR_UTL (documented in Chapter 6) | SDO_GEOR_UTL.calcRasterNominalSize
SDO_GEOR_UTL.calcRasterStorageSize |