Class PolygonBuilder
Builder for creating Polygon instances.
Namespace: Esri.ArcGISRuntime.Geometry
Assembly: Esri.ArcGISRuntime.dll
Syntax
public sealed class PolygonBuilder : MultipartBuilder<Polygon>
Remarks
Use the PolygonBuilder Class to create and/or modify a Polygon shape. The builder is best suited for editing workflows where the user may be adding, inserting or removing parts of a Polygon geometry interactively. Polygons are based upon the parent Geometry Class. The Geometry Class is immutable which means that you can not change its shape once it is created. Hence the PolygonBuilder provides the way to make changes when working with a Polygon. Use the ToGeometry() Method to get the Polygon geometry from the builder.
A polygon is a closed shape defined by one or more parts 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 the Simplify(Geometry) method to correct any issues. This is especially true if you pass a polygon to ArcGIS Server for a geoprocessing task to avoid any ArcGIS Server errors being thrown.
Constructors
Name | Description |
---|---|
PolygonBuilder(Polygon) | Initializes a new instance of the PolygonBuilder class from a polygon. |
PolygonBuilder(SpatialReference) | Initializes a new instance of the PolygonBuilder class. |
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 - 100.15 |
.NET 6.0 | 100.13 - 100.15 |
.NET 6.0 Windows | 100.13 - 100.15 |
.NET Framework | 100.0 - 100.15 |
.NET 5 | 100.10 - 100.12 |
.NET Core 3.1 | 100.7 - 100.12 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 100.15 |