Class MultiPointImpl

  • All Implemented Interfaces:
    java.io.Serializable

    final class MultiPointImpl
    extends MultiVertexGeometryImpl
    The MultiPoint is a collection of points.
    • Constructor Detail

      • MultiPointImpl

        public MultiPointImpl()
    • Method Detail

      • createInstance

        public Geometry createInstance()
        Description copied from class: Geometry
        Creates an instance of an empty geometry of the same type.
        Specified by:
        createInstance in class Geometry
        Returns:
        The new instance.
      • add

        public void add​(Point point)
        Adds a Point to this MultiPoint.
      • add

        public void add​(double x,
                        double y)
        Adds a Point to this MultiPoint with given x, y coordinates.
      • add

        public void add​(double x,
                        double y,
                        double z)
        Adds a Point to this MultiPoint with given x, y, z coordinates.
      • add

        public void add​(MultiVertexGeometryImpl src,
                        int beginIndex,
                        int endIndex)
        Appends points from another MultiVertexGeometryImpl at the end of this one.
        Parameters:
        src - The source MultiVertexGeometryImpl
      • addPoints

        public void addPoints​(Point2D[] points)
      • insertPoint

        public void insertPoint​(int beforePointIndex,
                                Point pt)
      • removePoint

        void removePoint​(int pointIndex)
      • resize

        public void resize​(int pointCount)
        Resizes the MultiPoint to have the given size.
      • setEmpty

        public void setEmpty()
        Description copied from class: Geometry
        Returns the geometry to its original initialization state by releasing all data referenced by the geometry.
        Specified by:
        setEmpty in class Geometry
      • applyTransformation

        public void applyTransformation​(Transformation2D transform)
        Description copied from class: Geometry
        Applies 2D affine transformation in XY plane.
        Specified by:
        applyTransformation in class Geometry
        Parameters:
        transform - The affine transformation to be applied to this geometry.
      • applyTransformation

        void applyTransformation​(Transformation3D transform)
        Description copied from class: Geometry
        Applies 3D affine transformation. Adds Z attribute if it is missing.
        Specified by:
        applyTransformation in class Geometry
        Parameters:
        transform - The affine transformation to be applied to this geometry.
      • getDimension

        public int getDimension()
        Description copied from class: Geometry
        Returns the topological dimension of the geometry object based on the geometry's type.

        Returns 0 for point and multipoint.

        Returns 1 for lines and polylines.

        Returns 2 for polygons and envelopes

        Returns 3 for objects with volume

        Specified by:
        getDimension in class Geometry
        Returns:
        Returns the integer value of the dimension of geometry.
      • estimateMemorySize

        public long estimateMemorySize()
        Description copied from class: Geometry
        Returns an estimate of this object size in bytes.

        This estimate doesn't include the size of the VertexDescription object because instances of VertexDescription are shared among geometry objects.

        Specified by:
        estimateMemorySize in class Geometry
        Returns:
        Returns an estimate of this object size in bytes.
      • getType

        public Geometry.Type getType()
        Description copied from class: Geometry
        Returns the geometry type.
        Specified by:
        getType in class Geometry
        Returns:
        Returns the geometry type.
      • calculateArea2D

        public double calculateArea2D()
        Description copied from class: Geometry
        Calculates the area of the geometry. If the spatial reference is a Geographic Coordinate System (WGS84) then the 2D area calculation is defined in angular units.
        Overrides:
        calculateArea2D in class Geometry
        Returns:
        A double value representing the 2D area of the geometry.
      • calculateLength2D

        public double calculateLength2D()
        Description copied from class: Geometry
        Calculates the length of the geometry. If the spatial reference is a Geographic Coordinate System (a system where coordinates are defined using angular units such as longitude and latitude) then the 2D distance calculation is returned in angular units. In cases where length must be calculated on a Geographic Coordinate System consider the using the geodeticLength method on the GeometryEngine
        Overrides:
        calculateLength2D in class Geometry
        Returns:
        A double value representing the 2D length of the geometry.
      • _getImpl

        public java.lang.Object _getImpl()
        Overrides:
        _getImpl in class Geometry
      • addPoints

        public void addPoints​(Point[] points)
      • getBoundary

        public Geometry getBoundary()
        Description copied from class: Geometry
        Returns boundary of this geometry. Polygon and Envelope boundary is a Polyline. For Polyline and Line, the boundary is a Multi_point consisting of path end points. For Multi_point and Point null is returned.
        Specified by:
        getBoundary in class Geometry
        Returns:
        The boundary geometry.