Module com.esri.arcgisruntime
Class ClosestFacilityResult
java.lang.Object
com.esri.arcgisruntime.tasks.networkanalysis.ClosestFacilityResult
Represents the result of
ClosestFacilityTask.solveClosestFacilityAsync(ClosestFacilityParameters)
.
The result is a collection of computed closest facility routes, barriers used in the computation,
and messages generated during the process.- Since:
- 100.1.0
-
Method Summary
Modifier and TypeMethodDescriptionGets the language used when computing directions.Gets a list of the facilities used to calculate the closest facility.getFacilityCosts
(String attributeName, int facilityIndex) Gets the total cost values for a given accumulate attribute and facility.Gets a list of the the incidents from which to calculate the closest facility.Gets the informational messages that were generated while computing closest facility routes.Gets the point barriers used in the closest facility route computation.Gets the polygon barriers used in the closest facility route computation.Gets the polyline barriers used in the closest facility route computation.getRankedFacilityIndexes
(int incidentIndex) Gets a list of facility indexes for given incident where index is rank level and value is facility index.getRoute
(int facilityIndex, int incidentIndex) Gets the closest facility route by facility and incident indexes.
-
Method Details
-
getFacilities
Gets a list of the facilities used to calculate the closest facility.- Returns:
- an unmodifiable list of the facilities
- Since:
- 100.1.0
- See Also:
-
getIncidents
Gets a list of the the incidents from which to calculate the closest facility.- Returns:
- an unmodifiable list of the incidents
- Since:
- 100.1.0
- See Also:
-
getPointBarriers
Gets the point barriers used in the closest facility route computation. Only available ifClosestFacilityParameters.setReturnPointBarriers(boolean)
is set.- Returns:
- an unmodifiable list of the point barriers
- Since:
- 100.1.0
- See Also:
-
getPolylineBarriers
Gets the polyline barriers used in the closest facility route computation. Only available ifClosestFacilityParameters.setReturnPolylineBarriers(boolean)
is set.- Returns:
- an unmodifiable list of the polyline barriers
- Since:
- 100.1.0
- See Also:
-
getPolygonBarriers
Gets the polygon barriers used in the closest facility route computation. Only available ifClosestFacilityParameters.setReturnPolygonBarriers(boolean)
is set.- Returns:
- an unmodifiable list of the polygon barriers
- Since:
- 100.1.0
- See Also:
-
getMessages
Gets the informational messages that were generated while computing closest facility routes.- Returns:
- an unmodifiable list of the messages
- Since:
- 100.1.0
-
getDirectionsLanguage
Gets the language used when computing directions. The list of supported languages can be obtained by callingClosestFacilityTaskInfo.getSupportedLanguages()
.- Returns:
- the directions language
- Since:
- 100.1.0
-
getRoute
Gets the closest facility route by facility and incident indexes.- Parameters:
facilityIndex
- the facility's indexincidentIndex
- the incident's index- Returns:
- closest facility route
- Since:
- 100.1.0
-
getFacilityCosts
Gets the total cost values for a given accumulate attribute and facility.- Parameters:
attributeName
- attribute's namefacilityIndex
- facility's index- Returns:
- an unmodifiable list of total cost values for the specified attribute
- Throws:
IllegalArgumentException
- if attributeName is null or emptyIllegalArgumentException
- if facilityIndex is negative- Since:
- 100.1.0
-
getRankedFacilityIndexes
Gets a list of facility indexes for given incident where index is rank level and value is facility index.// get the index of closest facility for incident with index 3 int closestFacilityIndex = getRankedFacilityIndexes(3).get(0); // rank of facility is 0 // get the index of second closest facility for incident with index 3 int secondClosestFacilityIndex = getRankedFacilityIndexes(3).get(1); // rank of facility is 1
- Parameters:
incidentIndex
- incident's index- Returns:
- an unmodifiable list of ranked facility indexes for given incident
- Throws:
IllegalArgumentException
- if incidentIndex is negative- Since:
- 100.1.0
-