Class ServiceAreaFacility
- java.lang.Object
 - 
- com.esri.arcgisruntime.tasks.networkanalysis.ServiceAreaFacility
 
 
- 
public final class ServiceAreaFacility extends java.lang.ObjectRepresents service area facility. A facility represents a location from which service areas need to be calculated. For example, a fire station can be set as a facility to find which areas it can serve within a 10 minute service area. A hospital can be set as the facility to find what proportion of the population is within a 2 mile driving distance. Facilities are part ofServiceAreaParameterswhich is used as an input toServiceAreaTask.solveServiceAreaAsync(ServiceAreaParameters).- Since:
 - 100.1.0
 
 
- 
- 
Constructor Summary
Constructors Constructor Description ServiceAreaFacility(Point point)Creates an instance of service area facility. 
- 
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 a given cost attribute 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 service area facility ID.PointgetGeometry()Gets the location the facility should be placed on the map.java.util.List<java.lang.Double>getImpedanceCutoffs()Gets the list of impedance cutoffs.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 a given cost attribute 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 service area facility ID.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
- 
ServiceAreaFacility
public ServiceAreaFacility(Point point)
Creates an instance of service area facility.- Parameters:
 point- location of the service area 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 facility's name, 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- the 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 facility's 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- the facility's curb approach- Throws:
 java.lang.IllegalArgumentException- if curbApproach is null- Since:
 - 100.1.0
 - See Also:
 getCurbApproach()
 
- 
getNetworkLocation
public NetworkLocation getNetworkLocation()
Network location.The service area facility's location on the network that can be populated by service area task.
- Returns:
 - network location, or null if none
 - Since:
 - 100.1.0
 - See Also:
 NetworkLocation
 
- 
setNetworkLocation
public void setNetworkLocation(NetworkLocation networkLocation)
Network location.The service area facility's location on the network that can be populated by service area task. Set to null for resetting a network location.
- Parameters:
 networkLocation- network location- Since:
 - 100.1.0
 - See Also:
 NetworkLocation
 
- 
getImpedanceCutoffs
public java.util.List<java.lang.Double> getImpedanceCutoffs()
Gets the list of impedance cutoffs.Cutoffs specify the quantity of the impedance to apply. They constrain the extent of the service area to be calculated. For example, if you apply cutoffs of 5, 10, and 15 when the impedance is set to Time, the service area will include those streets that can be reached within 5, 10, and 15 minutes. The value specified in the impedance cutoffs property overrides the default cutoffs analysis setting. If no value for the impedance cutoffs property is specified, service areas are generated for the facility based on the default cutoffs setting.
- Returns:
 - a modifiable list of impedance cutoffs
 - Since:
 - 100.1.0
 - See Also:
 ServiceAreaTaskInfo.getDefaultImpedanceCutoffs(),ServiceAreaParameters.getDefaultImpedanceCutoffs()
 
- 
getDistanceToNetworkLocation
public double getDistanceToNetworkLocation()
Gets the distance to the network location in meters.- Returns:
 - the facility's distance to the network location in meters, returns NaN by default
 - Since:
 - 100.1.0
 
 
- 
getFacilityId
public int getFacilityId()
Gets the service area facility ID.This is a caller supplied foreign key that can be used to associate output facilities with input facilities.
- Returns:
 - the service area facility ID
 - Since:
 - 100.6.0
 - See Also:
 ServiceAreaParameters.setFacilities(Iterable),ServiceAreaParameters.setFacilities(ArcGISFeatureTable, QueryParameters),ServiceAreaResult.getFacilities(),setFacilityId(int)
 
- 
setFacilityId
public void setFacilityId(int facilityId)
Sets the service area facility ID.This is a caller supplied foreign key that can be used to associate output facilities with input facilities.
- Parameters:
 facilityId- the service area facility ID- Since:
 - 100.6.0
 - See Also:
 ServiceAreaParameters.setFacilities(Iterable),ServiceAreaParameters.setFacilities(ArcGISFeatureTable, QueryParameters),ServiceAreaResult.getFacilities(),getFacilityId()
 
- 
getLocationStatus
public LocationStatus getLocationStatus()
Gets the location status.- Returns:
 - the facility's location status, returns 
LocationStatus.NOT_LOCATEDby default - Since:
 - 100.1.0
 
 
- 
getGeometry
public Point getGeometry()
Gets the location the facility should be placed on the map.- Returns:
 - the facility's geometry
 - Since:
 - 100.1.0
 
 
- 
getAddedCost
public double getAddedCost(java.lang.String attributeName)
Gets the added cost that was set for a given cost attribute for this facility.All supported attributes can be obtained from
ServiceAreaTaskInfo.getCostAttributes().- Parameters:
 attributeName- the name of the cost attribute, 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 a given cost attribute for this facility.Passing null or empty name of attribute will create an attribute with 0.0 value. All supported attributes can be obtained from
ServiceAreaTaskInfo.getCostAttributes().- Parameters:
 attributeName- the name of the cost attribute, 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 also has to 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 also has to 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
 - See Also:
 setCurrentBearingTolerance(double)
 
- 
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
 - See Also:
 getCurrentBearingTolerance()
 
- 
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:
 setNavigationSpeed(double)
 
 - 
 
 -