Class PointBarrier
- java.lang.Object
-
- com.esri.arcgisruntime.tasks.networkanalysis.PointBarrier
-
public final class PointBarrier extends Object
Represents a point barrier that can be used to constrain routes generated byRouteTask
. Barriers serve to temporarily restrict, add impedance (cost) to, and scale impedance on parts of the transportation network.- Since:
- 100.0.0
- See Also:
- http://desktop.arcgis.com/en/arcmap/latest/extensions/network-analyst/barriers.htm
-
-
Constructor Summary
Constructors Constructor Description PointBarrier(Point point)
Creates an instance of PointBarrier with the given Point location.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getAddedCost(String attributeName)
Gets the added cost that was set.int
getBarrierId()
Gets the point barrier ID.CurbApproach
getCurbApproach()
Gets the curb approach that was set.Point
getGeometry()
Gets where the barrier is located on the map.LocationStatus
getLocationStatus()
Gets the status of where this barrier appears on the underlying transportation network.String
getName()
Gets the name of the barrier.BarrierType
getType()
Gets the type that was set.void
setAddedCost(String attributeName, double addedCost)
Sets the added cost for the barrier.void
setBarrierId(int barrierId)
Sets the point barrier ID.void
setCurbApproach(CurbApproach curbApproach)
Sets the curb approach.void
setName(String name)
Sets the name of the barrier.void
setType(BarrierType type)
Sets the type of the barrier, whether it fully restricts travel across it, or merely increases the cost of travel.
-
-
-
Constructor Detail
-
PointBarrier
public PointBarrier(Point point)
Creates an instance of PointBarrier with the given Point location.- Parameters:
point
- point where the barrier should be located- Throws:
IllegalArgumentException
- if point is null- Since:
- 100.0.0
-
-
Method Detail
-
getBarrierId
public int getBarrierId()
Gets the point barrier ID.This is a caller supplied foreign key that can be used to associate output point barriers with input point barriers.
- Returns:
- the point barrier ID
- Since:
- 100.6.0
- See Also:
ClosestFacilityParameters.setPointBarriers(Iterable)
,ClosestFacilityParameters.setPointBarriers(ArcGISFeatureTable, QueryParameters)
,ClosestFacilityResult.getPointBarriers()
,RouteParameters.setPointBarriers(Iterable)
,RouteParameters.setPointBarriers(ArcGISFeatureTable, QueryParameters)
,RouteResult.getPointBarriers()
,ServiceAreaParameters.setPointBarriers(Iterable)
,ServiceAreaParameters.setPointBarriers(ArcGISFeatureTable, QueryParameters)
,ServiceAreaResult.getPointBarriers()
-
setBarrierId
public void setBarrierId(int barrierId)
Sets the point barrier ID.This is a caller supplied foreign key that can be used to associate output point barriers with input point barriers.
- Parameters:
barrierId
- the point barrier ID- Since:
- 100.6.0
- See Also:
ClosestFacilityParameters.setPointBarriers(Iterable)
,ClosestFacilityParameters.setPointBarriers(ArcGISFeatureTable, QueryParameters)
,ClosestFacilityResult.getPointBarriers()
,RouteParameters.setPointBarriers(Iterable)
,RouteParameters.setPointBarriers(ArcGISFeatureTable, QueryParameters)
,RouteResult.getPointBarriers()
,ServiceAreaParameters.setPointBarriers(Iterable)
,ServiceAreaParameters.setPointBarriers(ArcGISFeatureTable, QueryParameters)
,ServiceAreaResult.getPointBarriers()
-
getCurbApproach
public CurbApproach getCurbApproach()
Gets the curb approach that was set.- Returns:
- the curb approach. Default value is
CurbApproach.EITHER_SIDE
. - Since:
- 100.0.0
-
setCurbApproach
public void setCurbApproach(CurbApproach curbApproach)
Sets the curb approach. Specifies how the restriction applies to the direction a vehicle may arrive at or depart from the barrier.- Parameters:
curbApproach
- curb approach- Throws:
IllegalArgumentException
- if curbApproach is nullArcGISRuntimeException
- if the curb approach isCurbApproach.NO_UTURN
- Since:
- 100.0.0
-
getType
public BarrierType getType()
Gets the type that was set.- Returns:
- the type. Default value is
BarrierType.RESTRICTION
. - Since:
- 100.0.0
-
setType
public void setType(BarrierType type)
Sets the type of the barrier, whether it fully restricts travel across it, or merely increases the cost of travel.- Parameters:
type
- the current type of this PointBarrier- Throws:
IllegalArgumentException
- if type is null- Since:
- 100.0.0
-
getAddedCost
public double getAddedCost(String attributeName)
Gets the added cost that was set.- 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.0.0
-
setAddedCost
public void setAddedCost(String attributeName, double addedCost)
Sets the added cost for the barrier.- Parameters:
attributeName
- Name of the attribute used to calculate cost. It can be empty. Null is treated as an empty string.addedCost
- added cost- Since:
- 100.0.0
-
getLocationStatus
public LocationStatus getLocationStatus()
Gets the status of where this barrier appears on the underlying transportation network.- Returns:
- the location status. Returns
LocationStatus.NOT_LOCATED
by default. - Since:
- 100.0.0
-
getGeometry
public Point getGeometry()
Gets where the barrier is located on the map.- Returns:
- the geometry
- Since:
- 100.0.0
-
getName
public String getName()
Gets the name of the barrier.- Returns:
- the name of the barrier
- Since:
- 100.3.0
-
setName
public void setName(String name)
Sets the name of the barrier.- Parameters:
name
- the name of the barrier- Since:
- 100.3.0
-
-