|
ArcGIS Runtime SDK for iOS
100.9
|
A geodatabase on disk.
Instances of this class represent a local geodatabase (.geodatabase file) containing geographic datasets. The geodatabase is based on the SQLite database engine.
AGSGeodatabaseSyncTask to generate and synchronize a geodatabase with a supporting ArcGIS Feature service.
Instance Methods | |
| (BOOL) | - beginTransaction: |
| (void) | - cancelLoad |
| (void) | - close |
| (BOOL) | - commitTransaction: |
| (nullable AGSGeodatabaseFeatureTable *) | - geodatabaseAnnotationTableWithServiceLayerID: |
| (nullable AGSGeodatabaseFeatureTable *) | - geodatabaseAnnotationTableWithTableName: |
| (nullable AGSGeodatabaseFeatureTable *) | - geodatabaseFeatureTableByServiceLayerID: |
| (nullable AGSGeodatabaseFeatureTable *) | - geodatabaseFeatureTableWithName: |
| (BOOL) | - hasLocalEdits |
| (instancetype) | - initWithFileURL: |
| (instancetype) | - initWithName: |
| (void) | - loadWithCompletion: |
| (void) | - retryLoadWithCompletion: |
| (BOOL) | - rollbackTransaction: |
Class Methods | |
| (instancetype) | + geodatabaseWithFileURL: |
| (instancetype) | + geodatabaseWithName: |
Properties | |
| NSURL * | fileURL |
| AGSEnvelope * | generateGeodatabaseExtent |
| AGSGeometry * | generateGeodatabaseGeometry |
| NSArray< AGSGeodatabaseFeatureTable * > * | geodatabaseAnnotationTables |
| NSArray< AGSGeodatabaseFeatureTable * > * | geodatabaseFeatureTables |
| BOOL | inTransaction |
| NSError * | loadError |
| AGSLoadStatus | loadStatus |
| NSInteger | minServerGeneration |
| NSURL * | serviceURL |
| BOOL | syncEnabled |
| NSUUID * | syncID |
| AGSSyncModel | syncModel |
| - (BOOL) beginTransaction: | (NSError **) | error |
Starts a new transaction on the geodatabase. An error will be provided if another transaction is already active on the geodatabase. A geodatabase cannot be synchronized while a transaction is active.
|
requiredinherited |
Cancels loading if it is in progress, otherwise it does nothing. This should be called carefully because other objects could be waiting for loadWithCompletion: or retryLoadWithCompletion: to complete and this will call them all back with the error of NSUserCancelledError
| - (void) close |
Close connection to the geodatabase. All use of a geodatabase should cease before closing it. For example: terminate geodatabase synchronization, remove feature layers from maps, and release feature tables. Any attempt to access a geodatabase after it is closed will fail, resulting in an error. After closing a geodatabase, the geodatabase file can be deleted.
| - (BOOL) commitTransaction: | (NSError **) | error |
Commits changes in the current transaction to the geodatabase. This will also end the transaction. An error will be provided if a transaction has not been started on the geodatabase.
| - (nullable AGSGeodatabaseFeatureTable *) geodatabaseAnnotationTableWithServiceLayerID: | (NSInteger) | serviceLayerID |
Returns a feature table containing annotation features from the geodatabase, as specified by the given feature service layer ID.
| serviceLayerID | The service layer ID of the geodatabase feature table containing annotation features. |
| - (nullable AGSGeodatabaseFeatureTable *) geodatabaseAnnotationTableWithTableName: | (NSString *) | tableName |
Returns a feature table containing annotation features from the geodatabase, as specified by the given tableName.
| tableName | The name of the geodatabase feature table containing annotation. |
| - (nullable AGSGeodatabaseFeatureTable *) geodatabaseFeatureTableByServiceLayerID: | (NSInteger) | serviceLayerID |
Returns a feature table from the geodatabase containing point, line or polygon features, as specified by the given feature service layer ID. The ID must match AGSArcGISFeatureLayerInfo::serviceLayerID
| serviceLayerID | The service layer ID of the geodatabase feature table. |
| - (nullable AGSGeodatabaseFeatureTable *) geodatabaseFeatureTableWithName: | (NSString *) | tableName |
Returns a feature table from the geodatabase containing point, line or polygon features, as specified by the given tableName. If the geodatabase was generated from an ArcGIS Feature service, the name corresponds to a layer in the ArcGIS Feature service (AGSArcGISFeatureLayerInfo::serviceLayerName)
| tableName | The name of the geodatabase feature table. |
| + (instancetype) geodatabaseWithFileURL: | (NSURL *) | fileURL |
Instantiates an existing geodatabase at the given path.
| fileURL | to existing geodatabase (including .geodatabase file extension) |
| + (instancetype) geodatabaseWithName: | (NSString *) | name |
Initialize this object with the name of an existing geodatabase (.geodatabase file), excluding the ".geodatabase" extension, within the application bundle or shared documents directory.
| name | of the geodatabase (excluding the .geodatabase extension) |
| - (BOOL) hasLocalEdits |
Indicates whether the geodatabase has local edits.
| - (instancetype) initWithFileURL: | (NSURL *) | fileURL |
Instantiates an existing geodatabase at the given path.
| fileURL | to existing geodatabase (including .geodatabase file extension) |
| - (instancetype) initWithName: | (NSString *) | name |
Initialize this object with the name of an existing geodatabase (.geodatabase file), excluding the ".geodatabase" extension, within the application bundle or shared documents directory.
| name | of the geodatabase (excluding the .geodatabase extension) |
|
requiredinherited |
Loads data for the object asynchronously. The completion block is invoked upon completion.
You can call this method any number of times, however only one attempt is made to load the data. If it is already loading, it will just continue to load (i.e. not force a reload). If it has already loaded successfully, the completion block will be invoked right away. If it has already failed to load, the completion block will be invoked right away with error previously encountered. This method supports multiple callers and will call them all back on completion. However, each caller's completion block will be invoked once and only once.
| completion | block that is invoked when object loads successfully or fails to load. An error is passed to the block if the object fails to load. |
- cancelLoad to cancel loading - retryLoadWithCompletion: to force reload
|
requiredinherited |
Tries to reload when an object has failed to load. This method should be called judiciously. It should be called when:
cancelLoad and then this methodIf the data hasn't started loading, it will start loading. If it is already loading, it will just continue to load. If it has already loaded successfully, calls back right away. If it has already failed to load, tries again. This method supports multiple callers and will call them all back on completion. However, each caller's completion block will be invoked once and only once.
| completion | block that is invoked when object loads successfully or fails to load. An error is passed to the block if the object fails to load. |
| - (BOOL) rollbackTransaction: | (NSError **) | error |
Discard changes in the current transaction from the geodatabase. This will also end the transaction. An error will be provided if a transaction has not been started on the geodatabase.
|
readnonatomicstrong |
The file URL of the geodatabase.
|
readnonatomicstrong |
The extent used to generate the geodatabase.
AGSGeodatabase::generateGeodatabaseGeometry. A geodatabase can be generated using geometry including an AGSEnvelope or an AGSPolygon - this property will always return the bounding envelope. The AGSGeodatabase::generateGeodatabaseGeometry property will return the underlying geometry. Provided by category AGSGeodatabase(AGSDeprecated).
|
readnonatomicstrong |
The geometry (for example an AGSEnvelope or AGSPolygon) used to generate a sync enabled geodatabase. Edits made to a sync enabled AGSGeodatabase must intersect the geometry used to generate the geodatabase. If an edit is made outside this extent, or area of interest, it will be rejected. This property will return the geometry which was used to create this geodatabase. For example, if the geodatabase was created using an AGSGenerateGeodatabaseJob, this property reflects the AGSGenerateGeodatabaseParameters::extent property. If the geometry was created using an AGSGenerateOfflineMapJob, this property reflects the AGSGenerateOfflineMapParameters::areaOfInterest property. If the geodatabase was downloaded as part of an AGSPreplannedMapArea, this property will match the geometry used by the web map author when the map area was created. If no geometry was used to create the geodatabase (for example if it was authored using ArcGIS Pro), this property may be nil. This property will also be nil until the geodatabase is loaded and the AGSGeodatabase::loadStatus is AGSLoadStatusLoaded.
|
readnonatomiccopy |
The geodatabase feature tables that contain annotation features. An NSArray of AGSGeodatabaseFeatureTable objects. The results will not include feature tables that contain geometries such as points, lines or polygons. The returned array will be empty if the geodatabase itself is not loaded.
|
readnonatomiccopy |
The geodatabase feature tables that contain geometries such as points, lines or polygons. The results will not include feature tables containing annotation features. The returned array will be empty if the geodatabase itself is not loaded.
|
readnonatomicassign |
Indicates whether or not a transaction is active in the geodatabase.
|
readnonatomicstronginherited |
The error that was encountered during the most recent load operation. Will be nil if the operation succeeded.
|
readrequirednonatomicassigninherited |
Status of the load operation.
|
readnonatomicassign |
The minimum server generation number for the geodatabase. Server generation numbers indicate the state of a geodatabase (or individual layers) with respect to changes which have been synced with the online service. The number increases as new changes are applied to the geodatabase. New changes from the online feature service are synced to the local geodatabase. If the AGSGeodatabase::syncModel is AGSSyncModelGeodatabase, the value will indicate the server generation number for the entire geodatabase. If the AGSGeodatabase::syncModel is AGSSyncModelLayer, the value will be the lowest server generation number for all of the layers in the geodatabase.
This property will be -1 if the geodatabase does not support sync (AGSSyncModelNone).
This property will be -1 until the geodatabase's AGSLoadable::loadStatus is AGSLoadStatusLoaded.
Note that this property is only required when using advanced workflows to manually apply pre-generated changes and not when performing a sync directly against the online service.
|
readnonatomicstrong |
The geodatabase service URL.
|
readnonatomicassign |
Indicates whether this geodatabase was originally downloaded from a sync-enabled ArGIS feature service. If YES, its data can be snychronized with the service.
|
readnonatomicstrong |
The sync ID of the geodatabase. Only available if the geodatabase is syncEnabled. The sync ID is the same as the replica ID described in the REST documentation. This is used by the service that created the geodatabase to uniquely identify it when carrying out sync operations. It can also be used when unregistering the geodatabase after it has already been deleted locally using unregisterGeodatabaseWithSyncID:completion: (AGSGeodatabaseSyncTask)
|
readnonatomicassign |
The sync model defining how datasets within this geodatabase can be synchronized with the originating source. Only applicable if this geodatabase was originally downloaded from a sync-enabled ArGIS feature service (syncEnabled).