ArcGIS Runtime SDK for iOS
100.15
|
An OGC API - Features feature collection table.
To display data from an OGC feature collection table in an AGSFeatureLayer
, use the initWithFeatureTable: (AGSFeatureLayer)
initializer where the AGSOGCFeatureCollectionTable
is the parameter that is passed into the initializer. Note: The AGSOGCFeatureCollectionTable
should not be confused with AGSFeatureCollectionTable
which is used as an input to create an AGSFeatureCollectionLayer
.
The ArcGIS Runtime API for OGC API Features provides the building blocks for manipulating features on the Web. For more information about the OGC API Features specification see the documents: OGC API - Features - Part 1 and OGC API - Features - Part 2.
The class includes two important API: AGSOGCFeatureCollectionTable::featureRequestMode
property and populateFromServiceWithParameters:clearCache:outfields:completion: (AGSOGCFeatureCollectionTable)
method. Only the AGSFeatureRequestModeManualCache
mode is supported. This means populateFromServiceWithParameters:clearCache:outfields:completion: (AGSOGCFeatureCollectionTable)
must be called to populate, query, and return features from the service. For the AGSQueryParameters::whereClause
that is used by the populateFromServiceWithParameters:clearCache:outfields:completion: (AGSOGCFeatureCollectionTable)
method, you can input any CQL2-TEXT or CQL2-JSON string as defined in the document OGC API - Features - Part3.
When populating or updating a local table from an OGC service, you can now request features in a specified AGSSpatialReference
(also referred to as SRS in ArcGIS or CRS in OGC). This leverages the power of the server to return features in the same spatial reference as your map rather than having to re-project them on the client.
This class supports loading and querying of features from a non-spatial OGC feature collection table.
Class Methods | |
(instancetype) | + OGCFeatureCollectionTableWithFeatureCollectionInfo: |
(instancetype) | + OGCFeatureCollectionTableWithURL:collectionID: |
Properties | |
BOOL | canAddFeature |
BOOL | canEditGeometry |
AGSCredential * | credential |
NSString * | displayName |
BOOL | editable |
AGSEnvelope * | extent |
AGSOGCFeatureCollectionInfo * | featureCollectionInfo |
AGSFeatureLayer * | featureLayer |
AGSFeatureRequestMode | featureRequestMode |
NSArray< AGSField * > * | fields |
AGSGeometryType | geometryType |
BOOL | hasGeometry |
BOOL | hasM |
BOOL | hasZ |
AGSLayer * | layer |
NSError * | loadError |
AGSLoadStatus | loadStatus |
NSInteger | numberOfFeatures |
AGSPopupDefinition * | popupDefinition |
BOOL | popupEnabled |
AGSRequestConfiguration * | requestConfiguration |
AGSSpatialReference * | spatialReference |
NSString * | tableName |
NSURL * | URL |
|
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
- (BOOL) canDeleteFeature: | (AGSFeature *) | feature |
Indicates whether the source allows this particular feature to be deleted. The method first checks to verify if the source is capable of deleting any features in general. It also checks specific ownership-based access control policies of the source to see if the user attempting to perform the operation has persmissions to delete this particular feature.
feature | Can be nil, in which case, this method only checks if the source is capable of deleting any features in general |
- (BOOL) canUpdateFeature: | (AGSFeature *) | feature |
Indicates whether the source allows updating this particular feature. The method first checks to verify if the source is capable of updating any features in general. It also checks specific ownership-based access control policies of the source to see if the user attempting to perform the operation has persmissions to edit this patricular feature.
feature | Can be nil, in which case, this method only checks if the source is capable of updating any features in general |
- (AGSFeature *) createFeature |
Create a new, empty feature. Note, the new feature is only available in memory at this point, it is not committed to the dataset.
addFeature:completion:
- (AGSFeature *) createFeatureWithAttributes: | (NSDictionary< NSString *, id > *) | attributes | |
geometry: | (nullable AGSGeometry *) | geometry | |
Create a new feature with the provided attribute values and, optionally, geometry. Note, the new feature is only available in memory at this point, it is not committed to the dataset.
attributes | for the feature |
geometry | for the feature |
addFeature:completion:
- (void) doCancelLoading |
Never call this method directly. The framework calls this method on a background thread when cancelLoad (AGSLoadable-p)
is called. It is meant to be overriden by subclasses. Subclasses should override this method to cancel loading their data and call loadDidFinishWithError: (AGSLoadableBase(ForSubclassEyesOnly))
at the end passing in an error representing NSUserCancelledError
.
Provided by category AGSLoadableBase(ForSubclassEyesOnly).
- (void) doStartLoading: | (BOOL) | retrying |
Never call this method directly. The framework calls this method on a background thread when loadWithCompletion: (AGSLoadable-p)
or retryLoadWithCompletion: (AGSLoadable-p)
is called. It is meant to be overriden by subclasses. Subclasses should override this method to load their data and call loadDidFinishWithError: (AGSLoadableBase(ForSubclassEyesOnly))
upon completion, passing in the error if any.
retrying | flag that is true if this method was called from retryLoadWithCompletion: (AGSLoadable-p) . |
Provided by category AGSLoadableBase(ForSubclassEyesOnly).
- (nullable AGSField *) fieldForName: | (NSString *) | fieldName |
Convenience method to getting a field object given its name
fieldName | The name of the field. |
- (instancetype) initWithFeatureCollectionInfo: | (AGSOGCFeatureCollectionInfo *) | featureCollectionInfo |
Creates a new OGC API - Features feature collection table.
featureCollectionInfo | An AGSOGCFeatureCollectionInfo object. |
- (instancetype) initWithURL: | (NSURL *) | URL | |
collectionID: | (NSString *) | collectionID | |
Initialize a new OGC API - Features feature collection table.
URL | The URL of the OGC API - Features service landing page that contains the feature collection. |
collectionID | The unique identifier for the collection from the service. |
- (void) loadDidFinishWithError: | (nullable NSError *) | error |
Only subclasses should call this method in doStartLoading: (AGSLoadableBase(ForSubclassEyesOnly))
and doCancelLoading (AGSLoadableBase(ForSubclassEyesOnly))
when done loading or failed to load.
Provided by category AGSLoadableBase(ForSubclassEyesOnly).
|
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 + (instancetype) OGCFeatureCollectionTableWithFeatureCollectionInfo: | (AGSOGCFeatureCollectionInfo *) | featureCollectionInfo |
Creates a new OGC API - Features feature collection table.
featureCollectionInfo | An AGSOGCFeatureCollectionInfo object. |
+ (instancetype) OGCFeatureCollectionTableWithURL: | (NSURL *) | URL | |
collectionID: | (NSString *) | collectionID | |
Creates a new OGC API - Features feature collection table.
URL | The URL of the OGC API - Features service landing page that contains the feature collection. |
collectionID | The unique identifier for the collection from the service. |
- (void) onLoadStatusChanged |
Never call this method directly. The framework calls this method on a background thread when AGSLoadable::loadStatus
changes is called. Subclasses can optionally implement this to know when their loading status has changed.
Provided by category AGSLoadableBase(ForSubclassEyesOnly).
- (id<AGSCancelable>) populateFromServiceWithParameters: | (nullable AGSQueryParameters *) | parameters | |
clearCache: | (BOOL) | clearCache | |
outfields: | (nullable NSArray< NSString * > *) | outfields | |
completion: | (void(^)(AGSFeatureQueryResult *__nullable result, NSError *__nullable error)) | completion | |
Populate the OGC API - Features feature collection table with the results of a query.
Use the default (empty) AGSQueryParameters
to get all features from the service. Specifying nil
or an empty NSMutableArray
for outfields
will result in the default set of outfields being used. Spatial queries (those that specify geometries) must use the Intersects spatial relationship.
parameters | Parameters that define how features are returned from the service. |
clearCache | If YES , clears existing table data before populating it with features returned from the service. |
outfields | A list of field names specifying which attribute values (columns) should be included in the table. |
completion | Block that is invoked when the operation finishes. The result parameter is populated if the operation completed successfully, otherwise the error parameter is populated. |
- (id<AGSCancelable>) queryExtentWithParameters: | (AGSQueryParameters *) | parameters | |
completion: | (void(^)(AGSEnvelope *__nullable extent, NSError *__nullable error)) | completion | |
Query the dataset to find the geographic extent covering matched features or records.
parameters | representing the query criteria |
completion | The block that is called when the query is complete |
AGSFeatureServiceSessionType
- (id<AGSCancelable>) queryFeatureCountWithParameters: | (AGSQueryParameters *) | parameters | |
completion: | (void(^)(NSInteger count, NSError *__nullable error)) | completion | |
Query the dataset to find the number of matched features or records.
parameters | representing the query criteria |
completion | The block that is called when the query is complete |
AGSFeatureServiceSessionType
- (id<AGSCancelable>) queryFeaturesWithParameters: | (AGSQueryParameters *) | parameters | |
completion: | (nullable void(^)(AGSFeatureQueryResult *__nullable result, NSError *__nullable error)) | completion | |
Query the dataset to find specific features or records.
parameters | representing the query criteria |
completion | The block that is called when the query is complete |
AGSFeatureServiceSessionType
- (id<AGSCancelable>) queryStatisticsWithParameters: | (AGSStatisticsQueryParameters *) | parameters | |
completion: | (void(^)(AGSStatisticsQueryResult *__nullable result, NSError *__nullable error)) | completion | |
Query the dataset to compute statistics on matched features or records.
parameters | representing the query criteria |
completion | The block that is called when the query is complete |
AGSFeatureServiceSessionType
|
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. |
|
readnonatomicassigninherited |
Indicates whether the source supports adding new features.
|
readnonatomicassigninherited |
Indicates whether the source supports updating geometry of existing features.
|
readwritenonatomicstronginherited |
Security credentials to access the remote resource. Only applicable if the resource is secured.
|
readwritenonatomiccopyinherited |
User-friendly name that can be displayed in the UI (for example in a Table of Contents)
|
readnonatomicassigninherited |
Indicates whether the dataset can be edited. For details on which fine-grained editing capabilites are supported, refer to canUpdateFeature:
and canDeleteFeature:
|
readnonatomicstronginherited |
The extent of the dataset.
|
readnonatomicstrong |
The OGC API - Features feature collection metadata, which includes id, title, and description.
|
readnonatomicweakinherited |
The feature layer this table is associated with, or created from, if any. nil
if this table is not associated with a feature layer. This property is populated when the AGSFeatureLayer
is created from the AGSFeatureTable
.
AGSFeatureTable::layer
instead Provided by category AGSFeatureTable(AGSDeprecated).
|
readwritenonatomicassign |
The mode defining when features are requested from the service.
AGSFeatureRequestModeManualCache
but defaults to AGSFeatureRequestModeOnInteractionCache
. Set the feature request mode to manual before attempting to populate the table.
|
readnonatomiccopyinherited |
|
readnonatomicassigninherited |
The type of geometry used by geographic feautres. Only applicable if hasGeometry
is true.
|
readnonatomicassigninherited |
Indicates whether the dataset contains a geometry field (column). If YES, the dataset contains geographic features. If NO, the dataset contains non-spatial records, similar to a database table.
|
readnonatomicassigninherited |
Indicates whether features may contain M values
|
readnonatomicassigninherited |
Indicates whether features may contain Z values
|
readnonatomicweakinherited |
The layer this table is associated with, or created from, if any. This can be an AGSAnnotationLayer
, an AGSDimensionLayer
, an AGSFeatureLayer
, or nil
if this table is not associated with a layer. This property is populated when the layer is created from the AGSFeatureTable
.
|
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.
|
readnonatomicassigninherited |
The total number of features or records in the dataset.
|
readwritenonatomicstronginherited |
The AGSPopupDefinition
associated with the popup source. This property will be nil
if an error occurs or if the popup source is not associated with a popup definition.
|
readwriterequirednonatomicassigninherited |
Indicates whether popups are enabled on this source.
|
readwritenonatomicstronginherited |
The AGSRequestConfiguration object which defines the behavior and policies to use when accessing the remote resource. The default will be nil. If it is nil the [AGSRequestConfiguration globalConfiguration] will be used.
|
readnonatomicstronginherited |
The spatial reference of the dataset.
|
readnonatomiccopyinherited |
Name of the dataset.
|
readrequirednonatomicstronginherited |
The URL of the remote resource.