Class GeoprocessingFeatures
- All Implemented Interfaces:
RemoteResource
Corresponds to GPRecordSet and GPFeatureRecordSetLayer parameter types in the service REST specification.
A geoprocessing features has a getFeatures()
method that returns a FeatureSet
. You can call
GeoElement.getAttributes()
on these Feature
s to get the attributes.
Note that these features are not held in a FeatureTable
.
When geoprocessing features are returned as an output parameter the returned results are provided as a
GeoprocessingFeatureSet
. These features can be visualized on a map using temporary
Graphic
in a GraphicsOverlay
or using a FeatureCollectionTable
in
a FeatureLayer
. If the geoprocessing service is configured to use a result
map server, then GeoprocessingResult.getMapImageLayer()
can be used to visualize the results using the
symbology predefined by the service.
When providing geoprocessing features as an input to the GeoprocessingTask
, features can be provided
directly from a FeatureQueryResult
. If there is a
need to create a new set a features or records, FeatureCollectionTable
can
be used.
- Since:
- 100.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class com.esri.arcgisruntime.tasks.geoprocessing.GeoprocessingParameter
GeoprocessingParameter.Type
-
Constructor Summary
ConstructorDescriptionCreates an instance.GeoprocessingFeatures
(FeatureSet featureSet) Creates an instance containing features.Creates an instance based on a URL to features. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates if features can be fetched from the service for an output parameter.Asynchronously requests features from the service.Gets the credential used to authenticate the user with the geoprocessing service.The feature set.Gets the RequestConfiguration object that contains parameters used for sending a network request using this parameter object - SeefetchOutputFeaturesAsync()
.getUrl()
Returns the URL or empty string if this has not been set.void
setCredential
(Credential credential) Sets the credential used to authenticate the user with the geoprocessing service.void
setFeatures
(FeatureSet features) Sets the features.void
setRequestConfiguration
(RequestConfiguration requestConfiguration) Sets the configuration parameters used for sending a network request using this parameter object - SeefetchOutputFeaturesAsync()
.void
Sets the URL.
-
Constructor Details
-
GeoprocessingFeatures
public GeoprocessingFeatures()Creates an instance.- Since:
- 100.0.0
-
GeoprocessingFeatures
Creates an instance containing features.- Parameters:
featureSet
- the set of features- Throws:
IllegalArgumentException
- if featureSet is null- Since:
- 100.0.0
-
GeoprocessingFeatures
Creates an instance based on a URL to features.- Parameters:
url
- the URL- Throws:
IllegalArgumentException
- if the URL is null or empty- Since:
- 100.0.0
-
-
Method Details
-
getUrl
Returns the URL or empty string if this has not been set.- Returns:
- the URL
- Since:
- 100.0.0
-
setUrl
Sets the URL. If a URL is set then any features set withsetFeatures(FeatureSet)
will be ignored.- Parameters:
url
- the URL- Since:
- 100.0.0
-
getFeatures
The feature set. If null is returned then check ifcanFetchOutputFeatures()
is true and if it is usefetchOutputFeaturesAsync()
to populate the result.- Returns:
- the result features
- Since:
- 100.0.0
-
setFeatures
Sets the features. This should only be set when using this instance as an input parameter. This property will be ignored ifsetUrl(String)
is set.- Parameters:
features
- the features to use- Throws:
IllegalArgumentException
- if features is null- Since:
- 100.0.0
-
canFetchOutputFeatures
public boolean canFetchOutputFeatures()Indicates if features can be fetched from the service for an output parameter.- Returns:
- true, if features can be fetched
- Since:
- 100.0.0
-
fetchOutputFeaturesAsync
Asynchronously requests features from the service. It is not necessary to call this ifgetFeatures()
is already populated. Add a done listener to the listenable future to know when this method has completed. Once the future has completed, callinggetFeatures()
will return the features.- Returns:
- a listenable future that will be done when the features have been fetched
- Since:
- 100.0.0
- See Also:
-
getCredential
Gets the credential used to authenticate the user with the geoprocessing service.- Specified by:
getCredential
in interfaceRemoteResource
- Returns:
- the credential used for authentication
- Since:
- 100.0.0
-
setCredential
Sets the credential used to authenticate the user with the geoprocessing service.- Specified by:
setCredential
in interfaceRemoteResource
- Parameters:
credential
- the credential used for authentication- Since:
- 100.0.0
-
getRequestConfiguration
Gets the RequestConfiguration object that contains parameters used for sending a network request using this parameter object - SeefetchOutputFeaturesAsync()
.- Specified by:
getRequestConfiguration
in interfaceRemoteResource
- Returns:
- the RequestConfiguration object or default values if nothing was set
- Since:
- 100.0.0
- See Also:
-
setRequestConfiguration
Sets the configuration parameters used for sending a network request using this parameter object - SeefetchOutputFeaturesAsync()
. The global RequestConfiguration is used if no RequestConfiguration is set.- Specified by:
setRequestConfiguration
in interfaceRemoteResource
- Parameters:
requestConfiguration
- contains the parameters to use- Since:
- 100.0.0
- See Also:
-