A polygon barrier object is used to restrict route solving. More...
| Header | #include <Polygon |
| Since | Esri |
Public Functions
| Polygon | |
| Polygon | |
| Polygon | |
| Polygon | |
| ~ | |
(since Esri int | barrier |
| Esri | barrier |
(since Esri Esri | clone() const |
| Esri | geometry() const |
| bool | is |
(since Esri QString | name() const |
| double | scale |
(since Esri void | set |
| void | set |
| void | set |
(since Esri void | set |
| void | set |
| Esri | operator=( |
| Esri | operator=(const Esri |
Detailed Description
A class that represents a polygon feature to be avoided (or penalized) by a route. A polygon barrier may represent a regional area of interest within the network to be avoided (i.e., not entered) by a route (e.g., a flood zone) or to penalize/delay a route within any portions of the area traversed by the route (e.g., a busy downtown area or a bad neighborhood).
The polygon barrier class is derived from the graphic class.
Relevant samples:
- Route around barriers: Find a route that reaches all stops without crossing any barriers.
Member Function Documentation
PolygonBarrier::PolygonBarrier ()
Default constructor.
[explicit] PolygonBarrier::PolygonBarrier (const Esri::ArcGISRuntime::Polygon &polygon)
Constructor that takes in a polygon.
PolygonBarrier::PolygonBarrier (const Esri::ArcGISRuntime::PolygonBarrier &other)
Copy constructor from other PolygonBarrier.
[noexcept] PolygonBarrier::PolygonBarrier (Esri::ArcGISRuntime::PolygonBarrier &&other)
Move constructor from other PolygonBarrier.
[noexcept] PolygonBarrier::~PolygonBarrier ()
Destructor.
[since Esri::ArcGISRuntime 100.6] int PolygonBarrier::barrierId () const
Returns the polygon barrier ID.
This is a caller supplied foreign key that can be used to associate output polygon barriers with input polygon barriers.
This function was introduced in Esri::ArcGISRuntime 100.6.
See also setBarrierId(), RouteParameters::setPolygonBarriers(Esri::ArcGISRuntime::ArcGISFeatureTable*, const Esri::ArcGISRuntime::QueryParameters&), RouteResult::polygonBarriers, ClosestFacilityParameters::setPolygonBarriersWithFeatureTable(Esri::ArcGISRuntime::ArcGISFeatureTable*, const Esri::ArcGISRuntime::QueryParameters&), ClosestFacilityResult::polygonBarriers, ServiceAreaParameters::setPolygonBarriersWithFeatureTable(Esri::ArcGISRuntime::ArcGISFeatureTable*, const Esri::ArcGISRuntime::QueryParameters&), and ServiceAreaResult::polygonBarriers.
Esri::ArcGISRuntime::BarrierType PolygonBarrier::barrierType () const
Returns the BarrierType of this PolygonBarrier.
See also setBarrierType().
[since Esri::ArcGISRuntime 200.1] Esri::ArcGISRuntime::PolygonBarrier PolygonBarrier::clone() const
Clones the PolygonBarrier to a new instance.
Returns a new instance of the current PolygonBarrier.
This function was introduced in Esri::ArcGISRuntime 200.1.
Esri::ArcGISRuntime::Polygon PolygonBarrier::geometry() const
Returns the Polygon of this PolygonBarrier.
See also setGeometry().
bool PolygonBarrier::isEmpty () const
Returns true if this PolygonBarrier is empty.
[since Esri::ArcGISRuntime 100.3] QString PolygonBarrier::name() const
Returns the name of this PolygonBarrier.
This function was introduced in Esri::ArcGISRuntime 100.3.
See also setName().
double PolygonBarrier::scaleFactorForCost (const QString &attributeName ) const
Returns the scale factor for cost of a given attributeName.
See also setScaleFactorForCost().
[since Esri::ArcGISRuntime 100.6] void PolygonBarrier::setBarrierId (int id)
Sets the id of this barrier.
This function was introduced in Esri::ArcGISRuntime 100.6.
See also barrierId.
void PolygonBarrier::setBarrierType (Esri::ArcGISRuntime::BarrierType type)
Sets the type of this PolygonBarrier.
See also barrierType.
void PolygonBarrier::setGeometry (const Esri::ArcGISRuntime::Polygon &polygon)
Sets the polygon of this PolygonBarrier.
See also geometry.
[since Esri::ArcGISRuntime 100.3] void PolygonBarrier::setName (const QString &name)
Sets the name of this PolygonBarrier.
This function was introduced in Esri::ArcGISRuntime 100.3.
See also name.
void PolygonBarrier::setScaleFactorForCost (const QString &attributeName , double scaleFactorForCost )
Sets the added cost (scaleFactorForCost) for a given attributeName.
See also scaleFactorForCost().
[noexcept] Esri::ArcGISRuntime::PolygonBarrier &PolygonBarrier::operator=(Esri::ArcGISRuntime::PolygonBarrier &&other)
Move operator from other PolygonBarrier.
Esri::ArcGISRuntime::PolygonBarrier &PolygonBarrier::operator=(const Esri::ArcGISRuntime::PolygonBarrier &other)
Assignment operator from other PolygonBarrier.