Class PolygonBuilder
Builder for creating and modifying Polygon geometries incrementally.
Namespace: Esri.ArcGISRuntime.Geometry
Assembly: Esri.ArcGISRuntime.dll
Syntax
public sealed class PolygonBuilder : MultipartBuilder<Polygon>
Remarks
Polygon geometries are immutable and cannot be changed directly once created. A polygon is a closed area shape defined by one or more parts. Each part in a polygon is a connected sequence of Segment instances that start and end at the same point (a closed ring). If a polygon has more than one ring, the rings may be separate from one another or they may nest inside one another, but they should not overlap. Note: interior rings, to make donut polygons, should be counter-clockwise in direction to be topology correct. If there is ever a doubt about the topological correctness of a polygon, call Simplify(Geometry) to correct any issues.
The polygon builder allows you to change the contents of the shape using the collection that you can access from the Parts property. Each Part in this collection comprises a collection of segments that define the Polygon. You can add or remove a Part from the parts collection, or you can create or edit segment vertices of an existing Part. Use ToGeometry() to return the new Polygon from the builder.
Constructors
Name | Description |
---|---|
PolygonBuilder(Polygon) | Initializes a new instance of the PolygonBuilder class by copying the parts from the specified Polygon. |
PolygonBuilder(SpatialReference) | Initializes a new instance of the PolygonBuilder class with the specified SpatialReference. |
PolygonBuilder(IEnumerable<MapPoint>, SpatialReference) | Initializes a new instance of the PolygonBuilder class. |
PolygonBuilder(IEnumerable<Segment>, SpatialReference) | Initializes a new instance of the PolygonBuilder class. |
PolygonBuilder(IEnumerable<IEnumerable<MapPoint>>, SpatialReference) | Initializes a new instance of the PolygonBuilder class. |
PolygonBuilder(IEnumerable<IEnumerable<Segment>>, SpatialReference) | Initializes a new instance of the PolygonBuilder class. |
Methods
Name | Description |
---|---|
ToPolyline() | Creates a polyline with the values in the polygon builder. |
Applies to
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.5 |
.NET | 100.13 - 200.5 |
.NET Windows | 100.13 - 200.5 |
.NET Android | 200.0 - 200.5 |
.NET iOS | 200.0 - 200.5 |
.NET Framework | 100.0 - 200.5 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.5 |