com.esri.arcgis.geodatabase
Interface IRasterWorkspaceEx

All Superinterfaces:
Serializable
All Known Implementing Classes:
IRasterWorkspaceExProxy, Sde4Workspace, Workspace

public interface IRasterWorkspaceEx
extends Serializable

Provides access to members that create and open raster catalogs and datasets.

Remarks

Available at ArcGIS 9.0, the IRasterWorkspaceEx interface works with raster datasets and raster catalogs in the geodatabase including Personal, File and ArcSDE geodatabases. It allows the creation of new raster datasets and raster catalogs in the geodatabase, it also opens and deletes existing raster datasets and raster catalogs in the geodatabase. The IRasterWorkspaceEx interface also allows saving a given raster to a raster dataset in the geodatabase. Its counterpart is IRasterWorkspace and IRasterWorkspace2 that works with file-based rasters.

The following examples show how to create a geodatabase workspace as a RasterWorkspace:

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux


Method Summary
 IRasterCatalog createRasterCatalog(String name, IFields fields, String shapeFieldName, String rasterFieldName, String configKeyword)
          Creates a new raster catalog.
 IRasterDataset createRasterDataset(String name, int numBands, int pixelType, IRasterStorageDef storageDef, String configKeyword, IRasterDef rasterDef, IGeometryDef geometryDef)
          Creates a new raster dataset.
 void deleteRasterCatalog(String name)
          Deletes a raster catalog.
 void deleteRasterDataset(String name)
          Deletes a raster dataset.
 IRasterCatalog openRasterCatalog(String name)
          Opens an existing raster catalog.
 IRasterDataset openRasterDataset(String name)
          Opens an existing raster dataset.
 void registerAsRasterCatalog(String name, String oIDFieldName, IGeometryDef geometryDef)
          Registers as a RasterCatalog.
 void registerAsRasterDataset(String name, IGeometryDef geometryDef)
          Registers as a RasterDataset.
 IRasterDataset saveAsRasterDataset(String name, IRaster raster, IRasterStorageDef storageDef, String configKeyword, IRasterDef rasterDef, IGeometryDef geometryDef)
          Creates a new raster dataset from another seed Raster.
 

Method Detail

createRasterDataset

IRasterDataset createRasterDataset(String name,
                                   int numBands,
                                   int pixelType,
                                   IRasterStorageDef storageDef,
                                   String configKeyword,
                                   IRasterDef rasterDef,
                                   IGeometryDef geometryDef)
                                   throws IOException,
                                          AutomationException
Creates a new raster dataset.

Description

The CreateRasterDataset method creates a new empty raster dataset in the geodatabase, whereby it is basically a placeholder for some attributes of a raster dataset, such as the number of bands, pixel type, RASTER column properties, and GEOMETRY column properties. Once you have created an empty raster dataset in the geodatabase, you can append raster data to it by mosaicking. If the GeometryDef argument is not specified, a default GeometryDef will be created using the according values (for example, spatial reference) set in the RasterDef argument. Since the geometry column is not accessed or updated, there is no need to set the GeometryDef when creating a raster dataset.

If cellsize in the RasterStorageDef is not specified or set to NULL, the new raster dataset will have an undefined cellsize, the cellsize will be set to the cellsize of the first raster that is mosaicked to it.

If spatial reference in the RasterDef is not specified or set to NULL, the new raster dataset will have an unknown spatial reference, the spatial reference will be set to the spatial reference of the first raster that is mosaicked to it.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
name - The name (in)
numBands - The numBands (in)
pixelType - A com.esri.arcgis.geodatabase.rstPixelType constant (in)
storageDef - A reference to a com.esri.arcgis.geodatabase.IRasterStorageDef (in)
configKeyword - The configKeyword (in)
rasterDef - A reference to a com.esri.arcgis.geodatabase.IRasterDef (in)
geometryDef - A reference to a com.esri.arcgis.geodatabase.IGeometryDef (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IRasterDataset
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

saveAsRasterDataset

IRasterDataset saveAsRasterDataset(String name,
                                   IRaster raster,
                                   IRasterStorageDef storageDef,
                                   String configKeyword,
                                   IRasterDef rasterDef,
                                   IGeometryDef geometryDef)
                                   throws IOException,
                                          AutomationException
Creates a new raster dataset from another seed Raster.

Remarks

The SaveAsRasterDataset method provides a way to save any raster as a raster dataset in the geodatabase. It is similar to the CreateRasterDataset method, but instead of creating an empty raster dataset, it copies the input raster properties and pixels to the output raster dataset in the geodatabase. If you want to keep the spatial reference of the input raster dataset for both raster column and geometry column, you can pass nothing to the RasterDef argument and GeometryDef argument.


Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
name - The name (in)
raster - A reference to a com.esri.arcgis.geodatabase.IRaster (in)
storageDef - A reference to a com.esri.arcgis.geodatabase.IRasterStorageDef (in)
configKeyword - The configKeyword (in)
rasterDef - A reference to a com.esri.arcgis.geodatabase.IRasterDef (in)
geometryDef - A reference to a com.esri.arcgis.geodatabase.IGeometryDef (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IRasterDataset
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

openRasterDataset

IRasterDataset openRasterDataset(String name)
                                 throws IOException,
                                        AutomationException
Opens an existing raster dataset.

Remarks

The OpenRasterDataset method opens a raster dataset in the geodatabase. It provides access to the RasterDataset geodatabase workspace.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
name - The name (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IRasterDataset
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deleteRasterDataset

void deleteRasterDataset(String name)
                         throws IOException,
                                AutomationException
Deletes a raster dataset.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
name - The name (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

registerAsRasterDataset

void registerAsRasterDataset(String name,
                             IGeometryDef geometryDef)
                             throws IOException,
                                    AutomationException
Registers as a RasterDataset.

Remarks

The RegisterAsRasterDataset method allows you to upgrade an 8.x raster dataset to a 9.x raster dataset in ArcSDE geodatabase, because an 8.x raster dataset doesn’t have a GEOMETRY column in its business table while a 9.x raster dataset does. This method only applies to ArcSDE geodatabase raster dataset. It is necessary to register an 8.x raster dataset to a 9.x raster dataset in order for the raster dataset to be recognized in any Geoprocessing tools.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
name - The name (in)
geometryDef - A reference to a com.esri.arcgis.geodatabase.IGeometryDef (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createRasterCatalog

IRasterCatalog createRasterCatalog(String name,
                                   IFields fields,
                                   String shapeFieldName,
                                   String rasterFieldName,
                                   String configKeyword)
                                   throws IOException,
                                          AutomationException
Creates a new raster catalog.

Remarks

The CreateRasterCatalog method creates a new empty raster catalog in a Personal, File or ArcSDE geodatabase. At releases prior to 9.2, When you create a raster catalog, you need to set the x/y domain on the GeometryDef properly to cover the extents of all the rasters you will be loading to the raster catalog. If the extent of a raster dataset is beyond the specified x/y domain of the GeometryDef, it will not be loaded. Since 9.2, the x/y domain is optimized according to the spatial reference of the geometry column, so you do not need to set it manually.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
name - The name (in)
fields - A reference to a com.esri.arcgis.geodatabase.IFields (in)
shapeFieldName - The shapeFieldName (in)
rasterFieldName - The rasterFieldName (in)
configKeyword - The configKeyword (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IRasterCatalog
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

openRasterCatalog

IRasterCatalog openRasterCatalog(String name)
                                 throws IOException,
                                        AutomationException
Opens an existing raster catalog.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
name - The name (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IRasterCatalog
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deleteRasterCatalog

void deleteRasterCatalog(String name)
                         throws IOException,
                                AutomationException
Deletes a raster catalog.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
name - The name (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

registerAsRasterCatalog

void registerAsRasterCatalog(String name,
                             String oIDFieldName,
                             IGeometryDef geometryDef)
                             throws IOException,
                                    AutomationException
Registers as a RasterCatalog.

Remarks

The RegisterAsRasterCatalog method provides a way to upgrade an 8.x embedded raster catalog to a 9.x raster catalog, because an 8.x raster catalog doesn’t have an OID or a GEOMETRY type column in its business table while a 9.x raster catalog does. This method will add these two columns to the raster catalog table and populate the Geometry column with the extent of each raster dataset in the raster catalog. This method works only with ArcSDE geodatabase.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
name - The name (in)
oIDFieldName - The oIDFieldName (in)
geometryDef - A reference to a com.esri.arcgis.geodatabase.IGeometryDef (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.