Class MultiPoint

All Implemented Interfaces:
Geometry, PointTypeGeometry, Serializable, Cloneable

public class MultiPoint extends GeometryCollection implements PointTypeGeometry
This class represents a collection of Point.
A single Point is allowed even if it's not the correct class.
See Also:
  • Constructor Details

    • MultiPoint

      public MultiPoint()
    • MultiPoint

      public MultiPoint(Point[] points)
  • Method Details

    • serialize

      public Point[] serialize()
      Description copied from class: GeometryCollection
      Returns this geometry as an array of Point.
      Specified by:
      serialize in interface Geometry
      Overrides:
      serialize in class GeometryCollection
      Returns:
      this geometry as an array of Point.
    • clone

      public MultiPoint clone()
      Description copied from class: GeometryCollection
      Clones this geometry.
      Specified by:
      clone in interface Geometry
      Specified by:
      clone in class GeometryCollection
      Returns:
      a deep copy of the current geometry.
    • getPoints

      public Point[] getPoints()
    • setGeometries

      public void setGeometries(Geometry[] geometries)
      Specified by:
      setGeometries in class GeometryCollection
    • setPoints

      public void setPoints(Point[] points)
    • pointIterator

      public PointGeometryIterator pointIterator()
      Specified by:
      pointIterator in interface PointTypeGeometry
    • toString

      public String toString()
      Description copied from interface: Geometry
      Returns information about the current geometry.
      Specified by:
      toString in interface Geometry
      Overrides:
      toString in class Object
      Returns:
      information about the current geometry.
    • getGeometryId

      public short getGeometryId()
      Description copied from interface: Geometry
      Returns the geometry class id. This method is useful for geometry serialization.
      Specified by:
      getGeometryId in interface Geometry
      Returns:
      the geometry id.
    • getGeometryType

      public int getGeometryType()
      Description copied from interface: Geometry
      Returns the geometry type for this geometry.
      Specified by:
      getGeometryType in interface Geometry
      Returns:
      the geometry type.
      See Also:
    • getCenteredPoint

      public Point getCenteredPoint()
      Description copied from interface: Geometry
      This method returns a point that is typically centered on the geometry. If the geometry is a point, the point is returned. If it is a line, a point on the curve interpolated at 50% is returned. If the geometry is a surface, the centroid is returned if it is inside the polygon, if not, a point inside the polygon (but likely not exactly in the center) will be returned. If the geometry is a collection, the method is called on the first part of the collection.
      Specified by:
      getCenteredPoint in interface Geometry
      Returns:
      a point likely at the center of the geometry
      See Also: