Class Polyline
A multipart shape used to represent a linear feature.
Namespace: Esri.ArcGISRuntime.Geometry
Assembly: Esri.ArcGISRuntime.dll
Syntax
public class Polyline : Multipart
Remarks
Polyline geometries represent the shape and location of linear features such as a street in a road network, a contour line representing an elevation value, or a hiking trail. They can be used to define geometry for features and graphics, or as input or output for tasks or geoprocessing operations, such as the output of a network trace.
A polyline is composed of a series of connected segments, where each segment defines a continuous line between a start and an end map point. You can define a new polyline from a collection of MapPoint's to create a series of straight LineSegment connecting the map points you specified. You can use PolylineBuilder to build a polyline one map point at a time or to modify an existing polyline.
Additionally, polyline can have multiple parts. Each part is a series of connected segments, but the parts can be disjoint. For example, a polyline representing a street that ends and then starts again a block later. Parts can also intersect at one or more vertices. For example, in a polyline representing a river and its tributaries. The polyline class inherits from Multipart, which provides members for iterating the segments and map points of each part in a polyline.
Polylines 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. If you need to modify a polyline once it has been created, use the PolylineBuilder Class instead. The ToGeometry() Method will provide you with the polyline object.
Constructors
Name | Description |
---|---|
Polyline(IEnumerable<MapPoint>) | Initializes a new instance of the Polyline class. |
Polyline(IEnumerable<MapPoint>, SpatialReference) | Initializes a new instance of the Polyline class. |
Polyline(IEnumerable<Segment>) | Initializes a new instance of the Polyline class. |
Polyline(IEnumerable<Segment>, SpatialReference) | Initializes a new instance of the Polyline class. |
Polyline(IEnumerable<IEnumerable<MapPoint>>) | Initializes a new instance of the Polyline class. |
Polyline(IEnumerable<IEnumerable<MapPoint>>, SpatialReference) | Initializes a new instance of the Polyline class. |
Polyline(IEnumerable<IEnumerable<Segment>>) | Initializes a new instance of the Polyline class. |
Polyline(IEnumerable<IEnumerable<Segment>>, SpatialReference) | Initializes a new instance of the Polyline class. |
Properties
Name | Description |
---|---|
Dimension | Gets a number that describes the dimensionality of a geometry. |
GeometryType | Gets the geometry type. |
Methods
Name | Description |
---|---|
IsEqual(Geometry) | Compares two Polyline for equality. This will check for a matching SpatialReference and the content of Parts match. The order of parts must match too. |
ToString() | Returns a System.String that represents the current System.Object. |
Extension Methods
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 |