Represents an ESRI geodatabase which is a container for storing geographic datasets of various types.

Namespace:  ESRI.ArcGISExplorer.Data

Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)

Syntax

C#
public sealed class Geodatabase
Visual Basic (Declaration)
Public NotInheritable Class Geodatabase

Remarks

To open a geodatabase, create a new instance of the Geodatabase class, supplying the appropriate connection information. You can find out the type of a geodatabase using the Type property or about any domains which have been defined using the GetDomains method.

You can explore the contents of a geodatabase using the following methods: GetTables, GetRasters, GetTableRelationships, and GetGeodatabaseFolders. The following geodatabase entities are not discoverable as they are unsupported within the ArcGIS Explorer application: topologies, geometric networks, annotation and dimension feature classes.

The following geodatabase entities can be opened using the appropriate method: feature classes/tables (OpenTable), rasters (OpenRaster), feature datasets (OpenGeodatabaseFolder), and relationship classes (OpenTableRelationship).

For more information on using this class and for code examples, see How to connect to a geodatabase.

Examples

The code below opens a file geodatabase and accesses a feature class and a raster stored within it. A FeatureLayer and Raster layer are created, connected to the underlying data then added to the Map.
CopyC#
//Connect to a file geodatabase
Geodatabase fileGdb = new Geodatabase(@"C:\Data\Scotland.gdb");

//Open a feature class
Table mountainsTable = fileGdb.OpenTable("mountains");
//Create a FeatureLayer and connect it to the feature class
FeatureLayer featureLyr = FeatureLayer.OpenFromTable(mountainsTable);

//Open a raster
Raster cairngormsRaster = fileGdb.OpenRaster("NORTHGORMS_HO");
//Create a RasterLayer and connect it to the raster
RasterLayer rasterLyr = RasterLayer.OpenFromRaster(cairngormsRaster);

//add the layers to the map
Map theMap = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay.Map;
theMap.ChildItems.Add(featureLyr);
theMap.ChildItems.Add(rasterLyr);
CopyVB.NET
'Connect to a file geodatabase
Dim fileGdb As Geodatabase = New Geodatabase("C:\Data\Scotland.gdb")

'Open a feature class
Dim mountainsTable As Table = fileGdb.OpenTable("mountains")
'Create a FeatureLayer and connect it to the feature class
Dim featureLyr As FeatureLayer = FeatureLayer.OpenFromTable(mountainsTable)

'Open a raster
Dim cairngormsRaster As Raster = fileGdb.OpenRaster("NORTHGORMS_HO")
'Create a RasterLayer and connect it to the raster
Dim rasterLyr As RasterLayer = RasterLayer.OpenFromRaster(cairngormsRaster)

'add the layers to the map
Dim theMap As Map = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay.Map
theMap.ChildItems.Add(featureLyr)
theMap.ChildItems.Add(rasterLyr)

Inheritance Hierarchy

System..::.Object

  ESRI.ArcGISExplorer.Data..::.Geodatabase

See Also