PointCollection Class

  • PointCollection
  • class Esri::ArcGISRuntime::PointCollection

    Represents a mutable collection of Points for creating a Multipoint geometry from a MultipointBuilder. More...

    Header: #include <PointCollection.h>
    Since: Esri::ArcGISRuntime 100.0
    Inherits: Esri::ArcGISRuntime::Object and Esri::ArcGISRuntime::Iterable

    This class was introduced in Esri::ArcGISRuntime 100.0.

    Public Functions

    PointCollection(const Esri::ArcGISRuntime::SpatialReference &spatialReference, QObject *parent = nullptr)
    virtual ~PointCollection() override
    int addPoint(const Esri::ArcGISRuntime::Point &point)
    int addPoint(double x, double y)
    int addPoint(double x, double y, double z)
    void addPoints(const QList<Esri::ArcGISRuntime::Point> &points)
    void addPoints(Esri::ArcGISRuntime::PointCollection *points)
    void addPoints(const Esri::ArcGISRuntime::ImmutablePointCollection &points)
    int indexOf(const Esri::ArcGISRuntime::Point &point) const
    void insertPoint(int pointIndex, const Esri::ArcGISRuntime::Point &point)
    void insertPoint(int pointIndex, double x, double y)
    void insertPoint(int pointIndex, double x, double y, double z)
    bool isEmpty() const
    Esri::ArcGISRuntime::Point point(int index) const
    void removeAll()
    void removePoint(int pointIndex)
    void setPoint(int pointIndex, const Esri::ArcGISRuntime::Point &point)
    Esri::ArcGISRuntime::SpatialReference spatialReference() const

    Reimplemented Public Functions

    virtual int size() const override

    Detailed Description

    Points can be added to, inserted into, and removed from the collection in order to define or change the shape of the Multipoint.

    The spatial reference of any Points added to a PointCollection must match that of this PointCollection, or be unspecified (in which case the Points are assumed to have the same spatial reference as this PointCollection).

    Member Function Documentation

    PointCollection::PointCollection(const Esri::ArcGISRuntime::SpatialReference &spatialReference, QObject *parent = nullptr)

    Constructor that takes a SpatialReference spatialReference and an optional parent.

    [override virtual] PointCollection::~PointCollection()

    Destructor.

    int PointCollection::addPoint(const Esri::ArcGISRuntime::Point &point)

    Adds point to the collection.

    Returns -1 on error.

    int PointCollection::addPoint(double x, double y)

    Adds a new point with the given x and y coordinates.

    Returns the index of the added point, or -1 on error.

    The coordinates must be in the spatial reference of this PointCollection.

    int PointCollection::addPoint(double x, double y, double z)

    Adds a new point to the collection with the given x, y, and z coordinates.

    Returns the index of the added point, or -1 on error.

    Note: the coordinates must be in the spatial reference of this PointCollection.

    void PointCollection::addPoints(const QList<Esri::ArcGISRuntime::Point> &points)

    Adds list of points to the collection.

    This function was introduced in Esri::ArcGISRuntime 100.1.

    void PointCollection::addPoints(Esri::ArcGISRuntime::PointCollection *points)

    Adds the points in this PointCollection points to this collection.

    void PointCollection::addPoints(const Esri::ArcGISRuntime::ImmutablePointCollection &points)

    Adds the points in the ImmutablePointCollection points to this collection.

    int PointCollection::indexOf(const Esri::ArcGISRuntime::Point &point) const

    Gets the index of point in the collection.

    Returns -1 if the point is not found.

    void PointCollection::insertPoint(int pointIndex, const Esri::ArcGISRuntime::Point &point)

    Inserts a point into this PointCollection at pointIndex.

    void PointCollection::insertPoint(int pointIndex, double x, double y)

    Inserts a point with the given x and y coordinates into this PointCollection at pointIndex.

    The coordinates must be in the spatial reference of this PointCollection.

    void PointCollection::insertPoint(int pointIndex, double x, double y, double z)

    Inserts a point with the given x, y, and z coordinates into this PointCollection at pointIndex.

    The coordinates must be in the spatial reference of this PointCollection.

    bool PointCollection::isEmpty() const

    Gets whether this PointCollection contains any points.

    Returns true if this PointCollection contains points.

    Esri::ArcGISRuntime::Point PointCollection::point(int index) const

    Gets the point at index.

    Returns an empty Point object on error.

    See also setPoint().

    void PointCollection::removeAll()

    Removes all the points from this PointCollection.

    void PointCollection::removePoint(int pointIndex)

    Removes the point at pointIndex.

    void PointCollection::setPoint(int pointIndex, const Esri::ArcGISRuntime::Point &point)

    Reassigns the point at pointIndex to point.

    See also point().

    [override virtual] int PointCollection::size() const

    Gets the number of points in this PointCollection.

    Esri::ArcGISRuntime::SpatialReference PointCollection::spatialReference() const

    Gets the SpatialReference of this PointCollection.

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