Class MultipointBuilder

java.lang.Object
com.esri.arcgisruntime.geometry.GeometryBuilder
com.esri.arcgisruntime.geometry.MultipointBuilder

public final class MultipointBuilder extends GeometryBuilder
The multipoint builder allows you to create and modify multipoint geometries.

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 Details

    • MultipointBuilder

      public MultipointBuilder(SpatialReference spatialReference)
      Creates an empty multipoint builder with the specified SpatialReference.

      The SpatialReference cannot be changed after instantiation.

      Parameters:
      spatialReference - the SpatialReference of the new builder. May be null.
      Since:
      100.0.0
    • MultipointBuilder

      public MultipointBuilder(Multipoint multipoint)
      Creates a multipoint builder from the specified Multipoint.

      The SpatialReference of the multipoint point builder will match that of the specified Multipoint. 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

      public MultipointBuilder(Iterable<Point> points)
      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 - if points contains Points with different SpatialReferences.
      Since:
      100.0.0
    • MultipointBuilder

      public MultipointBuilder(Iterable<Point> points, SpatialReference spatialReference)
      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 the spatialReference 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 builder
      spatialReference - the SpatialReference of the new builder
      Throws:
      ArcGISRuntimeException - if points contains Points with different SpatialReferences.
      Since:
      100.0.0
  • Method Details

    • getPoints

      public PointCollection getPoints()
      Gets a mutable collection of points from the multipoint builder; used by this builder to create a new Multipoint. Use this mutable PointCollection to iterate through the contents of the builder. Also use this to change the state of the builder, calling the methods on this PointCollection to add or remove points from the builder. This method always returns a valid collection object; the collection will be empty if the builder GeometryBuilder.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

      public Multipoint 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 class GeometryBuilder
      Returns:
      a new Multipoint based on the current state of this builder
      Since:
      100.0.0
    • getBuilderType

      @Deprecated(since="200.1.0", forRemoval=true) public GeometryBuilderType 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 single GeometryType.
      Overrides:
      getBuilderType in class GeometryBuilder
      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 class GeometryBuilder
      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 class GeometryBuilder
      Returns:
      true if this builder has m values, false otherwise
      See Also: