Raster datasets and raster catalogs in a geodatabase stored in Oracle

Raster data is spatial data represented in an array of equally sized cells arranged in rows and columns. Raster data can be made up of one or more raster bands. For a complete explanation of raster data and its attributes, see the "Understanding raster data" book in this help. You can start with What is raster data?

Rasters in ArcGIS for Desktop

In ArcGIS, raster data can be stored in a single raster dataset, raster catalog, or mosaic dataset. For a description of these types of raster storage, see Raster data organization.

In the Catalog tree, individual raster datasets in Oracle have the following icon:

Raster dataset icon

A raster catalog in the Catalog tree has the following icon:

Raster catalog icon

The names of raster catalogs and raster datasets in a geodatabase in Oracle contain the name of the owner of the raster catalog or dataset and the name of the raster catalog or raster dataset itself.

For example, a raster dataset, world, owned by user rock would be listed as ROCK.WORLD in the Catalog tree.

For information on how mosaic datasets are stored in a geodatabase, see Mosaic datasets in a geodatabase in Oracle.

Raster tables in an Oracle database

ArcSDE geodatabases in an Oracle database store raster data in either LONG RAW, BLOB, GeoRaster, or ST_Raster storage types.

For rasters stored in Oracle, a raster column is added to a business table, and each cell of the raster column contains a reference to a raster stored in a separate raster table. Therefore, each row of a business table references an entire raster.

When you import a raster into an ArcSDE geodatabase in Oracle, a raster column is added to the business table of your choice. You can name the raster column whatever you like, as long as it conforms to Oracle's column-naming convention. ArcSDE restricts one raster column per business table.

Rasters stored in LONG RAW or BLOB format

A raster dataset stored in LONG RAW or BLOB is made up of seven tables in the geodatabase: the business table, feature table, spatial index table, and the auxiliary, block, band, and raster attribute tables. The following are the business and raster tables for the raster dataset, WORLD_TIF.

NoteNote:

The LONG RAW data type may be deprecated in Oracle in future releases. Therefore, Esri recommends that you do not create new raster datasets using LONG RAW storage.

A BLOB or LONG RAW raster dataset in Oracle

The business table

The business table is a DBMS table that stores attributes and is spatially enabled by adding a raster column. It stores the footprint (delineates the area) of the raster. In the example above, the business table is the WORLD_TIF table.

A business table with a raster column is a raster dataset or a raster catalog. A raster dataset can have only one business table row, while a raster catalog can have more than one. Information about the raster column is maintained in the RASTER_COLUMNS system table. Information about all business tables, regardless of whether they have a spatial column or raster column, is maintained in the TABLE_REGISTRY system table.

The feature table (f<layer_id>)

The feature table stores the geometry of the raster dataset. This table is identified by the number from the LAYER_ID column of the LAYERS table. The relationship between the business table and the feature table is managed through the Feature ID, or FID. This key, which is maintained by ArcSDE, is unique for the spatial column. In the example above, the feature table is F117.

The spatial index table (s<layer_id>)

The spatial index table stores references to shapes based on a simple, regular grid. This table is identified by the number in the LAYER_ID column in the LAYERS table. In the WORLD_TIF raster dataset example, the spatial index table is S117.The spatial index contains an entry for each shape and grid cell combination to support spatial queries. When a spatial query is performed, the grid cells within the search area are identified and used to return a list of candidate pixels.

Raster image tables

The actual raster images are stored in these tables.

NoteNote:

The raster tables are only present in your database if you have raster data in the geodatabase.

SDE_AUX_<raster_column_ID>

The raster auxiliary table stores the image color map; image statistics; and the optional bit mask, which is used for image overlays and mosaicking.

Existing image metadata, such as image statistics, color maps, or bit masks, are automatically stored in the raster auxiliary table. The rasterband_id column of the raster auxiliary table is a foreign key reference to the primary key of the raster bands table. The two tables are joined on this primary/foreign key reference when accessing the metadata of a raster band.

Field name

Field type

Description

Null?

RASTERBAND_ID

NUMBER(38)

A number that represents a raster band; for example, a raster dataset with two raster bands would have two different values in this field—1 and 2.

NOT NULL

TYPE

NUMBER(38)

Values include

NOT NULL

OBJECT

LONG RAW or BLOB

Contains the actual data, either a colormap index, raster statistics, or coordinate transformation

NOT NULL

SDE_BLK_<raster_column_ID>

The raster blocks table stores the actual image data for each band of the image.

The raster blocks table stores the pixels of each raster band. Pixels are tiled into blocks according to a user-defined dimension. ArcGIS applications that import or create raster data in geodatabases have default dimensions. Geoprocessing tools and ArcCatalog, for example, use default raster block dimensions of 128 by 128 pixels per block. The dimensions of the raster block, along with the compression method if one is specified, determine the storage size of each raster block. You should select raster block dimensions that, combined with the compression method, allow each row of the raster block table to fit within the DBMS.

The raster blocks table contains the RASTERBAND_ID column, which is a foreign key reference to the raster band table's RASTERBAND_ID primary key. These tables are joined together on the primary/foreign key reference when accessing the blocks of the raster bands.

For Oracle on Linux, UNIX, and Windows, you should create a very large table space to store the raster blocks (BLK) table and create a second, medium-sized table space to store the remaining raster tables and indexes.

When you create the table spaces for the raster blocks table in Oracle, it is recommended you use an extent size of 64. The extent size specifies the number of page-size pages that will be written to a container before proceeding to the next container. The extent size is defined at the time of table space creation and cannot be easily modified afterward.There is an additional type of raster table—the raster attribute table. These tables store attribute values based on cell values in the raster.

The raster blocks table is populated according to a declining resolution pyramid. The height of the pyramid is determined by the number of levels, specified by application. The application, such as geoprocessing tools or ArcCatalog, might allow you to define the levels, request that the geodatabase calculate them, or offer both choices. The pyramid begins at the base, or level 0, which contains the original pixels of the image. The pyramid proceeds toward the apex by coalescing four pixels from the previous level into a single pixel at the current level. This process continues until it reaches the apex, which may be automatically defined or user defined.

The additional levels of the pyramid increase the number of raster blocks by as much as one-third. However, since you can specify the number of levels, the size of the pyramid can be less. The first level of the pyramid will be 25 percent of the base. It should also be noted that the first level of the pyramid can be skipped, a factor that can greatly reduce the size of the pyramid.

A raster pyramid
A raster pyramid

When you build a pyramid, more rasters are created by progressively downsampling the previous level by a factor of two until the apex. As the application zooms out and the raster cells grow smaller than the resolution threshold, a higher level of the pyramid is selected. The purpose of the pyramid is to optimize display performance.

Field name

Field type

Description

Null?

RASTERBAND_ID

NUMBER(38)

A number that represents a raster band; for example, a raster dataset with two raster bands would have two different values in this field—1 and 2.

NOT NULL

RRD_FACTOR

NUMBER(38)

Pyramid level; pyramid levels begin at 0 and can increase from there.

NOT NULL

ROW_NBR

NUMBER(38)

Tile row number position

NOT NULL

COL_NBR

NUMBER(38)

Column row number position

NOT NULL

BLOCK_DATA

LONG RAW or BLOB

Pixel data stored in the tile

NOT NULL

SDE_BND_<raster_column_id>

The raster band table stores information about the bands of the images. There is one record for each raster band.

Geodatabases store raster bands in the raster bands table. The raster bands table is joined to the raster table on the RASTER_ID column. The RASTER_ID of the raster band table column is a foreign key reference to the raster table primary key.

Field name

Field type

Description

Null?

RASTERBAND_ID

NUMBER(38)

A number that represents a raster band; for example, a raster dataset with two raster bands would have two different values in this field—1 and 2.

NOT NULL

SEQUENCE_NBR

NUMBER(38)

Sequence of the raster band within the raster dataset

NOT NULL

RASTER_ID

NUMBER(38)

The unique identifier of the raster dataset; corresponds to the value in the raster column of the business table

NOT NULL

NAME

NVARCHAR2(65)

The optional raster band name

BAND_FLAGS

NUMBER(38)

A bitmask containing properties about the band

NOT NULL

BAND_WIDTH

NUMBER(38)

The pixel width of the band

NOT NULL

BAND_HEIGHT

NUMBER(38)

The pixel height of the band

NOT NULL

BAND_TYPES

NUMBER(38)

A bit mask containing properties about the band

NOT NULL

BLOCK_WIDTH

NUMBER(38)

The pixel width of a block

NOT NULL

BLOCK_HEIGHT

NUMBER(38)

The pixel height of a block

NOT NULL

BLOCK_ORIGIN_X

NUMBER(64)

The x-coordinate of the raster origin

NOT NULL

BLOCK_ORIGIN_Y

NUMBER(64)

The y-coordinate of the raster origin.

NOT NULL

EMINX

NUMBER(64)

The minimum x-value of a raster band

NOT NULL

EMINY

NUMBER(64)

The minimum y-value of a raster band

NOT NULL

EMAXX

NUMBER(64)

The maximum y-value in a raster band

NOT NULL

EMAXY

NUMBER(64)

The maximum y-value in a raster band

NOT NULL

CDATE

NUMBER(38)

The creation date of the raster band

NOT NULL

MDATE

NUMBER(38)

The last modification date of the raster band

NOT NULL

SDE_RAS_<raster_column_id>

The raster description table stores the description of the images within a raster column.

Field name

Field type

Description

Null?

RASTER_ID

NUMBER(38)

The unique identifier of the raster dataset; corresponds to the value in the raster column of the business table

NOT NULL

RASTER_FLAGS

NUMBER(38)

Reserved for future use

DESCRIPTION

NVARCHAR2(65)

The description of the raster dataset

Other system tables to track rasters

Like other types of data, raster catalogs and datasets are tracked in the GDB_ITEMS and LAYERS tables. Columns of type raster are tracked in the RASTER_COLUMNS table—there is one entry for every table containing a raster column.

There can be additional attribute tables as part of the raster dataset or raster catalog. There would only ever be one raster attribute table per raster dataset, but raster catalogs could have several such tables. The raster attribute tables are used to define attributes for particular raster cell values. See Raster dataset attribute tables for information on using these tables.

You can use the Build Raster Attribute tool of the Raster Properties toolset in the Raster toolset of the Data Management toolbox. See the topic Build Raster Attribute Table (Data Management) for details on this tool.

For raster datasets, the additional attribute tables are named in the format SDE_VAT_<raster_column_ID>. For raster catalogs, the table name is in the format SDE_VAT_<raster_column_ID>_<Object_ID>.

View a diagram of a raster dataset using binary storage in Oracle.

Dashed lines indicate implicit relationships between columns.

NoteNote:

You need Adobe Acrobat Reader to open the file.

Rasters stored in ST_Raster format

ST_Raster is a user-defined object type that is made up of subtypes. A raster dataset that uses ST_Raster storage is made up of three tables: the business table, auxiliary table, and block tables. When ST_Raster storage is used in a geodatabase, the equivalent information that would be stored in the raster and raster band tables for binary rasters is part of the ST_Raster object in the base table. The ST_Raster object also stores the geometry for the raster.

Rasters stored in ST_Raster format have auxiliary (SDE_AUX_<raster_ID>) and block (SDE_BLK_<raster_ID>) tables (see the "Raster image tables" section of this topic), but do not use raster band (SDE_BND_<raster_ID>) or raster (SDE_RAS_<raster_ID>) tables.

Similarly, there is no f-table for ST_Raster; the ST_Raster object itself stores the geometry.

View a diagram of a raster dataset using ST_Raster storage in Oracle.

Dashed lines indicate implicit relationships between columns.

NoteNote:

You need Adobe Acrobat Reader to open the file.

Rasters stored in Oracle GeoRaster format

Rasters stored in Oracle GeoRaster format in a geodatabase have a business table with a column of type MDSYS.GEORASTER. This information is tracked in the Oracle metadata schema. The MDSYS.GEORASTER column contains components similar to the following:

Name

Example component value

RASTER

SDO_GEORASTER

RASTERTYPE

20001

SPATIALEXTENT

SDO_GEOMETRY

SDO_GTYPE

2003

SDO_SRID

NULL

SDO_POINT

NULL

SDE_ELEM_INFO

SDO_ELEM_INFO_ARRAY(1,1003,3)

SDO_ORDINATES

SDO_ORDINATE(0,0,0256,256)

RASTERDATATABLE

'SDE_RDT_1897'

RASTERID

2

METADATA

XMLTYPE(<georasterMetadata xmlns="http://xmlns.oracle.com/spatial/georaster"> <objectI)

NoteNote:

The metadata column is very long, so to view it with SQL*Plus, you must increase both the LONGSIZE and PAGESIZE SQL*Plus environments and query it directly as follows:

set LONG 20000
set PAGESIZE 500

The pixel data for each SDO_GEORASTER column is stored in a separate raster data table. The SDO_GEORASTER data tables created by ArcSDE are SDE_RDT_<raster_column_id> where <rastercolumn_id> is the raster_column_id field in the RASTER_COLUMN table, which uniquely identifies that raster column within the ArcSDE metadata. ArcSDE uses the BLK_STORAGE DBTUNE storage parameter to control the Oracle storage parameters of the SDE_RDT_<rastercolumn_id> table. For a description of this table and its fields, consult chapter 1 of the Oracle Spatial GeoRaster documentation provided by Oracle.

The SDE_RDT_<raster_column_id> is defined as follows:

Field name

Field type

RASTERID

NUMBER

PYRAMIDLEVEL

NUMBER

BANDBLOCKNUMBER

NUMBER

ROWBLOCKNUMBER

NUMBER

COLUMNBLOCKNUMBER

NUMBER

BLOCKMBR

MDSYS.SDO_GEOMETRY

RASTERBLOCK

BLOB

View a diagram of a raster dataset using SDO_GeoRaster storage in Oracle.

NoteNote:

You need Adobe Acrobat Reader to open the file.

Given the nature of raster data, databases that contain rasters tend to be quite large. Raster datasets and catalogs are rarely smaller than a few gigabytes (GB) and can occupy several terabytes (TB) within your DBMS. Coping with the large size of raster data can, therefore, be a challenge. For recommendations and examples of how to manage your raster data in an ArcSDE geodatabase, see the white paper Raster Data in ArcSDE, which can be downloaded from the ArcSDE support site at support.esri.com.

Rasters in an XML document

Raster datasets are enclosed in DataElement tags in an XML document. The tags have the value "esri:DERasterDataset".

<esri:Workspace xmlns:esri="http://www.esri.com/schemas/ArcGIS/9.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <WorkspaceDefinition xsi:type="esri:WorkspaceDefinition">
   <WorkspaceType>esriRemoteDatabaseWorkspace</WorkspaceType> 
   <Version>sde.DEFAULT</Version> 
   <Domains xsi:type="esri:ArrayOfDomain" /> 
   <DatasetDefinitions xsi:type="esri:ArrayOfDataElement">
     <DataElement xsi:type="esri:DERasterDataset">
       <CatalogPath>/V=sde.DEFAULT/RD=ROCK.world_TIF</CatalogPath> 
       <Name>ROCK.world_TIF</Name> 
       <Children xsi:type="esri:ArrayOfDataElement">
          <DataElement xsi:type="esri:DERasterBand">
            <CatalogPath>/V=sde.DEFAULT/RD=ROCK.world_TIF/RB=Band_1</CatalogPath> 
            <Name>Band_1</Name> 
            <DatasetType>esriDTRasterBand</DatasetType> 
            <DSID>-1</DSID> 
            <Versioned>false</Versioned> 
            <CanVersion>false</CanVersion> 
            <HasOID>true</HasOID> 
            <OIDFieldName>ObjectID</OIDFieldName> 
            <Fields xsi:type="esri:Fields">
              <FieldArray xsi:type="esri:ArrayOfField">
                <Field xsi:type="esri:Field">
                    <Name>ObjectID</Name> 
                    <Type>esriFieldTypeOID</Type> 
                    <IsNullable>false</IsNullable> 
                    <Length>4</Length> 
                    <Precision>0</Precision> 
                    <Scale>0</Scale> 
                    <Required>true</Required> 
                    <Editable>false</Editable> 
                </Field>
                <Field xsi:type="esri:Field">
                    <Name>Value</Name> 
                    <Type>esriFieldTypeInteger</Type> 
                    <IsNullable>true</IsNullable> 
                    <Length>0</Length> 
                    <Precision>0</Precision> 
                    <Scale>0</Scale> 
               </Field>
               <Field xsi:type="esri:Field">
                    <Name>Count</Name> 
                    <Type>esriFieldTypeInteger</Type> 
                    <IsNullable>true</IsNullable> 
                    <Length>0</Length> 
                    <Precision>0</Precision> 
                    <Scale>0</Scale> 
               </Field>
             </FieldArray>
         </Fields>
         <Indexes xsi:type="esri:Indexes">
           <IndexArray xsi:type="esri:ArrayOfIndex" /> 
         </Indexes>
         <IsInteger>true</IsInteger> 
         <MeanCellHeight>0.175996089009095</MeanCellHeight> 
         <MeanCellWidth>0.176000337991447</MeanCellWidth> 
         <Height>1024</Height> 
         <Width>2048</Width> 
         <PixelType>U8</PixelType> 
         <PrimaryField>1</PrimaryField> 
         <TableType>esriRasterTableValue</TableType> 
         <Extent xsi:type="esri:EnvelopeN">
            <XMin>-179.906382261841</XMin> 
            <YMin>-90.1303147686327</YMin> 
            <XMax>180.542309944643</XMax> 
            <YMax>90.089680376681</YMax> 
            <SpatialReference xsi:type="esri:GeographicCoordinateSystem">
   <WKT>GEOGCS["GCS_WGS_1984", DATUM["D_WGS_1984", SPHEROID["WGS_1984",6378137.0,298.257223563]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.0174532925199433]]</WKT> 
          <XOrigin>-400</XOrigin> 
          <YOrigin>-400</YOrigin> 
          <XYScale>11258999068426.2</XYScale> 
          <ZOrigin>0</ZOrigin> 
          <ZScale>1</ZScale> 
          <MOrigin>0</MOrigin> 
          <MScale>1</MScale> 
          <XYTolerance>8.98315284119521E-09</XYTolerance> 
          <ZTolerance>2</ZTolerance> 
          <MTolerance>2</MTolerance> 
          <HighPrecision>true</HighPrecision> 
          <LeftLongitude>-180</LeftLongitude> 
         </SpatialReference>
        </Extent>
      </Data>
    </DatasetData>
   </WorkspaceData>
</esri:Workspace>
4/2/2015