Skip To Content ArcGIS for Developers Sign In Dashboard

MultipointBuilder Class


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

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

Public Functions

MultipointBuilder(const SpatialReference &spatialReference, QObject *parent = nullptr)
MultipointBuilder(const Multipoint &multipoint, QObject *parent = nullptr)
PointCollection *points() const
void setPoints(PointCollection *points)
Multipoint toMultipoint() const

Reimplemented Public Functions

virtual GeometryBuilderType geometryBuilderType() const
virtual Geometry toGeometry() const

Additional Inherited Members

Detailed Description

Helper class for building immutable multipoint geometries.

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 SpatialReference &spatialReference, QObject *parent = nullptr)

Constructor that takes a spatialReference and an optional parent.

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

Constructor that takes a multipoint and an optional parent.



[virtual] GeometryBuilderType MultipointBuilder::geometryBuilderType() const

Reimplemented from GeometryBuilder::geometryBuilderType().

Gets the GeometryBuilderType of this builder.

PointCollection *MultipointBuilder::points() const

Gets the points of this MultipointBuilder.

Returns a PointCollection.

See also setPoints().

void MultipointBuilder::setPoints(PointCollection *points)

Sets the points of this MultipointBuilder to points.

See also points().

[virtual] Geometry MultipointBuilder::toGeometry() const

Reimplemented from GeometryBuilder::toGeometry().

Returns the multipoint geometry this builder is constructing or modifying.

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?