2.1 SDO_GEORASTER Object Type
In the GeoRaster object-relational model, a raster image or grid object is stored in a single row, in a single column of object type SDO_GEORASTER in a user-defined table. Tables with at least one column of type SDO_GEORASTER are referred to as GeoRaster tables.
The SDO_GEORASTER object type is defined as:
CREATE TYPE sdo_georaster AS OBJECT ( rasterType NUMBER, spatialExtent SDO_GEOMETRY, rasterDataTable VARCHAR2(128), rasterID NUMBER, metadata XMLType);
The sections that follow describe the semantics of each SDO_GEORASTER attribute.
- rasterType Attribute
- spatialExtent Attribute
- rasterDataTable Attribute
- rasterID Attribute
- metadata Attribute
Parent topic: GeoRaster Data Types and Related Structures
2.1.1 rasterType Attribute
The rasterType
attribute must be a 5-digit number in the format [d][b][t][gt]
, where:
-
[d]
identifies the number of spatial dimensions. Must be 2 for the current release. -
[b]
indicates band or layer information: 0 means one band or layer; 1 means one or more than one band or layer. Note that you are not specifying the total number of bands or layers in this field. (For information about bands and layers, see Bands_ Layers_ and Metadata.) -
[t]
is reserved for future use and should be specified as 0 (zero). -
[gt]
identifies the 2-digit GeoRaster type, and must be one of the following values:[gt] Value Meaning 00
Reserved for Oracle use.
01
Any GeoRaster type. This is the only value supported for the current release. This value causes GeoRaster not to apply any restrictions associated with specific types that might be implemented in future releases.
02-50
Reserved for Oracle use.
51-99
Reserved for customer use in future releases.
For example, a RasterType value of 20001 means:
-
Two-dimensional data
-
One band (layer)
-
Any GeoRaster type
Parent topic: SDO_GEORASTER Object Type
2.1.2 spatialExtent Attribute
The spatialExtent
attribute identifies the spatial extent,
or footprint, associated with the raster data. The spatial extent is an Oracle Spatial geometry of type SDO_GEOMETRY. The
spatial extent geometry can be in any coordinate system, not necessarily in the
GeoRaster model space, and can be directly updated by a SQL UPDATE statement specifying
a geometry. However, the spatial extent geometry is in the model (ground) space of the
GeoRaster object if the GeoRaster object is georeferenced and if you generate the
spatial extent geometry using any of the following methods: calling the SDO_GEOR.generateSpatialExtent function or the GeoRaster
client-side loader (described in GeoRaster Tools:
Viewer_ Loader_ Exporter).
You can call SDO_CS.transform to convert it to any other supported coordinate system. The spatial extent is set to null, rather than cell space, if its SRID value is null or 0 (zero). The SDO_GEOMETRY data type is described in Oracle Spatial Developer's Guide.
The GeoRaster spatial extent is generally used to build a spatial R-tree index on the GeoRaster column. For example, you can use a geodetic SRID for all the spatial extents when all GeoRaster objects are in different local projections, and then build a whole-Earth based spatial index on the GeoRaster table and spatially search GeoRaster objects globally. Because of the potential performance benefits of spatial indexing for GeoRaster applications, the geometry is associated with the spatialExtent
attribute, rather than being included in the XML metadata
attribute described in metadata Attribute. For information about indexing GeoRaster data, see Indexing GeoRaster Objects.
Parent topic: SDO_GEORASTER Object Type
2.1.3 rasterDataTable Attribute
The rasterDataTable
attribute identifies the name of the raster data table. The raster data table must be an object table of type SDO_RASTER or a relational table that includes all columns defined by object type SDO_RASTER. It contains a row for each raster block that is stored. You must create and (if necessary) drop the raster data table. You should never modify the rows in this table directly, but you can query this table to access the raster data.
This attribute must be a valid nonquoted identifier without any period separators, and all the alphanumeric characters must be uppercase.
For more information about the raster data table and the SDO_RASTER type, see SDO_RASTER Object Type and the Raster Data Table.
Parent topic: SDO_GEORASTER Object Type
2.1.4 rasterID Attribute
The rasterID
attribute value is stored in the rows of the raster data table to identify which rows belong to the GeoRaster object. The rasterDataTable
attribute and rasterID
attribute together uniquely identify the GeoRaster object in the database. That is, each GeoRaster object has a raster data table, although a raster data table can contain data from multiple GeoRaster objects.
You can specify the rasterID
and rasterDataTable
attributes for new GeoRaster objects, as long as each pair is unique in the database. If you do not specify these values, they are automatically generated by the SDO_GEOR.init and SDO_GEOR.createBlank functions.
Parent topic: SDO_GEORASTER Object Type
2.1.5 metadata Attribute
The metadata
attribute contains the GeoRaster metadata that is defined by Oracle. The metadata is described by the GeoRaster metadata XML schema, which is documented in GeoRaster Metadata XML Schema. The metadata of any GeoRaster object must be validated against this XML schema, and it must also be validated using the SDO_GEOR.validateGeoRaster function, which imposes additional restrictions not defined by this XML schema.
The default storage option for GeoRaster metadata is binary XML.
Parent topic: SDO_GEORASTER Object Type