ArcGIS Runtime SDK for iOS
100.15
|
A utility network.
This is the central class for utility network schema information and tracing. AGSUtilityNetwork
follows the AGSLoadable
pattern. When it loads, it is populated with the utility network schema. This class provides methods to create AGSUtilityElement
objects for the AGSUtilityNetwork
.
Instance Methods | |
(id< AGSCancelable >) | - associationsWithElement:completion: |
(id< AGSCancelable >) | - associationsWithElement:type:completion: |
(id< AGSCancelable >) | - associationsWithExtent:completion: |
(id< AGSCancelable >) | - associationsWithExtent:type:completion: |
(void) | - cancelLoad |
(nullable AGSUtilityElement *) | - createElementWithAssetType:globalID: |
(nullable AGSUtilityElement *) | - createElementWithAssetType:globalID:terminal: |
(nullable AGSUtilityElement *) | - createElementWithFeature: |
(nullable AGSUtilityElement *) | - createElementWithFeature:terminal: |
(void) | - doCancelLoading |
(void) | - doStartLoading: |
(id< AGSCancelable >) | - featuresForElements:completion: |
(instancetype) | - initWithURL: |
(instancetype) | - initWithURL:map: |
(void) | - loadDidFinishWithError: |
(void) | - loadWithCompletion: |
(void) | - onLoadStatusChanged |
(id< AGSCancelable >) | - queryNamedTraceConfigurationsWithQueryParameters:completion: |
(void) | - retryLoadWithCompletion: |
(id< AGSCancelable >) | - traceWithParameters:completion: |
Class Methods | |
(instancetype) | + utilityNetworkWithURL: |
(instancetype) | + utilityNetworkWithURL:map: |
Properties | |
AGSCredential * | credential |
AGSUtilityNetworkDefinition * | definition |
AGSGeodatabase * | geodatabase |
NSError * | loadError |
AGSLoadStatus | loadStatus |
NSString * | name |
AGSRequestConfiguration * | requestConfiguration |
AGSServiceGeodatabase * | serviceGeodatabase |
NSURL * | URL |
- (id<AGSCancelable>) associationsWithElement: | (AGSUtilityElement *) | element | |
completion: | (void(^)(NSArray< AGSUtilityAssociation * > *__nullable result, NSError *__nullable error)) | completion | |
Finds all AGSUtilityAssociation
objects present in the geodatabase for a given AGSUtilityElement
object . The result is a list of all associations – connectivity associations, containment associations, structural attachment associations – that include the given AGSUtilityElement
object. The method does not return a complete picture of connectivity; features that are connected by geometric coincidence are not returned. Note that the list returned can contain associations that have not yet been validated and are therefore not yet included in the topological index.
element | The AGSUtilityElement whose associations are to be returned. |
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>) associationsWithElement: | (AGSUtilityElement *) | element | |
type: | (AGSUtilityAssociationType) | type | |
completion: | (void(^)(NSArray< AGSUtilityAssociation * > *__nullable result, NSError *__nullable error)) | completion | |
Finds all AGSUtilityAssociation
objects of type AGSUtilityAssociationType
present in the geodatabase for a given AGSUtilityElement
object. The method does not return a complete picture of connectivity; features that are connected by geometric coincidence are not returned. Note that the list returned can contain associations that have not yet been validated and are therefore not yet included in the topological index.
element | The AGSUtilityElement whose associations are to be returned. |
type | The AGSUtilityAssociationType of associations to return. |
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>) associationsWithExtent: | (AGSEnvelope *) | extent | |
completion: | (void(^)(NSArray< AGSUtilityAssociation * > *__nullable result, NSError *__nullable error)) | completion | |
Finds all AGSUtilityAssociation
objects (with their geometry) present in the geodatabase for a given AGSEnvelope
object. The result is a list of connectivity and structural attachment associations. Containment associations are not returned because no geometric relationship is defined between a container and its contents. The method does not return a complete picture of connectivity; features that are connected by geometric coincidence are not returned. Note that the list returned can contain associations that have not yet been validated and are therefore not yet included in the topological index.
extent | The AGSEnvelope that defines the area for which associations to return. |
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>) associationsWithExtent: | (AGSEnvelope *) | extent | |
type: | (AGSUtilityAssociationType) | type | |
completion: | (void(^)(NSArray< AGSUtilityAssociation * > *__nullable result, NSError *__nullable error)) | completion | |
Finds all AGSUtilityAssociation
objects (with their geometry) of type AGSUtilityAssociationType
present in the geodatabase for a given AGSEnvelope
object. Containment associations are not returned because no geometric relationship is defined between a container and its contents; consider using associationsWithElement:type:completion:
instead. The method does not return a complete picture of connectivity; features that are connected by geometric coincidence are not returned. Note that the list returned can contain associations that have not yet been validated and are therefore not yet included in the topological index.
extent | The AGSEnvelope that defines the area for which associations to return. |
type | The AGSUtilityAssociationType of associations to return. |
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. |
|
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
- (nullable AGSUtilityElement *) createElementWithAssetType: | (AGSUtilityAssetType *) | assetType | |
globalID: | (NSUUID *) | globalID | |
Creates an AGSUtilityElement
object from an AGSUtilityAssetType
object and a GlobalID. If the AGSUtilityAssetType
object supports an AGSUtilityTerminalConfiguration
, a default AGSUtilityTerminal
will be assigned.
assetType | The AGSUtilityAssetType object of the feature from which this feature element is created. |
globalID | The GlobalID of the feature from which this feature element is created. |
AGSUtilityElement
object. - (nullable AGSUtilityElement *) createElementWithAssetType: | (AGSUtilityAssetType *) | assetType | |
globalID: | (NSUUID *) | globalID | |
terminal: | (nullable AGSUtilityTerminal *) | terminal | |
Creates an AGSUtilityElement
object from an AGSUtilityAssetType
, a GlobalID, and an optional AGSUtilityTerminal
object. If the optional AGSUtilityTerminal
object is not supplied, and the AGSUtilityAssetType
object supports an AGSUtilityTerminalConfiguration
, a default AGSUtilityTerminal
will be assigned.
assetType | The AGSUtilityAssetType object of the feature from which this feature element is created. |
globalID | The GlobalID of the feature from which this feature element is created. |
terminal | The AGSUtilityTerminal object. |
AGSUtilityElement
object - (nullable AGSUtilityElement *) createElementWithFeature: | (AGSArcGISFeature *) | feature |
Creates an AGSUtilityElement
object from a feature. If the feature's AGSUtilityAssetType
supports an AGSUtilityTerminalConfiguration
, a default AGSUtilityTerminal
will be assigned.
feature | The AGSArcGISFeature from which the feature element is created. |
AGSUtilityElement
object. - (nullable AGSUtilityElement *) createElementWithFeature: | (AGSArcGISFeature *) | feature | |
terminal: | (nullable AGSUtilityTerminal *) | terminal | |
Creates an AGSUtilityElement
object from a feature and an optional AGSUtilityTerminal
. If the optional AGSUtilityTerminal
is not supplied, and the feature's AGSUtilityAssetType
supports an AGSUtilityTerminalConfiguration
, a default AGSUtilityTerminal
will be assigned.
feature | The AGSArcGISFeature object from which the feature element is created. |
terminal | The AGSUtilityTerminal object. |
AGSUtilityElement
object - (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).
- (id<AGSCancelable>) featuresForElements: | (NSArray< AGSUtilityElement * > *) | elements | |
completion: | (void(^)(NSArray< AGSArcGISFeature * > *__nullable result, NSError *__nullable error)) | completion | |
Gets an array of loaded AGSArcGISFeature
objects that each correspond to one of an array of AGSUtilityElement
objects.
elements | The array of utility elements used to find corresponding features. |
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. |
- (instancetype) initWithURL: | (NSURL *) | URL |
Creates an AGSUtilityNetwork
object using the URL to the feature service.
URL | The URL to the feature service. |
- (instancetype) initWithURL: | (NSURL *) | URL | |
map: | (AGSMap *) | map | |
Creates a utility network with the URL to the feature service and a map. Creates a utility network associated with a particular service, using the same AGSArcGISFeatureTable
objects in use by AGSFeatureLayer
objects within the map. This lets any AGSUtilityElement
or AGSArcGISFeature
objects the AGSUtilityNetwork
creates or uses be associated with those existing tables and layers. Usually used when instantiating an AGSUtilityNetwork
object from a web map. This AGSUtilityNetwork
will be added to AGSMap::utilityNetworks
.
URL | The URL to the feature service. |
map | A map that provides feature tables to be reused by the utility network. |
- (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 - (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>) queryNamedTraceConfigurationsWithQueryParameters: | (nullable AGSUtilityNamedTraceConfigurationQueryParameters *) | queryParameters | |
completion: | (void(^)(NSArray< AGSUtilityNamedTraceConfiguration * > *_Nullable result, NSError *_Nullable error)) | completion | |
Queries for an array of AGSUtilityNamedTraceConfiguration
objects from the utility network.
queryParameters | Optional query parameter to filter the results. |
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. |
|
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. |
+ (instancetype) utilityNetworkWithURL: | (NSURL *) | URL |
Creates an AGSUtilityNetwork
object using the URL to the feature service.
URL | The URL to the feature service. |
+ (instancetype) utilityNetworkWithURL: | (NSURL *) | URL | |
map: | (AGSMap *) | map | |
Creates a utility network with the URL to the feature service and a map. Creates a utility network associated with a particular service, using the same AGSArcGISFeatureTable
objects in use by AGSFeatureLayer
objects within the map. This lets any AGSUtilityElement
or AGSArcGISFeature
objects the AGSUtilityNetwork
creates or uses be associated with those existing tables and layers. Usually used when instantiating an AGSUtilityNetwork
object from a web map. This AGSUtilityNetwork
will be added to AGSMap::utilityNetworks
.
URL | The URL to the feature service. |
map | A map that provides feature tables to be reused by the utility network. |
|
readwritenonatomicstronginherited |
Security credentials to access the remote resource. Only applicable if the resource is secured.
|
readnonatomicstrong |
|
readnonatomicweak |
The AGSGeodatabase
object that contains this AGSUtilityNetwork
object.
The AGSGeodatabase
object that contains this AGSUtilityNetwork
object and is also used by the AGSGeodatabaseFeatureTable
object in the AGSUtilityNetworkDefinition::networkSources
property.
Use this property to manage transactions, sync edits, or access tables participating in this AGSUtilityNetwork
object.
This property has a value when the AGSUtilityNetwork
object is retrieved from an AGSGeodatabase
object; otherwise, when created using any of the constructors, this property is nil
.
Note that calling close (AGSGeodatabase)
on an AGSGeodatabase
object that contains this AGSUtilityNetwork
object will render this AGSUtilityNetwork
object unusable. Any attempt to create an element, get associations, get features from elements, or perform a trace after this AGSGeodatabase
object is closed will fail with AGSErrorCodeGDBDatabaseClosed
.
|
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.
|
readnonatomiccopy |
The name of the AGSUtilityNetwork
object. This property is empty when the AGSUtilityNetwork
object is not loaded or AGSUtilityNetwork
is not retrieved from an AGSGeodatabase
object.
|
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.
|
readnonatomicstrong |
The AGSServiceGeodatabase
object of this AGSUtilityNetwork
object.
The AGSServiceGeodatabase
object used by the AGSServiceFeatureTable
object in the AGSUtilityNetworkDefinition::networkSources
property.
Use this property to switch to a branch version, manage edits, or query related records of tables participating in this AGSUtilityNetwork
object.
This property is nil
until the AGSUtilityNetwork
object is loaded. The AGSMap
object that was used to create this AGSUtilityNetwork
object provides this AGSServiceGeodatabase
object. When no matching AGSServiceGeodatabase
object is found in the AGSMap
object, this AGSUtilityNetwork
object will create and load an AGSServiceGeodatabase
object connected to the default version in AGSFeatureServiceSessionTypeTransient
mode.
This property is also nil
when the AGSUtilityNetwork
object is retrieved from an AGSGeodatabase
object.
Note that calling closeWithCompletion: (AGSServiceGeodatabase)
on an AGSServiceGeodatabase
object that is used by an AGSUtilityNetwork
object will render this AGSUtilityNetwork
object unusable. An attempt to create an element, get associations, get features from elements, or perform a trace after this AGSServiceGeodatabase
object is closed will fail with AGSErrorCodeGDBDatabaseClosed
.
|
readrequirednonatomicstronginherited |
The URL of the remote resource.