ArcGIS Runtime SDK for iOS: AGSWFSFeatureTable Class Reference
ArcGIS Runtime SDK for iOS  100.15
AGSWFSFeatureTable Class Reference

Description

Represents a table in an OGC Web Feature Service.

Remarks
Features from WFS feature tables can be visualized using feature layers. WFS feature table does not support editing. At 100.5, WFS feature table only supports manually requesting features and does not automatically request features when added to a feature layer. Use populateFromServiceWithRequestXML or populateFromServiceWithParameters to populate the table. Use AGSWFSService to connect to a WFS service and discover available layers that can be opened using a WFS feature table via initWithLayerInfo.
Since
100.5
Inheritance diagram for AGSWFSFeatureTable:
AGSFeatureTable <AGSRemoteResource> AGSLoadableBase <AGSPopupSource> AGSObject <AGSLoadable>

Instance Methods

(id< AGSCancelable >) - addFeature:completion:
 
(id< AGSCancelable >) - addFeatures:completion:
 
(void) - cancelLoad
 
(BOOL) - canDeleteFeature:
 
(BOOL) - canUpdateFeature:
 
(AGSFeature *) - createFeature
 
(AGSFeature *) - createFeatureWithAttributes:geometry:
 
(id< AGSCancelable >) - deleteFeature:completion:
 
(id< AGSCancelable >) - deleteFeatures:completion:
 
(void) - doCancelLoading
 
(void) - doStartLoading:
 
(nullable AGSField *) - fieldForName:
 
(instancetype) - initWithLayerInfo:
 
(instancetype) - initWithURL:tableName:
 
(void) - loadDidFinishWithError:
 
(void) - loadWithCompletion:
 
(void) - onLoadStatusChanged
 
(id< AGSCancelable >) - populateFromServiceWithParameters:clearCache:outFields:completion:
 
(id< AGSCancelable >) - populateFromServiceWithRequestXML:clearCache:completion:
 
(id< AGSCancelable >) - queryExtentWithParameters:completion:
 
(id< AGSCancelable >) - queryFeatureCountWithParameters:completion:
 
(id< AGSCancelable >) - queryFeaturesWithParameters:completion:
 
(id< AGSCancelable >) - queryStatisticsWithParameters:completion:
 
(void) - retryLoadWithCompletion:
 
(id< AGSCancelable >) - updateFeature:completion:
 
(id< AGSCancelable >) - updateFeatures:completion:
 

Class Methods

(instancetype) + WFSFeatureTableWithLayerInfo:
 
(instancetype) + WFSFeatureTableWithURL:tableName:
 

Properties

AGSOGCAxisOrder axisOrder
 
BOOL canAddFeature
 
BOOL canEditGeometry
 
AGSCredentialcredential
 
NSString * displayName
 
BOOL editable
 
AGSEnvelopeextent
 
AGSFeatureLayerfeatureLayer
 
AGSFeatureRequestMode featureRequestMode
 
NSArray< AGSField * > * fields
 
AGSOGCAxisOrder filterAxisOrder
 
AGSGeometryType geometryType
 
BOOL hasGeometry
 
BOOL hasM
 
BOOL hasZ
 
AGSLayerlayer
 
AGSWFSLayerInfolayerInfo
 
NSError * loadError
 
AGSLoadStatus loadStatus
 
NSInteger numberOfFeatures
 
AGSPopupDefinitionpopupDefinition
 
BOOL popupEnabled
 
AGSSpatialReferencepreferredSpatialReference
 
AGSRequestConfigurationrequestConfiguration
 
AGSSpatialReferencespatialReference
 
NSString * tableName
 
NSURL * URL
 

Method Documentation

◆ cancelLoad

- (void) cancelLoad
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

Since
100

◆ canDeleteFeature:

- (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.

Parameters
featureCan be nil, in which case, this method only checks if the source is capable of deleting any features in general
Returns
A boolean value
Since
100

◆ canUpdateFeature:

- (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.

Parameters
featureCan be nil, in which case, this method only checks if the source is capable of updating any features in general
Returns
A boolean value
Since
100

◆ createFeature

- (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.

Returns
empty feature
Since
100
Note
The feature will need to be explicitly added to the dataset. See addFeature:completion:

◆ createFeatureWithAttributes:geometry:

- (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.

Parameters
attributesfor the feature
geometryfor the feature
Returns
feature
Since
100
Note
The feature will need to be explicitly added to the dataset. See addFeature:completion:

◆ doCancelLoading

- (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.

Since
100

Provided by category AGSLoadableBase(ForSubclassEyesOnly).

◆ doStartLoading:

- (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.

Parameters
retryingflag that is true if this method was called from retryLoadWithCompletion: (AGSLoadable-p).
Since
100

Provided by category AGSLoadableBase(ForSubclassEyesOnly).

◆ fieldForName:

- (nullable AGSField *) fieldForName: (NSString *)  fieldName

Convenience method to getting a field object given its name

Parameters
fieldNameThe name of the field.
Returns
field
Since
100

◆ initWithLayerInfo:

- (instancetype) initWithLayerInfo: (AGSWFSLayerInfo *)  layerInfo

Creates a new WFS feature table.

Parameters
layerInfoAn AGSWFSLayerInfo.
Since
100.5

◆ initWithURL:tableName:

- (instancetype) initWithURL: (NSURL *)  URL
tableName: (NSString *)  tableName 

Creates a new WFS feature table.

Parameters
URLThe URL of the WFS service to connect to.
tableNameThe name of the WFS feature table object.
Since
100.5

◆ loadDidFinishWithError:

- (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.

Since
100

Provided by category AGSLoadableBase(ForSubclassEyesOnly).

◆ loadWithCompletion:

- (void) loadWithCompletion: (nullable void(^)(NSError *__nullable error))  completion
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.

Parameters
completionblock that is invoked when object loads successfully or fails to load. An error is passed to the block if the object fails to load.
Note
The completion block is always invoked on the main thread.
Since
100
See also
- cancelLoad to cancel loading
- retryLoadWithCompletion: to force reload

◆ onLoadStatusChanged

- (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.

Since
100

Provided by category AGSLoadableBase(ForSubclassEyesOnly).

◆ populateFromServiceWithParameters:clearCache:outFields:completion:

- (id<AGSCancelable>) populateFromServiceWithParameters: (AGSQueryParameters *)  parameters
clearCache: (BOOL)  clearCache
outFields: (nullable NSArray< NSString * > *)  outFields
completion: (nullable void(^)(AGSFeatureQueryResult *__nullable result, NSError *__nullable error))  completion 

Manually populate the table using a query.

Specifying nil or an empty array for outFields will result in the default set of outFields being used.

Remarks
Use the default (empty) AGSQueryParameters to get all features from the service. WFS is only compatible with a subset of possible queries defined by AGSQueryParameters. Where clause only works when the table is backed by a service powered by GeoServer. Spatial queries (those that specify a geometry) must use the Intersects spatial relationship.
Parameters
parametersdefining which data should be requested from the service and added to the table
clearCacheIf true, existing data will be cleared before adding the new data
outFieldsA list of field names specifying which attribute values (columns) should be included in the table.
completionblock that is invoked when the operation finishes. The result parameter is populated if the operation completed successfully, otherwise the error parameter is populated.
Returns
operation which can be canceled
Since
100.5

◆ populateFromServiceWithRequestXML:clearCache:completion:

- (id<AGSCancelable>) populateFromServiceWithRequestXML: (NSString *)  requestXML
clearCache: (BOOL)  clearCache
completion: (nullable void(^)(AGSFeatureQueryResult *__nullable result, NSError *__nullable error))  completion 

Manually populate the table using an XML query.

Parameters
requestXMLA string containing the XML of the complete GetFeature request including but not limited to filters, joins, and aliases.
clearCacheIf true, existing data will be cleared before adding the new data.
completionA block that is invoked when the operation finishes. The result parameter is populated if the operation completed successfully, otherwise the error parameter is populated.
Remarks
The schema of the query result must match or be a subset of the schema of the feature table. Queries must be made against the same feature type represented by the wfs feature table.
Returns
The operation which can be canceled.
Since
100.5

◆ queryExtentWithParameters:completion:

- (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
parametersrepresenting the query criteria
completionThe block that is called when the query is complete
Returns
operation which can be canceled
See also
AGSFeatureServiceSessionType
Since
100.2

◆ queryFeatureCountWithParameters:completion:

- (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
parametersrepresenting the query criteria
completionThe block that is called when the query is complete
Returns
operation which can be canceled
See also
AGSFeatureServiceSessionType
Since
100.2

◆ queryFeaturesWithParameters:completion:

- (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
parametersrepresenting the query criteria
completionThe block that is called when the query is complete
Returns
operation which can be canceled
See also
AGSFeatureServiceSessionType
Since
100

◆ queryStatisticsWithParameters:completion:

- (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
parametersrepresenting the query criteria
completionThe block that is called when the query is complete
Returns
operation which can be canceled
See also
AGSFeatureServiceSessionType
Since
100.2

◆ retryLoadWithCompletion:

- (void) retryLoadWithCompletion: (nullable void(^)(NSError *__nullable error))  completion
requiredinherited

Tries to reload when an object has failed to load. This method should be called judiciously. It should be called when:

  1. you didn't have network connectivity earlier when it failed and you want to retry now that you have connectivity
  2. the server was down earlier when it failed and you want to retry
  3. the request is taking too long and you want to cancel it and retry, in which case you will first call cancelLoad and then this method

If 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.

Parameters
completionblock that is invoked when object loads successfully or fails to load. An error is passed to the block if the object fails to load.
Note
The completion block is always invoked on the main thread.
Since
100

◆ WFSFeatureTableWithLayerInfo:

+ (instancetype) WFSFeatureTableWithLayerInfo: (AGSWFSLayerInfo *)  layerInfo

Creates a new WFS feature table.

Parameters
layerInfoAn AGSWFSLayerInfo.
Since
100.5

◆ WFSFeatureTableWithURL:tableName:

+ (instancetype) WFSFeatureTableWithURL: (NSURL *)  URL
tableName: (NSString *)  tableName 

Creates a new WFS feature table.

Parameters
URLThe URL of the WFS service to connect to.
tableNameThe name of the WFS feature table object.
Since
100.5

Property Documentation

◆ axisOrder

- (AGSOGCAxisOrder) axisOrder
readwritenonatomicassign

The axis order, which defines how coordinates are interpreted (X,Y or Y,X).

Remarks
Some WFS services return coordinates in (X,Y) order, while others use (Y,X). Setting this property to Swap will result in all coordinates in geometries being swapped from what was sent by the server. Setting to NoSwap will cause coordinates to be interpreted as-is. Defaults to Auto. In this mode, Runtime will make its best guess using heuristics that are optimized for good results with most popular WFS services. Axis order may be changed on an already-loaded feature table, but the change will only affect future calls to populateFromService. Features that are already in the table will not be modified/swapped.
Since
100.5

◆ canAddFeature

- (BOOL) canAddFeature
readnonatomicassigninherited

Indicates whether the source supports adding new features.

Since
100

◆ canEditGeometry

- (BOOL) canEditGeometry
readnonatomicassigninherited

Indicates whether the source supports updating geometry of existing features.

Since
100

◆ credential

- (AGSCredential*) credential
readwritenonatomicstronginherited

Security credentials to access the remote resource. Only applicable if the resource is secured.

Since
100

◆ displayName

- (NSString*) displayName
readwritenonatomiccopyinherited

User-friendly name that can be displayed in the UI (for example in a Table of Contents)

Since
100.3

◆ editable

- (BOOL) editable
readnonatomicassigninherited

Indicates whether the dataset can be edited. For details on which fine-grained editing capabilites are supported, refer to canUpdateFeature: and canDeleteFeature:

Since
100

◆ extent

- (AGSEnvelope*) extent
readnonatomicstronginherited

The extent of the dataset.

Since
100

◆ featureLayer

- (AGSFeatureLayer*) featureLayer
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.

Since
100.0
Deprecated:
100.7.0. Use AGSFeatureTable::layer instead

Provided by category AGSFeatureTable(AGSDeprecated).

◆ featureRequestMode

- (AGSFeatureRequestMode) featureRequestMode
readwritenonatomicassign

The mode defining when features are requested from the service.

Remarks
At v100.5, WFS feature table only supports ManualCache but defaults to OnInteractionCache. Set the feature request mode to Manual before attempting to populate the table with populateFromServiceWithParameters or populateFromServiceWithRequestXML.
Since
100.5

◆ fields

- (NSArray<AGSField*>*) fields
readnonatomiccopyinherited

Array of AGSField objects representing the fields (columns) in the dataset.

See also
AGSField
Since
100

◆ filterAxisOrder

- (AGSOGCAxisOrder) filterAxisOrder
readwritenonatomicassign

The filter axis order, which determines how coordinates are ordered when sent to the server as part of spatial queries (those that specify a Geometry).

Remarks
Some WFS services expect coordinates to be sent in (X,Y) order, while others use (Y,X). Use Swap to send coordinates in (Y,X) order and NoSwap to use (X,Y) order. Defaults to Auto.
Since
100.5

◆ geometryType

- (AGSGeometryType) geometryType
readnonatomicassigninherited

The type of geometry used by geographic feautres. Only applicable if hasGeometry is true.

Since
100

◆ hasGeometry

- (BOOL) hasGeometry
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.

Since
100

◆ hasM

- (BOOL) hasM
readnonatomicassigninherited

Indicates whether features may contain M values

Since
100.2

◆ hasZ

- (BOOL) hasZ
readnonatomicassigninherited

Indicates whether features may contain Z values

Since
100.2

◆ layer

- (AGSLayer*) layer
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.

Since
100.7

◆ layerInfo

- (AGSWFSLayerInfo*) layerInfo
readnonatomicstrong

Metadata describing the WFS layer.

Since
100.5

◆ loadError

- (NSError*) loadError
readnonatomicstronginherited

The error that was encountered during the most recent load operation. Will be nil if the operation succeeded.

Since
100

◆ loadStatus

- (AGSLoadStatus) loadStatus
readrequirednonatomicassigninherited

Status of the load operation.

Since
100

◆ numberOfFeatures

- (NSInteger) numberOfFeatures
readnonatomicassigninherited

The total number of features or records in the dataset.

Since
100

◆ popupDefinition

- (AGSPopupDefinition*) popupDefinition
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.

Since
100

◆ popupEnabled

- (BOOL) popupEnabled
readwriterequirednonatomicassigninherited

Indicates whether popups are enabled on this source.

Since
100

◆ preferredSpatialReference

- (AGSSpatialReference*) preferredSpatialReference
readwritenonatomicstrong

The preferred spatial reference for the WFS feature table.

Remarks
If the preferred spatial reference isn't available from the service, the table will fail to load. Preferred spatial reference must be set before loading the table. Set preferred spatial reference to match the map or scene's spatial reference to avoid automatic reprojection of features.
Since
100.5

◆ requestConfiguration

- (AGSRequestConfiguration*) requestConfiguration
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.

Since
100

◆ spatialReference

- (AGSSpatialReference*) spatialReference
readnonatomicstronginherited

The spatial reference of the dataset.

Since
100

◆ tableName

- (NSString*) tableName
readnonatomiccopyinherited

Name of the dataset.

Since
100

◆ URL

- (NSURL*) URL
readrequirednonatomicstronginherited

The URL of the remote resource.

Since
100