Geodatabase class final

A mobile geodatabase containing geographic data and non-spatial tables.

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 a GeodatabaseFeatureTable tables, as follows:

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 Geodatabase.beginTransaction, you can control when edits are committed (saved) as a single unit using Geodatabase.commitTransaction. If you decide to discard the edits you can use Geodatabase.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.

Implemented types
Mixed in types

Constructors

Geodatabase.withFileUri(Uri fileUri)
Creates a Geodatabase with the name of an existing geodatabase file.
factory

Properties

domains List<Domain>
A collection of the domains that exist in the geodatabase.
no setter
fileUri Uri
The path to the geodatabase.
no setter
generateGeodatabaseGeometry Geometry?
The geometry that was used to generate the sync-enabled geodatabase.
no setter
geodatabaseAnnotationTables List<GeodatabaseFeatureTable>
A collection of GeodatabaseFeatureTable from the geodatabase that contain annotation features.
no setter
geodatabaseDimensionTables List<GeodatabaseFeatureTable>
A collection of GeodatabaseFeatureTable from the geodatabase that contain dimension features.
no setter
geodatabaseFeatureTables List<GeodatabaseFeatureTable>
A collection of GeodatabaseFeatureTable from the geodatabase that contain geometries, such as points, lines or polygons.
no setter
hashCode int
The hash code for this object.
no setterinherited
inTransaction bool
True if a transaction is active on the geodatabase, false otherwise.
no setter
isSyncEnabled bool
True if the geodatabase was originally downloaded from a sync-enabled ArcGIS feature service, false otherwise.
no setter
loadError ArcGISException?
The load error.
no setterinherited
loadStatus LoadStatus
The load status.
no setterinherited
minServerGeneration int
The minimum server generation number for the geodatabase.
no setter
onLoadStatusChanged Stream<LoadStatus>
A stream that reports changes to the LoadStatus.
no setterinherited
onTransactionStatusChanged Stream<bool>
Sets the callback to invoke when a transaction starts or completes on the geodatabase.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serviceUri Uri?
The service URL from which the geodatabase was obtained.
no setter
syncId Guid?
The sync ID of the geodatabase.
no setter
syncModel SyncModel
The sync model defining how datasets within the geodatabase are synchronized with the originating ArcGIS feature service.
no setter

Methods

beginTransaction() → void
Starts a transaction on the geodatabase.
cancelLoad() → void
Cancels loading metadata for the object.
inherited
close() → void
Closes the connection to the geodatabase.
commitTransaction() → void
Commits the edits in the transaction to the geodatabase.
createDomain(DomainDescription domainDescription) Future<Domain>
Creates a new domain in the geodatabase.
createTable(TableDescription tableDescription) Future<GeodatabaseFeatureTable>
Creates a new table in the geodatabase.
deleteDomain({required String domainName}) Future<void>
Deletes the domain with the specified name from the geodatabase.
deleteTable({required String tableName}) Future<void>
Deletes an existing table from the geodatabase.
getGeodatabaseAnnotationTable({required String tableName}) GeodatabaseFeatureTable?
Gets a feature table containing annotation features from the geodatabase, as specified by the given tableName.
getGeodatabaseAnnotationTableByServiceLayerId(int serviceLayerId) GeodatabaseFeatureTable?
Gets a feature table containing annotation features from the geodatabase, as specified by the given feature service layer ID.
getGeodatabaseDimensionTable({required String tableName}) GeodatabaseFeatureTable?
Gets a feature table containing dimension features from the geodatabase, as specified by the given tableName.
getGeodatabaseDimensionTableByServiceLayerId(int serviceLayerId) GeodatabaseFeatureTable?
Gets a feature table containing dimension features from the geodatabase, as specified by the given feature service layer ID.
getGeodatabaseFeatureTable({required String tableName}) GeodatabaseFeatureTable?
Gets a feature table from the geodatabase containing point, line, or polygon features, as specified by the given tableName.
getGeodatabaseFeatureTableByServiceLayerId(int serviceLayerId) GeodatabaseFeatureTable?
Gets a feature table from the geodatabase containing point, line or polygon features, as specified by the given feature service layer ID.
hasLocalEdits() bool
True if the geodatabase has local edits, false otherwise.
load() Future<void>
Loads the metadata for the object asynchronously.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
retryLoad() Future<void>
Loads or retries loading metadata for the object asynchronously.
inherited
rollbackTransaction() → void
Rollback the edits in the transaction from the geodatabase.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

create({required Uri fileUri}) Future<Geodatabase>
Creates an empty mobile geodatabase at the specified path.