Skip To Content ArcGIS for Developers Sign In Dashboard

Polygon Class

(Esri::ArcGISRuntime::Polygon)

A geometry with an areal shape defined by a collection of parts, and a spatial reference. More...

Header: #include <Polygon>
Since: Esri::ArcGISRuntime 100.0
Inherits: Multipart

Public Functions

Polygon()
Polygon(const Polygon &other)
Polygon(Polygon &&other)
Polygon(const Geometry &other)
~Polygon()
bool isValid() const
Polyline toPolyline() const
Polygon &operator=(const Polygon &other)
Polygon &operator=(Polygon &&other)

Additional Inherited Members

Detailed Description

A geometry with an areal shape defined by a collection of parts, and a spatial reference.

Each part defines an area bounded by a collection of Segments. If there is more than one part, each part can lie inside or be disjoint from other parts. Point-based helper methods allow the polygon to be treated as a series of connected points.

Polygon is immutable. Instead of changing the properties of an existing Polygon, you can create new Polygon instances, or use PolygonBuilder.

A Polygon can be used as the geometry of a feature.

Member Function Documentation

Polygon::Polygon()

Default constructor.

Polygon::Polygon(const Polygon &other)

Copy constructor from other Polygon.

Polygon::Polygon(Polygon &&other)

Move constructor from other Polygon.

Polygon::Polygon(const Geometry &other)

Converting constructor from other Geometry.

See also Downcast helper functions.

Polygon::~Polygon()

Destructor.

bool Polygon::isValid() const

Gets whether this Polygon is valid.

A Polygon is valid if it is not empty and geometryType is GeometryType::Polygon.

Returns true if valid.

This function was introduced in Esri::ArcGISRuntime 100.2.

Polyline Polygon::toPolyline() const

Creates a polyline containing paths for all the rings in this polygon.

This function was introduced in Esri::ArcGISRuntime 100.3.

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

Assignment operator from other Polygon.

Polygon &Polygon::operator=(Polygon &&other)

Move operator from other Polygon.


Feedback on this topic?