Skip To Content ArcGIS for Developers Sign In Dashboard

MultipointBuilder Class

class Esri::ArcGISRuntime::MultipointBuilder

Helper class for building immutable multipoint geometries. More...

Header: #include <MultipointBuilder>
Since: Esri::ArcGISRuntime 100.0
Inherits: Esri::ArcGISRuntime::GeometryBuilder

This class was introduced in Esri::ArcGISRuntime 100.0.

Public Functions

MultipointBuilder(const Esri::ArcGISRuntime::Multipoint &multipoint, QObject *parent = nullptr)
MultipointBuilder(const Esri::ArcGISRuntime::SpatialReference &spatialReference, QObject *parent = nullptr)
virtual ~MultipointBuilder() override
Esri::ArcGISRuntime::PointCollection *points() const
void setPoints(Esri::ArcGISRuntime::PointCollection *points)
Esri::ArcGISRuntime::Multipoint toMultipoint() const

Reimplemented Public Functions

virtual Esri::ArcGISRuntime::GeometryBuilderType geometryBuilderType() const override
virtual Esri::ArcGISRuntime::Geometry toGeometry() const override

Detailed Description

Use the constructors to initialize the builder with a set of points, and a spatial reference. After it is set, the spatial reference cannot be changed. Add, remove, and insert points using the mutable PointCollection returned from the points() getter. Call the toGeometry method to create a new immutable multipoint geometry from the current state of this builder.

MultipointBuilder* multiPointBuilder = new MultipointBuilder(SpatialReference(4326), this);

PointCollection* pc = new PointCollection(SpatialReference(4326), this);
pc->addPoint(-169, 34, 2);
pc->addPoint(-171, 32);
pc->addPoint(Point(-175, 50, SpatialReference(4326)));

Multipoint mPoint(multiPointBuilder->toGeometry());

Member Function Documentation

MultipointBuilder::MultipointBuilder(const Esri::ArcGISRuntime::Multipoint &multipoint, QObject *parent = nullptr)

Constructor that takes a multipoint and an optional parent.

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

Constructor that takes a spatialReference and an optional parent.

[override virtual] MultipointBuilder::~MultipointBuilder()


[override virtual] Esri::ArcGISRuntime::GeometryBuilderType MultipointBuilder::geometryBuilderType() const

Reimplements: GeometryBuilder::geometryBuilderType() const.

Gets the GeometryBuilderType of this builder.

Esri::ArcGISRuntime::PointCollection *MultipointBuilder::points() const

Gets the points of this MultipointBuilder.

Returns a PointCollection.

See also setPoints().

void MultipointBuilder::setPoints(Esri::ArcGISRuntime::PointCollection *points)

Sets the points of this MultipointBuilder to points.

See also points().

[override virtual] Esri::ArcGISRuntime::Geometry MultipointBuilder::toGeometry() const

Reimplements: GeometryBuilder::toGeometry() const.

Returns the multipoint geometry this builder is constructing or modifying.

Esri::ArcGISRuntime::Multipoint MultipointBuilder::toMultipoint() const

Returns the multipoint geometry this builder is constructing or modifying.

This is a convenience method to avoid needing to cast the return value.

Feedback on this topic?