The multipoint builder allows you to create and modify multipoint geometries. More...
Header: | #include <MultipointBuilder.h> |
Since: | Esri::ArcGISRuntime 100.0 |
Inherits: | Esri::ArcGISRuntime::GeometryBuilder |
Public Functions
MultipointBuilder(const Esri::ArcGISRuntime::SpatialReference &spatialReference, QObject *parent = nullptr) | |
MultipointBuilder(const Esri::ArcGISRuntime::Multipoint &multipoint, 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
Multipoint geometries represent an ordered collection of points. They can be used as the geometry of features and graphics, or as input or output for spatial operations. For features that consist of a very large number of points that share the same set of attribute values, multipoints may be more efficient to store and analyze in a geodatabase compared to using multiple point features.
A Multipoint is composed of a single read-only Point collection. Use GeometryBuilder::toGeometry to return the Multipoint from the MultipointBuilder.
auto* multiPointBuilder = new MultipointBuilder(SpatialReference(4326), this); auto* pc = new PointCollection(SpatialReference(4326), this); pc->addPoint(-169, 34, 2); pc->addPoint(-171, 32); pc->addPoint(Point(-175, 50, SpatialReference(4326))); multiPointBuilder->setPoints(pc); Multipoint mPoint(multiPointBuilder->toGeometry());
Member Function Documentation
[explicit]
MultipointBuilder::MultipointBuilder (const Esri::ArcGISRuntime::SpatialReference &spatialReference , QObject *parent = nullptr)
Creates an empty multipoint builder with the specified SpatialReference.
- spatialReference - The builder's spatial reference.
- parent - The optional parent QObject.
The SpatialReference cannot be changed after instantiation.
[explicit]
MultipointBuilder::MultipointBuilder (const Esri::ArcGISRuntime::Multipoint &multipoint, QObject *parent = nullptr)
Creates a multipoint builder from the specified Multipoint.
- multipoint - A multipoint object.
- parent - The optional parent QObject.
The SpatialReference of the multipoint point builder will match that of the specified Multipoint.
[override virtual]
MultipointBuilder::~MultipointBuilder ()
Destructor.
[override virtual]
Esri::ArcGISRuntime::GeometryBuilderType MultipointBuilder::geometryBuilderType () const
Reimplements: GeometryBuilder::geometryBuilderType() const.
Gets the GeometryBuilderType of this builder.
Esri::ArcGISRuntime::PointCollection *MultipointBuilder::points() const
Returns a mutable collection of points from the multipoint builder.
Use this collection to add points to or remove points from the builder.
See also setPoints().
void MultipointBuilder::setPoints (Esri::ArcGISRuntime::PointCollection *points)
Sets the points 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.