2.3 Other GeoRaster Types

GeoRaster also porvides some other data types.

In addition to SDO_GEORASTER, SDO_RASTER, and SDO_RANGE_ARRAY and SDO_RANGE, GeoRaster provides several other object and collection types, which are used for specific kinds of operations. Unlike the SDO_GEORASTER and SDO_RASTER types, which are used for storage in the database (for example, to define a column in a table), the types described in this section are used only with the GeoRaster PL/SQL API in the current release.

2.3.1 SDO_GEOR_HISTOGRAM Object Type

In GeoRaster, the histogram is stored in the GeoRaster metadata using the XML schema defined in GeoRaster Metadata XML Schema. The SDO_GEOR_HISTOGRAM object type is used in the PL/SQL API to contain the histogram data of a GeoRaster object or a layer. The layers have the same histogram data structure. Each cell has a value, and for each cell value or a value range there may be any number of cells having that value or falling in that range.

The SDO_GEOR_HISTOGRAM object type is defined as:

CREATE TYPE sdo_geor_histogram AS OBJECT(
  cellValue  SDO_NUMBER_ARRAY,
  count      SDO_NUMBER_ARRAY);

Table 2-1 describes the attributes of the SDO_GEOR_HISTOGRAM object type. The cellValue array and the count array must have the same length.

Table 2-1 SDO_GEOR_HISTOGRAM Object Type Attributes

Attribute Description

cellValue

Array of cell values.

count

Number of cells that correspond to each cell value or cell value range.

The histogram contains the cell values (and the implied value ranges) and the total number of cells related to each cell value or each cell value range. For example, if (cellValue1, count1) and (cellValue2, count2) are the two adjacent entries in ascending order in the histogram, the implied value range is [cellValue1, cellValue2) and the total number of cells in this range is count1. The cell value range is always inclusive in its lower boundary and exclusive in the upper boundary. The size of each range does not necessarily have to be the same. Using this example, the range is equal to or greater than cellValue1 and less than cellValue2. For a lower cell depth (for example, 1-bit to 8-bit integers), the cell value ranges are typically the same as the cell values.

2.3.2 SDO_GEOR_HISTOGRAM_ARRAY Collection Type

The SDO_GEOR_HISTOGRAM_ARRAY collection type is used to store an array (collection) of SDO_GEOR_HISTOGRAM objects.

The SDO_GEOR_HISTOGRAM_ARRAY collection type is defined as:

CREATE TYPE sdo_geor_histogram_array AS 
  VARRAY(10485760) OF SDO_GEOR_HISTOGRAM;

2.3.3 SDO_GEOR_COLORMAP Object Type

In GeoRaster, the color information is stored in the GeoRaster metadata using the XML schema defined in GeoRaster Metadata XML Schema. The SDO_GEOR_COLORMAP object type is used in the PL/SQL API to contain colormap information, that is, pseudocolor information for identifying the red, green, blue, and (optionally) alpha values of the color to be used to display cells that have a specific value or are in a specific value range. The colormap is also called the pseudocolor table or the palette table. The colormap in GeoRaster is in the default sRGB ColorSpace, which is a proposed standard RGB color space, as explained at

http://www.w3.org/Graphics/Color/sRGB.html

The ranges for red, green, blue, and alpha values are all scaled to be 8-bit unsigned integers from 0 to 255.

Alpha is also called opacity. An alpha value of 255 means that the color is completely opaque, and an alpha value of 0 means that the color is completely transparent. The color component values are never premultiplied by the alpha value.

The SDO_GEOR_COLORMAP object type is defined as:

CREATE TYPE sdo_geor_colormap AS OBJECT(
  cellValue  SDO_NUMBER_ARRAY,
  red        SDO_NUMBER_ARRAY,
  green      SDO_NUMBER_ARRAY,
  blue       SDO_NUMBER_ARRAY,
  alpha      SDO_NUMBER_ARRAY);

Table 2-2 describes the attributes of the SDO_GEOR_COLORMAP object type. Each attribute is an array of numbers. The arrays must have the same length, and the values of the same index in each array must correspond to each other. Each cellValue value must be consistent with the cellDepth value of the GeoRaster object.

The colormap contains the cell values (and the implied value ranges) and the red, green, blue, and/or alpha values related to each cell value or each cell value range. For example, if (cellValue1, red1, green1, blue1, alpha1) and (cellValue2, red2, green2, blue2, alpha2) are the two adjacent entries in ascending order in the colormap, the implied value range is [cellValue1, cellValue2), and the color components associated with all cells in this range are (red1, green1, blue1, alpha1). The cell value range is always inclusive in its lower boundary and exclusive in the upper boundary. The size of each range does not necessarily have to be the same. In this example, the range is equal to or greater than cellValue1 and less than cellValue2. For a lower cell depth (for example, 1-bit to 8-bit integers), the cell value ranges are typically the same as the cell values.

Table 2-2 SDO_GEOR_COLORMAP Object Type Attributes

Attribute Description

cellValue

Array of cell values. The values must be stored in ascending order.

red

Array of red component values for pseudocolor display of cells that have the values or value ranges in cellValue. Must be integer values from 0 to 255.

green

Array of green component values for pseudocolor display of cells that have the values or value ranges in cellValue. Must be integer values from 0 to 255.

blue

Array of blue component values for pseudocolor display of cells that have the values or value ranges in cellValue. Must be integer values from 0 to 255.

alpha

Array of alpha component values for pseudocolor display of cells that have the values or value ranges in cellValue. Must be integer values from 0 to 255.

2.3.4 SDO_GEOR_GRAYSCALE Object Type

In GeoRaster, the grayscale information is stored in the GeoRaster metadata using the XML schema defined in GeoRaster Metadata XML Schema. The SDO_GEOR_GRAYSCALE object type is used in the PL/SQL API to contain grayscale information for identifying the grayscale value to be used to display cells that have a specific value or fall into a specific value range. The grayscale table cell values can be "stretched" in linear proportion using this grayscale table, so that the original raster data can be properly displayed. The grayscale table value range is 8-bit unsigned integer values from 0 to 255. The grayscale table is also called the contrast table or the lookup table.

The SDO_GEOR_GRAYSCALE object type is defined as:

CREATE TYPE sdo_geor_grayscale AS OBJECT(
  cellValue  SDO_NUMBER_ARRAY,
  gray       SDO_NUMBER_ARRAY);

Table 2-3 describes the attributes of the SDO_GEOR_GRAYSCALE object type. The cellValue array and the gray array must have the same length. Each cellValue value must be consistent with the cellDepth value of the GeoRaster object.

The grayscale contains the cell values (and the implied value ranges) and the gray values related to each cell value or each cell value range. For example, if (cellValue1, gray1) and (cellValue2, gray2) are the two adjacent entries in ascending order in the grayscale table, the implied value range is [cellValue1, cellValue2), and the gray color associated with all cells in this range is gray1. The cell value range is always inclusive in its lower boundary and exclusive in the upper boundary. The size of each range does not necessarily have to be the same. Taking the same example, the range is equal to or greater than cellValue1 and less than cellValue2. For a lower cell depth (for example, 1-bit to 8-bit integers), the cell value ranges are typically the same as the cell values.

Table 2-3 SDO_GEOR_GRAYSCALE Object Type Attributes

Attribute Description

cellValue

Array of cell values. The values must be stored in ascending order.

gray

Array of gray component values for grayscale display of cells that have the values or value ranges in cellValue. Must be integer values from 0 to 255.

2.3.5 SDO_RASTERSET Collection Type

The SDO_RASTERSET collection type is used as the return type of table functions that query the raster data blocks (one or many blocks, the whole set or a subset).

The SDO_RASTERSET collection type is defined as:

CREATE TYPE sdo_rasterset AS TABLE of SDO_RASTER;

2.3.6 SDO_GEOR_SRS Object Type

In GeoRaster, the spatial reference system (SRS) information is stored in the GeoRaster metadata using the XML schema defined in GeoRaster Metadata XML Schema. The SDO_GEOR_SRS object type is used in the PL/SQL API to contain information related to the spatial referencing of a GeoRaster object. The metadata and the object type contain the same information. You can use the object type to retrieve the SRS information from GeoRaster objects or to load and update the SRS information in GeoRaster objects.

The SDO_GEOR_SRS object type is defined as:

CREATE TYPE sdo_geor_srs AS OBJECT (
   isReferenced       VARCHAR2(5),
   isRectified        VARCHAR2(5),
   isOrthoRectified   VARCHAR2(5),
   srid               NUMBER,
   spatialResolution  SDO_NUMBER_ARRAY,
   spatialTolerance   NUMBER,
   coordLocation      NUMBER,
   rowOff             NUMBER,
   columnOff          NUMBER,
   xOff               NUMBER,
   yOff               NUMBER,
   zOff               NUMBER,
   rowScale           NUMBER,
   columnScale        NUMBER,
   xScale             NUMBER,
   yScale             NUMBER,
   zScale             NUMBER,
   rowRMS             NUMBER,
   columnRMS          NUMBER,
   totalRMS           NUMBER,
   rowNumerator       SDO_NUMBER_ARRAY,
   rowDenominator     SDO_NUMBER_ARRAY,
   columnNumerator    SDO_NUMBER_ARRAY,
   columnDenominator  SDO_NUMBER_ARRAY,
   xRMS               NUMBER,
   yRMS               NUMBER,
   zRMS               NUMBER,
   modelTotalRMS      NUMBER,
   GCPgeoreferenceModel SDO_GEOR_GCPGEOREFTYPE);

Table 2-4 describes the attributes of the SDO_GEOR_SRS object type.

Table 2-4 SDO_GEOR_SRS Object Type Attributes

Attribute Description

isReferenced

TRUE if the GeoRaster object is georeferenced; FALSE if the GeoRaster object is not georeferenced.

isRectified

TRUE if the GeoRaster object is both georectified and georeferenced; FALSE if the GeoRaster object is not georectified.

isOrthoRectified

TRUE if the GeoRaster object is orthorectified, georectified, and georeferenced; FALSE if the GeoRaster object is not orthorectified.

srid

SRID value of the model (ground) coordinate system.

spatialResolution

Spatial resolution values: an array of numeric values, one for each spatial dimension. Each value indicates the number of units of measurement associated with the data area represented by that spatial dimension of a cell.

spatialTolerance

Tolerance value, for control of the precision.

coordLocation

The model coordinate location defines the type of the cell space, which represents either upperleft-based (that is, coordLocation=1) or center-based (that is, coordLocation=0). For more information about model space and cell (raster) space, see GeoRaster Data Model.

rowOff

Row offset value.

columnOff

Column offset value.

xOff

X offset value.

yOff

Y offset value.

zOff

Z offset value.

rowScale

Row scaling factor value.

columnScale

Column scaling factor value.

xScale

X scaling factor value.

yScale

Y scaling factor value.

zScale

Z scaling factor value.

rowRMS

The row-dimension accuracy. It is computed using control points if you call SDO_GEOR.georeference using GCPs.

columnRMS

The column-dimension accuracy. It is computed using control points if you call SDO_GEOR.georeference using GCPs

totalRMS

The total row and column accuracy. It is computed using control points if you call SDO_GEOR.georeference using GCPs

rowNumerator

pType, nVars, order, nCoefficients, and all coefficients of the numerator of the row polynomial, where pType=1 or 2; nVars=0, 2, or 3; 0<=order<=5; and nCoefficients is derived from pType, nVars, and order. The polynomials are explained in Functional Fitting Georeferencing Model.

rowDenominator

pType, nVars, order, nCoefficients, and all coefficients of the denominator of the row polynomial, where pType=1 or 2; nVars=0, 2, or 3; 0<=order<=5; and nCoefficients is derived from pType, nVars, and order. The polynomials are explained in Functional Fitting Georeferencing Model.

columnNumerator

pType, nVars, order, nCoefficients, and all coefficients of the numerator of the column polynomial, where pType=1 or 2; nVars=0, 2, or 3; 0<=order<=5; and nCoefficients is derived from pType, nVars, and order. The polynomials are explained in Functional Fitting Georeferencing Model.

columnDenominator

pType, nVars, order, nCoefficients, and all coefficients of the denominator of the column polynomial, where pType=1 or 2; nVars=0, 2, or 3; 0<=order<=5; and nCoefficients is derived from pType, nVars, and order. The polynomials are explained in Functional Fitting Georeferencing Model.

xRMS

The x-dimension accuracy. It is computed using check points if you call SDO_GEOR.georeference using GCPs.

yRMS

The y-dimension accuracy. It is computed using check points if you call SDO_GEOR.georeference using GCPs.

zRMS

The z-dimension accuracy. It is computed using check points if you call SDO_GEOR.georeference using GCPs.

modelTotalRMS

The total model accuracy. It is computed using check points if you call SDO_GEOR.georeference using GCPs.

GCPgeoreferenceModel

The stored function model information, that is, all information about the GCP-based georeferencing model. For information about GCP-based georeferencing model information, see SDO_GEOR_GCPGEOREFTYPE Object Type.

However, when the direct and inverse solutions are derived from the functional fitting model, the accuracy values listed in Table 2-4 are not considered in GeoRaster internal cell coordinate and model coordinate transformation computations for the current release.

The SDO_GEOR_SRS object type has two constructors:

  • One constructor takes no parameters and creates an instance of the type with the isReferenced attribute set to FALSE and the other attributes set to null values. This constructor allows you to set up either the functional fitting model or the stored function (GCP) model, or to set up both of them together.

  • The other constructor takes all the attributes of this object type as parameters, except those related to the stored function (GCP) model.

For examples of how to use the SDO_GEOR_SRS constructor, see the reference section for the SDO_GEOR.setSRS procedure in SDO_GEOR Package Reference.

2.3.7 SDO_GEOR_GCP Object Type

In GeoRaster, the ground control point (GCP) information is stored in the GeoRaster metadata using the XML schema defined in GeoRaster Metadata XML Schema. The SDO_GEOR_GCP object type is used in the PL/SQL API to contain GCP information related to the georeferencing of a GeoRaster object. The metadata and the object type contain the same information. You can use the object type to retrieve the GCP information from GeoRaster objects or to load and update the GCP information in GeoRaster objects.

The SDO_GEOR_GCP object type is defined as:

CREATE TYPE sdo_geor_gcp AS OBJECT (
     pointID          VARCHAR2(32),
     description      VARCHAR2(256),
     pointType        NUMBER,
     cellDimension    NUMBER,
     cellCoordinates  SDO_NUMBER_ARRAY,
     modelDimension   NUMBER,
     modelCoordinates SDO_NUMBER_ARRAY,
     accuracy         SDO_NUMBER_ARRAY,
     status           NUMBER
);

Table 2-5 describes the attributes of the SDO_GEOR_GCP object type.

Table 2-5 SDO_GEOR_GCP Object Type Attributes

Attribute Description

pointID

Unique ID of the control point. Must not more 32 characters.

description

Descriptive information about the control point.

pointType

Point type: 1 (control point) or 2 (check point).

cellDimension

Dimensionality (number of dimensions) of the cell coordinates: 2 or 3.

cellCoordinates

Array of cell coordinates for the control points; (row, column) or (row, column, vertical) for each point.

modelDimension

Dimensionality (number of dimensions) of the model coordinates: 2 or 3.

modelCoordinates

Array of model coordinates for the control point, corresponding to the points in cell space; (X,Y) or (X,Y,Z) for each point.

accuracy

Accuracy of the control point, expressed as the values of (xRMS, yRMS) or (xRMS, yRMS, zRMS).

status

Status of the GCP: Measured, Removed, Estimated, Validated, or Invalid. The value of this column is informational only, and it has no effect on the usage of the GCP by GeoRaster.

The SDO_GEOR_GCP constructor can be used to create an empty instance of this object type. You should then fill in the necessary data before you use this instance.

2.3.8 SDO_GEOR_GCP_ COLLECTION Collection Type

The SDO_GEOR_GCP_ COLLECTION collection type is used to store an array (a collection) of ground control points (GCPs).

The SDO_GEOR_GCP_ COLLECTION collection type is defined as:

CREATE TYPE sdo_geor_gcp_collection VARRAY(1048576) OF SDO_GEOR_GCP;

Related Topics

2.3.9 SDO_GEOR_GCPGEOREFTYPE Object Type

In GeoRaster, the GCP-based georeferencing model information is stored in the GeoRaster metadata using the XML schema defined in GeoRaster Metadata XML Schema. The SDO_GEOR_GCPGEOREFTYPE object includes the georeferencing functional fitting method (that is, the geometric model), control points for solving the model parameters, and solution accuracy. The SDO_GEOR_ GCPGEOREFTYPE object type is used in the PL/SQL API to contain georeferencing model information related to the GCP-based georeferencing of a GeoRaster object. The metadata and the object type contain the same information. You can use the object type to retrieve the georeferencing model information from GeoRaster objects or to load and update the georeferencing model information in GeoRaster objects.

The SDO_GEOR_GCPGEOREFTYPE object type is defined as:

CREATE TYPE sdo_geor_gcpgeoreftype AS OBJECT (
     FFMethodType     VARCHAR2(32),
     numberGCP        NUMBER,
     GCPs             SDO_GEOR_GCP_COLLECTION,
     solutionAccuracy SDO_NUMBER_ARRAY
);

Table 2-6 describes the attributes of the SDO_GEOR_GCPGEOREFTYPE object type.

Table 2-6 SDO_GEOR_GCPGEOREFTYPE Object Type Attributes

Attribute Description

FFMethodType

Functional fitting method. Must be one of the following: Affine, QuadraticPolynomial, CubicPolynomial, DLT, QuadraticRational, or RPC.

numberGCP

Number of ground control points in the GCP collection (GCPs parameter).

GCPs

The GCP collection, of type SDO_GEOR_GCP_COLLECTION (described in SDO_GEOR_GCP_ COLLECTION Collection Type).

solutionAccuracy

Array storing the accuracy of the georeferencing solution in the following format: (rowRMS, columnRMS, totalRMS, xRMS, yRMS, zRMS, modelTotalRMS). The first three RMS numbers are computed using control points, and the last four RMS numbers are computed using check points (if any). This information is for output only; do not store or modify values in this attribute.

The SDO_GEOR_GCPGEOREFTYPE object type has one constructor. The constructor takes no parameters, and it creates an instance of the type with the FFMethodType attribute set to Affine and the other attributes set to null values.