Class RasterWorkspaceClass

Namespace
ESRI.ArcGIS.DatasourcesRaster
Assembly
ESRI.Server.DatasourcesRaster.dll
[Guid("AAE25032-35FB-11D2-B1F2-00C04F8EDEFF")]
[ClassInterface(ClassInterfaceType.None)]
public class RasterWorkspaceClass : RasterWorkspace, IWorkspace, IRasterWorkspace, IRasterWorkspace2, IRasterWorkspace3, IDataset, ISupportErrorInfo, IWorkspaceProperties
Inheritance
RasterWorkspaceClass
Implements
Inherited Members

Explicit Interface Implementations

BrowseName

The browse name of the dataset.

virtual string BrowseName { get; set; }

Returns

string

Remarks

BrowseName returns file names without their extension. For example, States.shp would appear as States.

CanCopy()

Indicates if this dataset can be copied.

virtual bool CanCopy()

Returns

bool

CanDelete()

True if this dataset can be deleted.

virtual bool CanDelete()

Returns

bool

Remarks

The CanCopy, CanDelete, and CanRename properties are meant to be used in conjunction with the Copy, Delete, and Rename methods and signify whether a dataset is supported by these methods.  For example, you may not delete a network feature class nor can you use the Copy method on a Geodatabase feature class.  To copy Geodatabase datasets, including feature classes, geometric networks, topologies, etc., use the IGeoDBDataTransfer interface.

CanRename()

True if this dataset can be renamed.

virtual bool CanRename()

Returns

bool

Remarks

The CanCopy, CanDelete, and CanRename properties are meant to be used in conjunction with the Copy, Delete, and Rename methods and signify whether a dataset is supported by these methods.  For example, you may not delete or rename a network feature class nor can you use the Copy method on a Geodatabase feature class.  To copy Geodatabase datasets, including feature classes, geometric networks, topologies, etc., use the IGeoDBDataTransfer interface.

Category

The category of the dataset.

virtual string Category { get; }

Returns

string

Remarks

IDataset::Category returns a description of the category of the dataset.  The description returned from the Category property is the same value that is displayed in the Type column within the Contents tab in ArcCatalog.  The value will contain a description of the dataset such as "Topology" prefixed with a description of the type of workspace containing the dataset such as "File Geodatabase".

The description returned from IDataset::Category may change between releases of ArcGIS. In addition to this, returned strings are localized, meaning that code relying on a specific string being provided may fail when deployed with a different version of ArcGIS than it was developed with, or when deployed to a client using a different language than it was developed with.

ConnectionProperties

The connection properties of the workspace.

virtual IPropertySet ConnectionProperties { get; }

Returns

IPropertySet

Remarks

The ConnectionProperties property of a workspace returns the set of named connection properties for this workspace.

Copy(string, IWorkspace)

Copies this workspace to a new workspace with the specified name.

virtual IDataset Copy(string copyName, IWorkspace copyWorkspace)

Parameters

copyName string
copyWorkspace IWorkspace

Returns

IDataset

CreateRasterBand(string)

Creates a RasterBand in the workspace given its name.

virtual IRasterBand CreateRasterBand(string Name)

Parameters

Name string

Returns

IRasterBand

CreateRasterDataset(string)

Creates a RasterDataset in the workspace given its name.

virtual IRasterDataset CreateRasterDataset(string Name)

Parameters

Name string

Returns

IRasterDataset

Remarks

CreateRasterDataset creates a file based raster dataset, the origin, width, and height of the raster dataset must be specified along with other required parameters, the raster dataset with the specified dimension and default pixel values will be created . The default pixel values of the raster dataset can be modified by writting pixel blocks to the dataset or mosaicking.

CreateRasterDataset can be used to create GRID, TIFF, BMP, ERDAS Imagine, and in memory raster. The strings used to specify formats are "GRID", "TIFF", "BMP", "IMAGINE Image", and "MEM" respectively. The strings are case-sensitive.

For GRID format, CreateRasterDataset only allows square cell size.

When creating an in memory raster, the file name should be an empty string.

 

CreateRasterDataset(string, string, IPoint, int, int, double, double, int, rstPixelType, ISpatialReference, bool)

Creates a RasterDataset in the workspace given its name.

virtual IRasterDataset CreateRasterDataset(string Name, string Format, IPoint Origin, int columnCount, int RowCount, double cellSizeX, double cellSizeY, int numBands, rstPixelType PixelType, ISpatialReference SpatialReference, bool Permanent = true)

Parameters

Name string
Format string
Origin IPoint
columnCount int
RowCount int
cellSizeX double
cellSizeY double
numBands int
PixelType rstPixelType
SpatialReference ISpatialReference
Permanent bool

Returns

IRasterDataset

Remarks

CreateRasterDataset creates a file based raster dataset, the origin, width, and height of the raster dataset must be specified along with other required parameters, the raster dataset with the specified dimension and default pixel values will be created . The default pixel values of the raster dataset can be modified by writting pixel blocks to the dataset or mosaicking.

CreateRasterDataset can be used to create GRID, TIFF, ERDAS Imagine,BMP, Idrisi format,  and in memory raster. The strings used to specify formats are "GRID", "TIFF", "IMAGINE Image", "BMP", "RST", and "MEM" respectively. The strings are case-sensitive.

For GRID format, CreateRasterDataset only allows square cell size.

When creating an in memory raster, the file name can be an empty string.

 

 

 

 

DatasetNames[esriDatasetType]

The DatasetNames in the workspace.

virtual IEnumDatasetName DatasetNames[esriDatasetType DatasetType] { get; }

Parameters

DatasetType esriDatasetType

Returns

IEnumDatasetName

Remarks

The DatasetNames method returns an enumerator over the dataset names in the workspace for the specified dataset type. Name objects are lightweight versions of the geodatabase objects they refer to, while still providing access to some of the properties/methods available in the geodatabase object. From a name object, an instance of the geodatabase object specified by the name object can be created/returned, and vice versa.

See esriDatasetType for more information on dataset types.

Browsing applications should use the DatasetNames method to obtain name objects. These dataset name objects contain the essential properties of the corresponding dataset objects and are faster to retrieve. If the actual dataset specified by a name object is required (for example, because the user selected it), then it can easily be instantiated by calling the Open method on the name object.

Using a dataset type of esriDTAny will return all the datasets or dataset names in the workspace, across all dataset types. Note that these methods return only the top-level datasets in the workspace. In particular, if a workspace contains both stand-alone feature classes and additional feature classes that are part of a feature dataset, then calling the DatasetNames property on the workspace with a dataset type of esriDTFeatureClass will return only the standalone feature classes. To get the feature class names within a feature dataset, the application needs to get the FeatureClassNames property on the top-level feature dataset name returned by the workspace.

Datasets[esriDatasetType]

The datasets in the workspace.

virtual IEnumDataset Datasets[esriDatasetType DatasetType] { get; }

Parameters

DatasetType esriDatasetType

Returns

IEnumDataset

Remarks

The Datasets method returns an enumerator over the datasets in the workspace of the specified dataset type. Not to be confused with DatasetNames, Datasets will return a fully hydrated dataset object.

See esriDatasetType for more information on dataset types.

Using a dataset type of esriDTAny will return all the datasets or datasets in the workspace, across all dataset types. Note that only the top-level datasets in the workspace are returned by these methods. In particular, if a workspace contains both stand-alone feature classes and additional feature classes that are part of a feature dataset, then calling the Datasets property on the workspace with a dataset type of esriDTFeatureClass will return only the standalone feature classes.

Delete()

Deletes this dataset.

virtual void Delete()

Remarks

Certain feature classes, such as network and topology feature classes, cannot be deleted until their containing objects are deleted.

ExecuteSQL(string)

Executes the specified SQL statement.

virtual void ExecuteSQL(string sqlStmt)

Parameters

sqlStmt string

Remarks

The ExecuteSQL method can be used to send an arbitrary SQL statement to the underlying database for execution. The statement can be any DDL (data definition language) or DML (data manipulation language) statement but can not return any result sets. The syntax for the SQL is as required by the underlying database. The workspace supports an optional ISQLSyntax interface that provides information to applications on aspects of the SQL Syntax for the underlying database.

To determine if a workspace supports the ExecutesSQL method, an application can check the value of the canExecuteSQLworkspace property via the optional IWorkspaceProperties interface. In general, this method is only supported on local and remote database workspaces.

Exists()

Checks if the workspace exists.

virtual bool Exists()

Returns

bool

Remarks

This method can be used with workspaces from file-based data sources to detect if they've been deleted by another application. For example, a shapefile workspace is a directory and can be deleted while the workspace is open.

FullName

The associated name object.

virtual IName FullName { get; }

Returns

IName

Remarks

The FullName property returns a Name object for the dataset. The Name object can be persisted and provides a way to get back to the dataset in a future session of the application, via the Open method on the Name object.

IDataset_CanCopy()

True if this dataset can be copied.

virtual bool IDataset_CanCopy()

Returns

bool

Remarks

The CanCopy, CanDelete, and CanRename properties are meant to be used in conjunction with the Copy, Delete, and Rename methods and signify whether a dataset is supported by these methods.  For example, you may not delete a network feature class nor can you use the Copy method on a Geodatabase feature class.  To copy Geodatabase datasets, including feature classes, geometric networks, topologies, etc., use the IGeoDBDataTransfer interface.

The CanCopy method is supported by:

  • CAD Drawings
  • Coverages
  • DBase Tables
  • Info Tables
  • Raster Datasets
  • SDC datasets
  • SDC Network Datasets
  • Shapefiles
  • Shapefile Network Datasets

IDataset_Copy(string, IWorkspace)

Copies this dataset to a new dataset with the specified name.

virtual IDataset IDataset_Copy(string copyName, IWorkspace copyWorkspace)

Parameters

copyName string
copyWorkspace IWorkspace

Returns

IDataset

Remarks

IDataset::Copy should only be used with datasets from file-based data sources, such as shapefiles and coverages.

IDataset_Type

The type of the Dataset.

virtual esriDatasetType IDataset_Type { get; }

Returns

esriDatasetType

Remarks

The Type property returns the an esriDatasetType value indicating the dataset type, such as esriDTTable or esriDTFeatureClass.

IRasterWorkspace2_CanCopy()

Indicates if this dataset can be copied.

virtual bool IRasterWorkspace2_CanCopy()

Returns

bool

IRasterWorkspace2_Copy(string, IWorkspace)

Copies this workspace to a new workspace with the specified name.

virtual IDataset IRasterWorkspace2_Copy(string copyName, IWorkspace copyWorkspace)

Parameters

copyName string
copyWorkspace IWorkspace

Returns

IDataset

Remarks

Not implemented.

IRasterWorkspace2_IsWorkspace(string)

Indicates if the file path specified is a raster workspace.

virtual bool IRasterWorkspace2_IsWorkspace(string Name)

Parameters

Name string

Returns

bool

IRasterWorkspace2_OpenRasterDataset(string)

Opens a RasterDataset in the workspace given its name.

virtual IRasterDataset IRasterWorkspace2_OpenRasterDataset(string Name)

Parameters

Name string

Returns

IRasterDataset

Remarks

OpenRasterDataset  opens a  RasterDataset from a supported file based raster format, such as GRID, Imagine, BMP, TIFF, etc.

InterfaceSupportsErrorInfo(ref Guid)

virtual void InterfaceSupportsErrorInfo(ref Guid riid)

Parameters

riid Guid

IsDirectory()

TRUE if the workspace is a file system directory.

virtual bool IsDirectory()

Returns

bool

IsWorkspace(string)

Indicates if the file path specified is a raster workspace.

virtual bool IsWorkspace(string Name)

Parameters

Name string

Returns

bool

Name

The name of the Dataset.

virtual string Name { get; }

Returns

string

OpenRasterBand(string)

Opens a RasterBand in the workspace given its name.

virtual IRasterBand OpenRasterBand(string Name)

Parameters

Name string

Returns

IRasterBand

OpenRasterDataset(string)

Opens a RasterDataset in the workspace given its name.

virtual IRasterDataset OpenRasterDataset(string Name)

Parameters

Name string

Returns

IRasterDataset

OpenRasterDatasetFromBytes(ref byte[], bool)

Opens a RasterDataset from an in-memry image.

virtual IRasterDataset OpenRasterDatasetFromBytes(ref byte[] ppBytes, bool Copy)

Parameters

ppBytes byte[]
Copy bool

Returns

IRasterDataset

Remarks

This method is used to open a RasterDataset from bytes, an in-memory image, which is normally created from RasterExplorter or IRasterWorkspace2::CreateRasterDataset with "MEM" string.

PathName

The file system full path of the workspace.

virtual string PathName { get; }

Returns

string

Remarks

If a remote workspace is opened using connection properties, this will be empty.

Property[esriWorkspacePropertyGroupType, int]

Information about this particular property.

virtual IWorkspaceProperty Property[esriWorkspacePropertyGroupType propertyGroup, int PropertyType] { get; set; }

Parameters

propertyGroup esriWorkspacePropertyGroupType
PropertyType int

Returns

IWorkspaceProperty

Remarks

The IWorkspaceProperties::Property property has parameters for values from the esriWorkspacePropertyGroup enumeration and either the  esriWorkspacePropertyType enumeration or the esriWorkspaceTablePropertyType enumeration. It returns the value of the requested property as a WorkspaceProperty object.

The PropertySet parameter may require casting an esriWorkspacePropertyType or esriWorkspaceTablePropertyType value to an integer (or long). See the IWorkspaceProperties interface remarks for a discussion on this.

PropertySet

The set of properties for the dataset.

virtual IPropertySet PropertySet { get; }

Returns

IPropertySet

Remarks

Examples of intrinsic properties for which explicit methods exist include the SpatialReference and the Extent methods available on the IGeoDataset interface. In most cases this PropertySet will be empty.

IDataset::PropertySet is not supported for Graph objects such as a Geometric Network.

Rename(string)

Renames this Dataset.

virtual void Rename(string Name)

Parameters

Name string

Remarks

IDataset::Rename does not support the renaming of Graph objects such as a Geometric Network.  In addition, certain feature classes, such as network feature classes, cannot be renamed.

Subsets

Datasets contained within this dataset.

virtual IEnumDataset Subsets { get; }

Returns

IEnumDataset

Remarks

IDataset::Subsets is not supported for Graph objects such as a Geometric Network.  To return the feature classes contained in a Geometric Network, use the IFeatureClassContainer interface.

Type

The Type of the Workspace.

virtual esriWorkspaceType Type { get; }

Returns

esriWorkspaceType

Remarks

See esriWorkspaceType for information on the types of workspaces.

Workspace

The workspace containing this dataset.

virtual IWorkspace Workspace { get; }

Returns

IWorkspace

Remarks

<p>A Workspace is a container of spatial and non-spatial datasets such as feature classes, raster datasets, and tables. It provides methods to instantiate existing datasets and to create new datasets. Workspaces are classified into types specified by the <b><a href="esriWorkspaceType.htm">esriWorkspaceType</a></b> enumerator: FileSystemWorkspace, LocalDatabaseWorkspace, and RemoteDatabaseWorkspace. Shapefiles and ArcGIS for Desktop Advanced workspaces are examples of FileSystemWorkspace. A personal geodatabase stored in an Access or a File Geodatabase is an example of a LocalDatabaseWorkspace. A geodatabase stored in an RDBMS such as Oracle, DB2, SQL Server, or Informix and accessed via ArcSDE is an example of a RemoteDatabaseWorkspace.</p> <p>A Workspace hands out a <b><a href="WorkspaceName.htm">WorkspaceName</a> </b>object as the value of its FullName property. For example, the WorkspaceName for a workspace can be persisted in a map document. An application can call the <b>Open()</b> method on the workspace name after loading it from persistent storage to connect to and get an object reference to the workspace.</p>

WorkspaceFactory

The factory that created the workspace.

virtual IWorkspaceFactory WorkspaceFactory { get; }

Returns

IWorkspaceFactory

Remarks

<CODE> <P>A WorkspaceFactory is a dispenser of workspaces and allows a client to connect to a workspace specified by a set of connection properties. A workspace represents a database or a datasource that contains one or more datasets. Examples of datasets include tables, feature classes and relationship classes. A WorkspaceFactory is a cocreatable, singleton object. A WorkspaceFactory maintains a pool of currently connected, active workspaces that are being referenced by the application. Connection properties are specified using a PropertySet object and can be saved to a connection file. A WorkspaceFactory also supports methods that can be used to browse and manage file system workspaces, and methods to manage connection files for remote database workspaces.</P></CODE>