Skip To Content ArcGIS for Developers Sign In Dashboard

PolygonBarrier Class

(Esri::ArcGISRuntime::PolygonBarrier)

A polygon indicating where the network analysis should not traverse. More...

Header: #include <PolygonBarrier>
Since: Esri::ArcGISRuntime 100.0

Public Functions

PolygonBarrier()
PolygonBarrier(const Polygon &polygon)
PolygonBarrier(const PolygonBarrier &other)
PolygonBarrier(PolygonBarrier &&other)
~PolygonBarrier()
int barrierId() const
BarrierType barrierType() const
Polygon geometry() const
bool isEmpty() const
QString name() const
double scaleFactorForCost(const QString &attributeName) const
void setBarrierId(int id)
void setBarrierType(BarrierType type)
void setGeometry(const Polygon &polygon)
void setName(const QString &name)
void setScaleFactorForCost(const QString &attributeName, double scaleFactorForCost)
PolygonBarrier &operator=(const PolygonBarrier &other)
PolygonBarrier &operator=(PolygonBarrier &&other)

Detailed Description

A polygon indicating where the network analysis should not traverse.

Barriers are used in network analyses. Barriers can be used to represent locations where the analysis cannot pass through. For example, you can model road closures from a wildfire with a PolygonBarrier to avoid that location. PolygonBarriers can also be scaled costs. An example would be heavy rain where the road can still be traversed, but the time to traverse the road is doubled.

Member Function Documentation

PolygonBarrier::PolygonBarrier()

Default constructor.

PolygonBarrier::PolygonBarrier(const Polygon &polygon)

Constructor that takes in a polygon.

PolygonBarrier::PolygonBarrier(const PolygonBarrier &other)

Copy constructor from other PolygonBarrier.

PolygonBarrier::PolygonBarrier(PolygonBarrier &&other)

Move constructor from other PolygonBarrier.

PolygonBarrier::~PolygonBarrier()

Destructor.

int PolygonBarrier::barrierId() const

Returns ID of this barrier.

This function was introduced in Esri::ArcGISRuntime 100.6.

See also setBarrierId().

BarrierType PolygonBarrier::barrierType() const

Returns the BarrierType of this PolygonBarrier.

See also setBarrierType().

Polygon PolygonBarrier::geometry() const

Returns the Polygon of this PolygonBarrier.

See also setGeometry().

bool PolygonBarrier::isEmpty() const

Returns true if this PolygonBarrier is empty.

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 scale factor for cost of a given attributeName.

See also setScaleFactorForCost().

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(BarrierType type)

Sets the type of this PolygonBarrier.

See also barrierType().

void PolygonBarrier::setGeometry(const Polygon &polygon)

Sets the polygon of this PolygonBarrier.

See also geometry().

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().

PolygonBarrier &PolygonBarrier::operator=(const PolygonBarrier &other)

Assignment operator from other PolygonBarrier.

PolygonBarrier &PolygonBarrier::operator=(PolygonBarrier &&other)

Move operator from other PolygonBarrier.


Feedback on this topic?