Class Facility
- java.lang.Object
 - 
- com.esri.arcgisruntime.tasks.networkanalysis.Facility
 
 
- 
public final class Facility extends java.lang.ObjectRepresents facility. Facility is a location that can serve as the starting point or end point of a closest facility analysis, for example, a fire station or a hospital. Facilities are part ofClosestFacilityParameterswhich is used as an input toClosestFacilityTask.solveClosestFacilityAsync(ClosestFacilityParameters).- Since:
 - 100.1.0
 
 
- 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetAddedCost(java.lang.String attributeName)Gets the added cost that was set for this facility.CurbApproachgetCurbApproach()Gets theCurbApproachthat was set.doublegetCurrentBearing()Gets the current bearing in degrees, measured clockwise from true north.doublegetCurrentBearingTolerance()Gets the current bearing tolerance in degrees.doublegetDistanceToNetworkLocation()Gets the distance to the network location in meters.intgetFacilityId()Gets the facility ID.PointgetGeometry()Gets the location the facility should be placed on the map.doublegetImpedanceCutoff()Gets the impedance cutoff.LocationStatusgetLocationStatus()Gets the location status.java.lang.StringgetName()Gets the name that was set for this facility.doublegetNavigationLatency()Gets the navigation latency in seconds.doublegetNavigationSpeed()Gets the navigation speed in meters per second.NetworkLocationgetNetworkLocation()Network location.voidsetAddedCost(java.lang.String attributeName, double addedCost)Sets the added cost for this facility.voidsetCurbApproach(CurbApproach curbApproach)Sets the direction from which a vehicle may arrive at or depart from the facility.voidsetCurrentBearing(double currentBearing)Sets the current bearing in degrees, measured clockwise from true north.voidsetCurrentBearingTolerance(double currentBearingTolerance)Sets the current bearing tolerance in degrees.voidsetFacilityId(int facilityId)Sets the facility ID.voidsetImpedanceCutoff(double impedanceCutoff)Sets the impedance cutoff.voidsetName(java.lang.String name)Sets the name for this facility.voidsetNavigationLatency(double navigationLatency)Sets the navigation latency in seconds.voidsetNavigationSpeed(double navigationSpeed)Sets the navigation speed in meters per second.voidsetNetworkLocation(NetworkLocation networkLocation)Network location. 
 - 
 
- 
- 
Constructor Detail
- 
Facility
public Facility(Point point)
Creates an instance of facility.- Parameters:
 point- location of the facility- Throws:
 java.lang.IllegalArgumentException- if point is null- Since:
 - 100.1.0
 
 
 - 
 
- 
Method Detail
- 
getName
public java.lang.String getName()
Gets the name that was set for this facility.- Returns:
 - the name of facility. Default value is an empty string
 - Since:
 - 100.1.0
 - See Also:
 setName(String)
 
- 
setName
public void setName(java.lang.String name)
Sets the name for this facility.- Parameters:
 name- facility's name. Null is treated as an empty string- Since:
 - 100.1.0
 - See Also:
 getName()
 
- 
getCurbApproach
public CurbApproach getCurbApproach()
Gets theCurbApproachthat was set.- Returns:
 - the curb approach. Default value is 
CurbApproach.EITHER_SIDE - Since:
 - 100.1.0
 - See Also:
 setCurbApproach(CurbApproach)
 
- 
setCurbApproach
public void setCurbApproach(CurbApproach curbApproach)
Sets the direction from which a vehicle may arrive at or depart from the facility. For example, a school bus must approach and depart a school from its door side so that students entering/exiting the bus will not have to cross the street.- Parameters:
 curbApproach- curb approach- Throws:
 java.lang.IllegalArgumentException- if curbApproach is null- Since:
 - 100.1.0
 - See Also:
 getCurbApproach()
 
- 
getNetworkLocation
public NetworkLocation getNetworkLocation()
Network location.The facility's location on the network that can be populated by closest facility task.
- Returns:
 - network location, or null if none
 - Since:
 - 100.1.0
 - See Also:
 NetworkLocation
 
- 
setNetworkLocation
public void setNetworkLocation(NetworkLocation networkLocation)
Network location.The facility's location on the network that can be populated by closest facility task. Set to null for resetting a network location.
- Parameters:
 networkLocation- network location- Since:
 - 100.1.0
 - See Also:
 NetworkLocation
 
- 
getImpedanceCutoff
public double getImpedanceCutoff()
Gets the impedance cutoff. Default is Double.NaN.For instance, while finding the closest hospitals from the site of an accident, a cutoff value of 15 minutes would mean that the closest facility task would search for the closest hospital within 15 minutes from the incident. If the closest hospital is 17 minutes away, no routes will be returned in the output routes. A cutoff value is especially useful when searching for multiple facilities or incidents. The units for impedance cutoff is based on the value of the
TravelMode.getImpedanceAttributeName(). For example, ifTravelMode.getImpedanceAttributeName()is TravelTime, the defaultImpedanceCutoff is specified in minutes.- Returns:
 - impedance cutoff. Returns Double.NaN by default
 - Since:
 - 100.1.0
 - See Also:
 ClosestFacilityTaskInfo.getDefaultImpedanceCutoff(),ClosestFacilityParameters.getDefaultImpedanceCutoff(),ClosestFacilityParameters.setDefaultImpedanceCutoff(double),setImpedanceCutoff(double)
 
- 
setImpedanceCutoff
public void setImpedanceCutoff(double impedanceCutoff)
Sets the impedance cutoff. Default is Double.NaN.For instance, while finding the closest hospitals from the site of an accident, a cutoff value of 15 minutes would mean that the closest facility task would search for the closest hospital within 15 minutes from the incident. If the closest hospital is 17 minutes away, no routes will be returned in the output routes. A cutoff value is especially useful when searching for multiple facilities or incidents. The units for impedance cutoff is based on the value of the
TravelMode.getImpedanceAttributeName(). For example, ifTravelMode.getImpedanceAttributeName()is TravelTime, the defaultImpedanceCutoff is specified in minutes.- Parameters:
 impedanceCutoff- impedance cutoff- Since:
 - 100.1.0
 - See Also:
 ClosestFacilityTaskInfo.getDefaultImpedanceCutoff(),ClosestFacilityParameters.getDefaultImpedanceCutoff(),ClosestFacilityParameters.setDefaultImpedanceCutoff(double),getImpedanceCutoff()
 
- 
getDistanceToNetworkLocation
public double getDistanceToNetworkLocation()
Gets the distance to the network location in meters.- Returns:
 - the distance to the network location in meters. Returns NaN by default
 - Since:
 - 100.1.0
 
 
- 
getLocationStatus
public LocationStatus getLocationStatus()
Gets the location status.- Returns:
 - the location status. Returns 
LocationStatus.NOT_LOCATEDby default - Since:
 - 100.1.0
 
 
- 
getFacilityId
public int getFacilityId()
Gets the facility ID.This is a caller supplied foreign key that can be used to associate output facilities with input facilities.
- Returns:
 - the facility ID
 - Since:
 - 100.6.0
 - See Also:
 ClosestFacilityParameters.setFacilities(Iterable),ClosestFacilityParameters.setFacilities(ArcGISFeatureTable, QueryParameters),ClosestFacilityResult.getFacilities(),setFacilityId(int)
 
- 
setFacilityId
public void setFacilityId(int facilityId)
Sets the facility ID.This is a caller supplied foreign key that can be used to associate output facilities with input facilities.
- Parameters:
 facilityId- the facility ID- Since:
 - 100.6.0
 - See Also:
 ClosestFacilityParameters.setFacilities(Iterable),ClosestFacilityParameters.setFacilities(ArcGISFeatureTable, QueryParameters),ClosestFacilityResult.getFacilities(),getFacilityId()
 
- 
getGeometry
public Point getGeometry()
Gets the location the facility should be placed on the map.- Returns:
 - the geometry
 - Since:
 - 100.1.0
 
 
- 
getAddedCost
public double getAddedCost(java.lang.String attributeName)
Gets the added cost that was set for this facility.- Parameters:
 attributeName- attribute name. It can be empty. Null is treated as an empty string- Returns:
 - the added cost. Returns 0 if it was not set
 - Since:
 - 100.1.0
 
 
- 
setAddedCost
public void setAddedCost(java.lang.String attributeName, double addedCost)Sets the added cost for this facility.- Parameters:
 attributeName- attribute name. It can be empty. Null is treated as an empty stringaddedCost- added cost- Since:
 - 100.1.0
 
 
- 
getCurrentBearing
public double getCurrentBearing()
Gets the current bearing in degrees, measured clockwise from true north. Typical values are 0 to 360 or NaN, negative values will have 360 added to them (e.g. -15 => 345), values greater than 360 will have 360 subtracted from them (e.g. 385 => 25). For this property to be used, the bearing tolerance must also be set.- Returns:
 - the current bearing
 - Since:
 - 100.7.0
 - See Also:
 setCurrentBearing(double)
 
- 
setCurrentBearing
public void setCurrentBearing(double currentBearing)
Sets the current bearing in degrees, measured clockwise from true north. Typical values are 0 to 360 or NaN, negative values will have 360 added to them (e.g. -15 => 345), values greater than 360 will have 360 subtracted from them (e.g. 385 => 25). For this property to be used, the bearing tolerance must also be set.- Parameters:
 currentBearing- the new value for current bearing- Since:
 - 100.7.0
 - See Also:
 getCurrentBearing()
 
- 
getCurrentBearingTolerance
public double getCurrentBearingTolerance()
Gets the current bearing tolerance in degrees. Valid values are 0 to 180 or NaN.- Returns:
 - the current bearing tolerance
 - Since:
 - 100.7.0
 
 
- 
setCurrentBearingTolerance
public void setCurrentBearingTolerance(double currentBearingTolerance)
Sets the current bearing tolerance in degrees. Valid values are 0 to 180 or NaN.- Parameters:
 currentBearingTolerance- the new value for current bearing tolerance- Throws:
 java.lang.IllegalArgumentException- if currentBearingTolerance is out of range- Since:
 - 100.7.0
 
 
- 
getNavigationLatency
public double getNavigationLatency()
Gets the navigation latency in seconds.- Returns:
 - navigation latency in seconds
 - Since:
 - 100.7.0
 - See Also:
 setNavigationLatency(double)
 
- 
setNavigationLatency
public void setNavigationLatency(double navigationLatency)
Sets the navigation latency in seconds.- Parameters:
 navigationLatency- the new value for navigation latency- Since:
 - 100.7.0
 - See Also:
 getNavigationLatency()
 
- 
getNavigationSpeed
public double getNavigationSpeed()
Gets the navigation speed in meters per second.- Returns:
 - navigation speed in meters per second
 - Since:
 - 100.7.0
 - See Also:
 setNavigationSpeed(double)
 
- 
setNavigationSpeed
public void setNavigationSpeed(double navigationSpeed)
Sets the navigation speed in meters per second.- Parameters:
 navigationSpeed- the new value for navigation speed- Since:
 - 100.7.0
 - See Also:
 getNavigationSpeed()
 
 - 
 
 -