ArcGIS Server Banner

Raster datasets and raster catalogs in a geodatabase in SQL Server

Raster datasets and raster catalogs in a geodatabase in SQL Server

Release 9.3 E-mail This TopicPrintable VersionGive Us feedback
Note:This topic was updated for 9.3.1.

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 explanantion 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 ArcCatalog

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

In the Catalog tree, individual raster datasets look like the following:

Raster dataset in ArcCatalog (SQL Server)

If you expand the raster dataset, you will see the raster bands of which it is comprised.

Raster dataset showing bands

A raster catalog in the Catalog tree would appear as follows:

Raster catalog in ArcCatalog (SQL Server)

Raster tables in a SQL Server DBMS

ArcSDE geodatabases in a SQL Server DBMS store raster data in SQL Server's native binary format, which is similar to the way it stores compressed binary feature classes. 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 SQL Server, a raster column is added to the business table of your choice. You can name the raster column whatever you like, so long as it conforms to SQL Server's column naming convention. ArcSDE restricts one raster column per business table.

A raster dataset is made up of seven tables: the business table, feature table, spatial index table, auxiliary, block, band, and raster attribute tables. The following are the business and raster tables for a raster dataset called world_TIF. Dashed lines indicate an implicit relationship between tables.

Tables of a raster dataset in SQL Server

There can also be additional attribute tables as part of the raster dataset or raster catalog. These 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 table name is 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>.

Raster catalogs and datasets are tracked in the system table GDB_RASTERCATALOGS. Like other types of data, raster catalogs and datasets are also tracked in the GDB_OBJECTCLASSES and SDE_layers tables. Columns of type raster are tracked in the SDE_raster_columns table—there is one entry for every table containing a raster column. The layer_id from the SDE_layers table provides the number in the raster tables. In the example accessed by clicking the link below, this number is two and is appended to the SDE_ras, SDE_bnd, SDE_aux, and SDE_blk tables. The example contains the raster dataset tables and system tables of the world_tif raster dataset. (You will need Adobe Acrobat Reader to open the diagram.)

SQL Server raster dataset diagram

The database name fields in the GDB_OBJECTCLASSES, SDE_table_registry, SDE_column_registry, SDE_raster_columns, and SDE_layers table all contain the same value, but to keep the diagram from being too cluttered, the implicit relationship between these fields is not shown. Similarly, the owner fields in all these tables also contain the same value, though the relationship is not drawn on the diagram.

Given the nature of raster data, databases that contain rasters tend to be quite large. Raster datasets and raster catalogs are rarely less 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

The following is a small portion of the content of an XML document for the World raster dataset. The first section is the header; subsequent lines define the dataset.

<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=sde.RJP.world_TIF</CatalogPath> 
       <Name>sde.RJP.world_TIF</Name> 
       <Children xsi:type="esri:ArrayOfDataElement">
          <DataElement xsi:type="esri:DERasterBand">
            <CatalogPath>/V=sde.DEFAULT/RD=sde.RJP.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>