Class Geodatabase
Represents a mobile geodatabase containing geographic data and non-spatial tables.
Inheritance
Namespace: Esri.ArcGISRuntime.Data
Assembly: Esri.ArcGISRuntime.dll
Syntax
public sealed class Geodatabase
Remarks
Geodatabase is used to open and access the contents of a mobile geodatabase (.geodatabase file) that can contain geographic features, non-spatial tabular data, and data such as attachments, utility networks, field domain definitions, contingent values, and relationships between layers/tables.
Geodatabases can contain one or more geodatabase feature tables. You can create a layer from GeodatabaseFeatureTable tables, as follows:
-
A FeatureLayer from any table returned by GeodatabaseFeatureTables that contains point,
polyline, or polygon features. Check that HasGeometry is
true
. - An AnnotationLayer from any table returned by GeodatabaseAnnotationTables.
- A DimensionLayer from any table returned by GeodatabaseDimensionTables.
You can generate a mobile geodatabase file from an ArcGIS feature service and downloaded it to a device using offline workflows offered by the GeodatabaseSyncTask and the OfflineMapTask. Apps can then operate offline to view and edit the features in these geodatabases. If the geodatabases are enabled for synchronization with the original feature service, edits can be synchronized when connectivity is restored.
Mobile geodatabase files can also be created with ArcGIS Pro. These geodatabases can be used offline but they do not support synchronization with the original feature service. See Build offline applications for more information.
For editing workflows that use a mobile geodatabase, you can use geodatabase transactions to manage a set of edits (transaction). If you start a transaction with BeginTransaction(), you can control when edits are committed (saved) as a single unit using CommitTransaction(). If you decide to discard the edits you can use RollbackTransaction(). If the app unexpectedly disconnects from the geodatabase, any active transaction will be rolled back. If the app crashes, or the user closes the app without saving edits, the transaction will be rolled back and the edits discarded.
Properties
Name | Description |
---|---|
Domains | Gets a list of the domains that exist in the geodatabase. |
GenerateGeodatabaseGeometry | Gets the geometry that was used to generate the sync-enabled geodatabase. |
GeodatabaseAnnotationTables | Gets the collection of GeodatabaseFeatureTable from the database that contain annotation features. |
GeodatabaseDimensionTables | Gets a collection of GeodatabaseFeatureTables that contain dimension features. |
GeodatabaseFeatureTables | Gets a collection of GeodatabaseFeatureTables that contain geometries, such as points, lines, or polygons. |
IsInTransaction | Gets a value indicating whether a transaction is active on the geodatabase. |
MinServerGeneration | Gets the minimum server generation number for the geodatabase. |
Path | Gets the path to the database. |
Source | Gets the ArcGIS REST feature service endpoint. |
SyncId | Gets the sync ID of the geodatabase. |
SyncModel | Gets the SyncModel used to define how datasets within the geodatabase are synchronized with the originating ArcGIS feature service. |
UtilityNetworks | Gets the UtilityNetwork objects that are packaged within the Geodatabase. |
Methods
Name | Description |
---|---|
BeginTransaction() | Starts a transaction on the geodatabase. |
Close() | Closes the connection to the geodatabase. |
CommitTransaction() | Commits the edits in the transaction to the geodatabase. |
CreateAsync(String) | Creates an empty mobile geodatabase at the specified path. |
CreateDomainAsync(DomainDescription) | Creates a new domain in the geodatabase. |
CreateTableAsync(TableDescription) | Creates a new table in the geodatabase. |
DeleteDomainAsync(String) | Deletes the domain with the specified name from the geodatabase. |
DeleteTableAsync(String) | Deletes an existing table from the geodatabase. |
GetGeodatabaseAnnotationTable(Int64) | Returns the GeodatabaseFeatureTable containing annotation features from the geodatabase, as specified by the given feature service layer ID. |
GetGeodatabaseAnnotationTable(String) | Returns the GeodatabaseFeatureTable containing point, line or polygon features, as specified by the given tableName. |
GetGeodatabaseDimensionTable(Int64) | Returns a feature table containing dimension features from the geodatabase, as specified by the given feature service layer ID. |
GetGeodatabaseDimensionTable(String) | Returns a feature table containing dimension features from the geodatabase, as specified by the given tableName. |
GetGeodatabaseFeatureTable(Int64) | Returns the GeodatabaseFeatureTable containing point, line or polygon features, as specified by the given feature service layer ID. |
GetGeodatabaseFeatureTable(String) | Returns the GeodatabaseFeatureTable from the geodatabase as specified by the given |
GetUtilityNetwork(String) | Gets a UtilityNetwork from the geodatabase with the specified utility network name. |
HasLocalEdits() | Returns a value indicating whether database has local edits. |
IsSyncEnabled() | Returns a value indicating sync is enabled for the database. |
OpenAsync(String) | Opens a Geodatabase at the specified path. |
RollbackTransaction() | Rollback the edits in the transaction from the geodatabase. |
Events
Name | Description |
---|---|
TransactionStatusChanged | Occurs when a transaction starts or ends (either committed or rolled back). |
Applies to
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.6 |
.NET | 100.13 - 200.6 |
.NET Windows | 100.13 - 200.6 |
.NET Android | 200.0 - 200.6 |
.NET iOS | 200.0 - 200.6 |
.NET Framework | 100.0 - 200.6 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.6 |