Class ClosestFacilityResult
- java.lang.Object
-
- com.esri.arcgisruntime.tasks.networkanalysis.ClosestFacilityResult
-
public final class ClosestFacilityResult extends Object
Represents the result ofClosestFacilityTask.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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDirectionsLanguage()
Gets the language used when computing directions.List<Facility>
getFacilities()
Gets a list of the facilities used to calculate the closest facility.List<Double>
getFacilityCosts(String attributeName, int facilityIndex)
Gets the total cost values for a given accumulate attribute and facility.List<Incident>
getIncidents()
Gets a list of the the incidents from which to calculate the closest facility.List<String>
getMessages()
Gets the informational messages that were generated while computing closest facility routes.List<PointBarrier>
getPointBarriers()
Gets the point barriers used in the closest facility route computation.List<PolygonBarrier>
getPolygonBarriers()
Gets the polygon barriers used in the closest facility route computation.List<PolylineBarrier>
getPolylineBarriers()
Gets the polyline barriers used in the closest facility route computation.List<Integer>
getRankedFacilityIndexes(int incidentIndex)
Gets a list of facility indexes for given incident where index is rank level and value is facility index.ClosestFacilityRoute
getRoute(int facilityIndex, int incidentIndex)
Gets the closest facility route by facility and incident indexes.
-
-
-
Method Detail
-
getFacilities
public List<Facility> 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:
ClosestFacilityParameters.setFacilities(Iterable)
,ClosestFacilityParameters.setFacilities(ArcGISFeatureTable, QueryParameters)
-
getIncidents
public List<Incident> 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:
ClosestFacilityParameters.setIncidents(Iterable)
,ClosestFacilityParameters.setIncidents(ArcGISFeatureTable, QueryParameters)
-
getPointBarriers
public List<PointBarrier> 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:
ClosestFacilityParameters.setPointBarriers(Iterable)
,ClosestFacilityParameters.setPointBarriers(ArcGISFeatureTable, QueryParameters)
-
getPolylineBarriers
public List<PolylineBarrier> 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:
ClosestFacilityParameters.setPolylineBarriers(Iterable)
,ClosestFacilityParameters.setPolylineBarriers(ArcGISFeatureTable, QueryParameters)
-
getPolygonBarriers
public List<PolygonBarrier> 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:
ClosestFacilityParameters.setPolygonBarriers(Iterable)
,ClosestFacilityParameters.setPolygonBarriers(ArcGISFeatureTable, QueryParameters)
-
getMessages
public List<String> 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
public String 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
public ClosestFacilityRoute getRoute(int facilityIndex, int incidentIndex)
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
public List<Double> getFacilityCosts(String attributeName, int facilityIndex)
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
public List<Integer> getRankedFacilityIndexes(int incidentIndex)
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
-
-