Class DefaultCoordinateSequence

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, CoordinateSequence

    class DefaultCoordinateSequence
    extends java.lang.Object
    implements CoordinateSequence, java.io.Serializable
    Deprecated.
    no longer used
    The CoordinateSequence implementation that Geometries use by default. In this implementation, Coordinates returned by #toArray and #get are live -- parties that change them are actually changing the DefaultCoordinateSequence's underlying data.
    Version:
    1.7
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Deprecated.
        See Also:
        Constant Field Values
      • coordinates

        private Coordinate[] coordinates
        Deprecated.
    • Constructor Detail

      • DefaultCoordinateSequence

        public DefaultCoordinateSequence​(Coordinate[] coordinates)
        Deprecated.
        Constructs a DefaultCoordinateSequence based on the given array (the array is not copied).
        Parameters:
        coordinates - the coordinate array that will be referenced.
      • DefaultCoordinateSequence

        public DefaultCoordinateSequence​(CoordinateSequence coordSeq)
        Deprecated.
        Creates a new sequence based on a deep copy of the given CoordinateSequence.
        Parameters:
        coordSeq - the coordinate sequence that will be copied.
      • DefaultCoordinateSequence

        public DefaultCoordinateSequence​(int size)
        Deprecated.
        Constructs a sequence of a given size, populated with new Coordinates.
        Parameters:
        size - the size of the sequence to create
    • Method Detail

      • getCoordinate

        public Coordinate getCoordinate​(int i)
        Deprecated.
        Get the Coordinate with index i.
        Specified by:
        getCoordinate in interface CoordinateSequence
        Parameters:
        i - the index of the coordinate
        Returns:
        the requested Coordinate instance
      • getCoordinateCopy

        public Coordinate getCoordinateCopy​(int i)
        Deprecated.
        Get a copy of the Coordinate with index i.
        Specified by:
        getCoordinateCopy in interface CoordinateSequence
        Parameters:
        i - the index of the coordinate
        Returns:
        a copy of the requested Coordinate
      • getOrdinate

        public double getOrdinate​(int index,
                                  int ordinateIndex)
        Deprecated.
        Description copied from interface: CoordinateSequence
        Returns the ordinate of a coordinate in this sequence. Ordinate indices 0 and 1 are assumed to be X and Y. Ordinates indices greater than 1 have user-defined semantics (for instance, they may contain other dimensions or measure values).
        Specified by:
        getOrdinate in interface CoordinateSequence
        Parameters:
        index - the coordinate index in the sequence
        ordinateIndex - the ordinate index in the coordinate (in range [0, dimension-1])
        See Also:
        CoordinateSequence.getOrdinate(int, int)
      • setOrdinate

        public void setOrdinate​(int index,
                                int ordinateIndex,
                                double value)
        Deprecated.
        Description copied from interface: CoordinateSequence
        Sets the value for a given ordinate of a coordinate in this sequence.
        Specified by:
        setOrdinate in interface CoordinateSequence
        Parameters:
        index - the coordinate index in the sequence
        ordinateIndex - the ordinate index in the coordinate (in range [0, dimension-1])
        value - the new ordinate value
        See Also:
        CoordinateSequence.setOrdinate(int, int, double)
      • clone

        public java.lang.Object clone()
        Deprecated.
        Creates a deep copy of the Object
        Specified by:
        clone in interface CoordinateSequence
        Overrides:
        clone in class java.lang.Object
        Returns:
        The deep copy
      • size

        public int size()
        Deprecated.
        Returns the size of the coordinate sequence
        Specified by:
        size in interface CoordinateSequence
        Returns:
        the number of coordinates
      • toCoordinateArray

        public Coordinate[] toCoordinateArray()
        Deprecated.
        This method exposes the internal Array of Coordinate Objects
        Specified by:
        toCoordinateArray in interface CoordinateSequence
        Returns:
        the Coordinate[] array.
      • expandEnvelope

        public Envelope expandEnvelope​(Envelope env)
        Deprecated.
        Description copied from interface: CoordinateSequence
        Expands the given Envelope to include the coordinates in the sequence. Allows implementing classes to optimize access to coordinate values.
        Specified by:
        expandEnvelope in interface CoordinateSequence
        Parameters:
        env - the envelope to expand
        Returns:
        a ref to the expanded envelope
      • toString

        public java.lang.String toString()
        Deprecated.
        Returns the string Representation of the coordinate array
        Overrides:
        toString in class java.lang.Object
        Returns:
        The string