Polygon QML Type
A geometry with an area shape defined by a collection of parts. More...
|Import Statement:||import Esri.ArcGISRuntime|
- Polyline toPolyline()
A Polygon geometry represents the shape and location of an area, for example, a country, island, or a lake. A polygon can be used as the geometry of features and graphics, or as input or output of tasks or geoprocessing operations, such as the output of a drive-time analysis or a GeometryEngine.buffer operation.
Each part of a multipart polygon is a series of connected Segments forming a closed ring. Each part must not cross any other part but may lie completely inside or outside another part. For example, a polygon representing the state of Hawaii would comprise eight disjoint parts, one representing each island. A polygon representing the country of South Africa, which completely surrounds the enclave of Lesotho, would comprise two parts, one contained inside the other.
Like polyline, the polygon type is a Multipart, which provides members for iterating the segments and points of each part in a polygon. Unlike parts in a polyline, however, each part of a polygon defines a closed area, so the end point of the last segment in the part is always in the same location as the start point of the first segment, forming a closed
When defining a polygon part, there is no need to explicitly close it by repeating the start point as the last point. Polygons parts are always interpreted as enclosed areas by this API.
Interior rings to make donut polygons should be counter-clockwise in direction to have the correct topology.
If there is ever a doubt about the topological correctness of a polygon, call the GeometryEngine.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, or to rectify polygons that may be self-intersecting, have rings which are partially contained in each other, or contain incorrect ring orientations.
Polygons are based upon the parent Geometry type. The geometry object is immutable which means that you can not change its shape once it is created. If you need to create a new polygon or modify it once it has been created, use the PolygonBuilder type.
Creates a polyline containing paths for all the rings in this polygon.
This method was introduced in Esri.ArcGISRuntime 100.3.