Polyline
A multipart shape used to represent a linear feature. 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. A polyline 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 can be used as the geometry of a com.arcgismaps.data.Feature or com.arcgismaps.mapping.view.Graphic. To obtain the geometry on these objects, use com.arcgismaps.mapping.GeoElement.geometry.
A polyline is composed of a series of connected segments, where each Segment defines a continuous line between a start and an end point. You can define a new polyline from a collection of Point objects to create a series of straight LineSegment objects connecting the points you specified. You can use PolylineBuilder to build a polyline one point at a time, or to modify an existing polyline.
A 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 starts again a block later. Parts can also intersect at one or more points (or vertices), for example, a polyline representing a river and its tributaries.
Polylines inherit from Multipart, which provides members for iterating the segments and points of each part in a polyline.
Polylines are based upon the parent Geometry class which is immutable, meaning 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.
Since
200.1.0
See also
Constructors
Inherited properties
Indicates the dimensionality of a Geometry, relating to the number of spatial dimensions in which the geometry may have a size. You can use Geometry.dimension to work out what kind of symbol can be applied to a specific type of geometry. For example, Point and Multipoint are both zero-dimensional point geometries, and both can be displayed using a type of com.arcgismaps.mapping.symbology.MarkerSymbol. Polygon and Envelope are both 2-dimensional area geometries that can be displayed using a type of com.arcgismaps.mapping.symbology.FillSymbol.
True if this geometry contains curve segments, false otherwise. ArcGIS software supports polygon and polyline geometries that contain curve segments (where Segment.isCurve is true, sometimes known as true curves or nonlinear segments). Curves may be present in certain types of data, such as Mobile Map Packages (MMPK) or geometry JSON. When connecting to ArcGIS feature services that support curves (see com.arcgismaps.arcgisservices.ArcGISFeatureServiceInfo.supportsTrueCurve), this API retrieves densified versions of curve feature geometries by default.
True if the geometry is empty, false otherwise. A geometry is empty if it does not have valid geographic coordinates, even if the SpatialReference is specified. An empty Geometry is a valid object that has no location in space.
The parts for the multipart. This is a copy and the any changes must be set.
The spatial reference for this geometry. This can be null if the geometry is not associated with a SpatialReference.
Inherited functions
Checks if two geometries are approximately the same within the given tolerance. This function performs a lightweight comparison of two geometries that might be useful when writing test code. It uses the tolerance to compare each of x, y, and any other values the geometries possess (such as z or m) independently in the manner: abs(value1 - value2) <= tolerance. The single tolerance value is used even if the x, y, z or m units differ. This function does not respect modular arithmetic of spatial references which wrap around, so longitudes of -180 and +180 degrees are considered to differ by 360 degrees.