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.
- Since:
- 100.0.0
- See Also:
-
Constructor Summary
ConstructorDescriptionMultipointBuilder
(Multipoint multipoint) Creates a multipoint builder from the specifiedMultipoint
.MultipointBuilder
(SpatialReference spatialReference) Creates an empty multipoint builder with the specifiedSpatialReference
.MultipointBuilder
(Iterable<Point> points) Creates a new multipoint builder containing a copy of the given iterable of Points.MultipointBuilder
(Iterable<Point> points, SpatialReference spatialReference) Creates a new multipoint builder containing a copy of the given iterable of Points, with the given SpatialReference. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Gets a mutable collection of points from the multipoint builder; used by this builder to create a newMultipoint
.boolean
hasM()
True if the geometry builder supports geometries with m values, false otherwise.boolean
hasZ()
True if the geometry builder supports geometries with z values, false otherwise.Returns a new Multipoint based on the current state of this builder.Methods inherited from class com.esri.arcgisruntime.geometry.GeometryBuilder
create, create, getExtent, getSpatialReference, hasCurves, isEmpty, isSketchValid, replaceGeometry
-
Constructor Details
-
MultipointBuilder
Creates an empty multipoint builder with the specifiedSpatialReference
.The
SpatialReference
cannot be changed after instantiation.- Parameters:
spatialReference
- the SpatialReference of the new builder. May be null.- Since:
- 100.0.0
-
MultipointBuilder
Creates a multipoint builder from the specifiedMultipoint
.The
SpatialReference
of the multipoint point builder will match that of the specifiedMultipoint
. Use this constructor in workflows that create a modified version of an existing geometry, for example feature or graphic editing workflows.- Parameters:
multipoint
- the Multipoint used to initialize this builder- Since:
- 100.0.0
-
MultipointBuilder
Creates a new multipoint builder containing a copy of the given iterable of Points. The SpatialReference of the new builder will match that of the given Points. If the SpatialReference of any Point is null then it is assumed to have the same SpatialReference as the first point. If the SpatialReference of all the Points is null, then the SpatialReference of the new MultipointBuilder will also be null.- Parameters:
points
- the set of points used to initialize this builder- Throws:
ArcGISRuntimeException
- ifpoints
contains Points with different SpatialReferences.- Since:
- 100.0.0
-
MultipointBuilder
Creates a new multipoint builder containing a copy of the given iterable of Points, with the given SpatialReference. If the SpatialReference of any Point is null then it is assumed to match thespatialReference
parameter.Use this constructor when you have a set of existing points from which to create a Multipoint, but which may not already have a SpatialReference assigned.
- Parameters:
points
- the points used to initialize this builderspatialReference
- the SpatialReference of the new builder- Throws:
ArcGISRuntimeException
- ifpoints
contains Points with different SpatialReferences.- Since:
- 100.0.0
-
-
Method Details
-
getPoints
Gets a mutable collection of points from the multipoint builder; used by this builder to create a newMultipoint
. Use this mutablePointCollection
to iterate through the contents of the builder. Also use this to change the state of the builder, calling the methods on thisPointCollection
to add or remove points from the builder. This method always returns a valid collection object; the collection will be empty if the builderGeometryBuilder.isEmpty()
.- Returns:
- the collection of points in this builder, that will be used by
toGeometry()
to create a Multipoint - Since:
- 100.0.0
- See Also:
-
toGeometry
Returns a new Multipoint based on the current state of this builder. This method can be called as many times as required for any specific instance; it does not affect the state of the builder, and returns a new Multipoint each time.- Specified by:
toGeometry
in classGeometryBuilder
- Returns:
- a new Multipoint based on the current state of this builder
- Since:
- 100.0.0
-
getBuilderType
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:GeometryBuilder
Gets the subtype of this builder instance. This indicates which type of geometries the builder can create; each type of builder creates a singleGeometryType
.- Overrides:
getBuilderType
in classGeometryBuilder
- Returns:
- the builder subtype
-
hasZ
public boolean hasZ()Description copied from class:GeometryBuilder
True if the geometry builder supports geometries with z values, false otherwise.Z values are generally used as a z coordinate, indicating height or elevation. NaN is a valid z value. If true, z values are stored for each vertex of the constructed Geometry. Geometries with z values are created by using setters or constructors that take a z value as a parameter.
- Overrides:
hasZ
in classGeometryBuilder
- Returns:
- true if this builder contains z values, false otherwise
- See Also:
-
hasM
public boolean hasM()Description copied from class:GeometryBuilder
True if the geometry builder supports geometries with m values, false otherwise.M values are often referred to as measures, and are used in linear referencing workflows on linear datasets. NaN is a valid m value. If true, m values are stored for each vertex of the constructed Geometry. Geometries with m values are created by using setters or constructors that take an m value as a parameter.
- Overrides:
hasM
in classGeometryBuilder
- Returns:
- true if this builder has m values, false otherwise
- See Also:
-