Polyline Class

  • Polyline
  • class Esri::ArcGISRuntime::Polyline

    A multipart shape used to represent a linear feature. More...

    Header: #include <Polyline.h>
    Since: Esri::ArcGISRuntime 100.0
    Inherits: Esri::ArcGISRuntime::Multipart

    Public Functions

    Polyline()
    Polyline(const Esri::ArcGISRuntime::Polyline &other)
    Polyline(Esri::ArcGISRuntime::Polyline &&other)
    Polyline(const Esri::ArcGISRuntime::Geometry &other)
    virtual ~Polyline() override
    bool isValid() const
    Esri::ArcGISRuntime::Polyline &operator=(const Esri::ArcGISRuntime::Polyline &other)
    Esri::ArcGISRuntime::Polyline &operator=(Esri::ArcGISRuntime::Polyline &&other)

    Detailed Description

    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 Feature or Graphic. To obtain the geometry on these objects, use 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.

    Relevant samples:

    Member Function Documentation

    Polyline::Polyline()

    Default constructor.

    Polyline::Polyline(const Esri::ArcGISRuntime::Polyline &other)

    Copy constructor from other Polyline.

    Polyline::Polyline(Esri::ArcGISRuntime::Polyline &&other)

    Move constructor from other Polyline.

    [explicit] Polyline::Polyline(const Esri::ArcGISRuntime::Geometry &other)

    Converting constructor from other Geometry.

    See also Downcast helper functions.

    [override virtual] Polyline::~Polyline()

    Destructor.

    [since Esri::ArcGISRuntime 100.2] bool Polyline::isValid() const

    Gets whether this Polyline is valid.

    A Polyline is valid if it is not empty and geometryType is GeometryType::Polyline.

    Returns true if valid.

    This function was introduced in Esri::ArcGISRuntime 100.2.

    Esri::ArcGISRuntime::Polyline &Polyline::operator=(const Esri::ArcGISRuntime::Polyline &other)

    Assignment operator from other Polyline.

    Esri::ArcGISRuntime::Polyline &Polyline::operator=(Esri::ArcGISRuntime::Polyline &&other)

    Move operator from other Polyline.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.