ArcGIS Server Banner

Raster datasets and raster catalogs in a geodatabase in PostgreSQL

Raster datasets and raster catalogs in a geodatabase in PostgreSQL

Release 9.3 E-mail This TopicPrintable VersionGive Us feedback
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 system. 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 stored in PostgreSQL look like the following:

Raster dataset in ArcCatalog (PostgreSQL)

A raster catalog in the Catalog tree appears as follows:

Raster catalog in ArcCatalog (PostgreSQL)

Raster tables in a PostgreSQL DBMS

ArcSDE geodatabases in a PostgreSQL database store raster data in a bytea column. 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 PostgreSQL, 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 PostgreSQL's column-naming convention. ArcSDE only allows one raster column per business table.

A raster dataset is made up of five tables: business, auxiliary, block, band, and raster. The following are the tables for the raster dataset qa_ras_seattle2_xf.

Raster dataset tables in PostgreSQL

There can also 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 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, sde_table_registry, 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. Click the following link to view the raster dataset tables and system tables of the world_tif raster dataset. Dashed lines indicate implicit relationships between columns, solid lines mean the relationships are explicitly defined, and gray tables are views. You need Adobe Reader to open the diagram.

PostgreSQL raster dataset diagram

The owner field in the gdb_objectclasses, sde_table_registry, sde_column_registry, sde_raster_columns and sde_layers tables all contain the same value, but to keep the diagram from being more cluttered, the implicit relationship between these fields is not shown. The same is true for the database name field in these tables; the values are the same but the relationship is not drawn on the diagram.

Rasters in an XML workspace document

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

<esri:Workspace xmlns:esri="http://www.esri.com/schemas/ArcGIS/9.3" 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=m8db.rocket.qa_ras_seattle2_xf</CatalogPath> 
       <Name>m8db.rocket.qa_ras_seattle2_xf</Name> 
       <Children xsi:type="esri:ArrayOfDataElement">
          <DataElement xsi:type="esri:DERasterBand">
            <CatalogPath>/V=sde.DEFAULT/RD=m8db.rocket.qa_ras_seattle2_xf/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>