JTS Topology Suite version 1.13

## com.vividsolutions.jts.geom.impl
Class PackedCoordinateSequence.Double

    java.lang.Object
      com.vividsolutions.jts.geom.impl.PackedCoordinateSequence
          com.vividsolutions.jts.geom.impl.PackedCoordinateSequence.Double

All Implemented Interfaces:
  CoordinateSequence, java.lang.Cloneable

Enclosing class:
  PackedCoordinateSequence

    public static class PackedCoordinateSequence.Double

extends PackedCoordinateSequence

Packed coordinate sequence implementation based on doubles

Nested Class Summary

Nested classes/interfaces inherited from class com.vividsolutions.jts.geom.impl.PackedCoordinateSequence
`PackedCoordinateSequence.Double, PackedCoordinateSequence.Float`

Field Summary

Fields inherited from class com.vividsolutions.jts.geom.impl.PackedCoordinateSequence
`coordRef, dimension`

Fields inherited from interface com.vividsolutions.jts.geom.CoordinateSequence
`M, X, Y, Z`

Constructor Summary
`PackedCoordinateSequence.Double(Coordinate[] coordinates)` Builds a new packed coordinate sequence out of a coordinate array
`PackedCoordinateSequence.Double(Coordinate[] coordinates, int dimension)` Builds a new packed coordinate sequence out of a coordinate array
`PackedCoordinateSequence.Double(double[] coords, int dimensions)` Builds a new packed coordinate sequence
`PackedCoordinateSequence.Double(float[] coordinates, int dimensions)` Builds a new packed coordinate sequence out of a float coordinate array
`PackedCoordinateSequence.Double(int size, int dimension)` Builds a new empty packed coordinate sequence of a given size and dimension

Method Summary
`java.lang.Object` `clone()` Returns a deep copy of this collection.
`Envelope` `expandEnvelope(Envelope env)` Expands the given `Envelope` to include the coordinates in the sequence.
`Coordinate` `getCoordinateInternal(int i)` Returns a Coordinate representation of the specified coordinate, by always building a new Coordinate object
`double` `getOrdinate(int index, int ordinate)` Returns the ordinate of a coordinate in this sequence.
`double[]` `getRawCoordinates()` Gets the underlying array containing the coordinate values.
`void` `setOrdinate(int index, int ordinate, double value)` Sets the ordinate of a coordinate in this sequence.
`int` `size()` Returns the number of coordinates in this sequence.

Methods inherited from class com.vividsolutions.jts.geom.impl.PackedCoordinateSequence
`getCoordinate, getCoordinate, getCoordinateCopy, getDimension, getX, getY, setX, setY, toCoordinateArray`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PackedCoordinateSequence.Double

    public PackedCoordinateSequence.Double(double[] coords,
                                           int dimensions)

  Builds a new packed coordinate sequence

  Parameters:
    `coords` -
    `dimensions` -

### PackedCoordinateSequence.Double

    public PackedCoordinateSequence.Double(float[] coordinates,
                                           int dimensions)

  Builds a new packed coordinate sequence out of a float coordinate array

  Parameters:
    `coordinates` -

### PackedCoordinateSequence.Double

    public PackedCoordinateSequence.Double(Coordinate[] coordinates,
                                           int dimension)

  Builds a new packed coordinate sequence out of a coordinate array

  Parameters:
    `coordinates` -

### PackedCoordinateSequence.Double

    public PackedCoordinateSequence.Double(Coordinate[] coordinates)

  Builds a new packed coordinate sequence out of a coordinate array

  Parameters:
    `coordinates` -

### PackedCoordinateSequence.Double

    public PackedCoordinateSequence.Double(int size,
                                           int dimension)

  Builds a new empty packed coordinate sequence of a given size and dimension

  Parameters:
    `coordinates` -

Method Detail

### getCoordinateInternal

    public Coordinate getCoordinateInternal(int i)

  Description copied from class: `PackedCoordinateSequence`
  Returns a Coordinate representation of the specified coordinate, by always building a new Coordinate object

  Specified by:
    `getCoordinateInternal` in class `PackedCoordinateSequence`
  Returns:
  See Also:
    `CoordinateSequence.getCoordinate(int)`

### getRawCoordinates

    public double[] getRawCoordinates()

  Gets the underlying array containing the coordinate values.

  Returns:
    the array of coordinate values

### size

    public int size()

  Description copied from interface: `CoordinateSequence`
  Returns the number of coordinates in this sequence.

  Returns:
    the size of the sequence
  See Also:
    `CoordinateSequence.size()`

### clone

    public java.lang.Object clone()

  Description copied from interface: `CoordinateSequence`
  Returns a deep copy of this collection. Called by Geometry#clone.

  Specified by:
    `clone` in interface `CoordinateSequence`
  Specified by:
    `clone` in class `PackedCoordinateSequence`
  Returns:
    a copy of the coordinate sequence containing copies of all points
  See Also:
    `Object.clone()`

### getOrdinate

    public double getOrdinate(int index,
                              int ordinate)

  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`
  Specified by:
    `getOrdinate` in class `PackedCoordinateSequence`
  Parameters:
    `index` - the coordinate index in the sequence
    `ordinate` - the ordinate index in the coordinate (in range [0, dimension-1])
  See Also:
    `Beware, for performace reasons the ordinate index is not checked, if it's over dimensions you may not get an exception but a meaningless value.`

### setOrdinate

    public void setOrdinate(int index,
                            int ordinate,
                            double value)

  Description copied from class: `PackedCoordinateSequence`
  Sets the ordinate of a coordinate in this sequence.
  Warning: for performance reasons the ordinate index is not checked - if it is over dimensions you may not get an exception but a meaningless value.

  Specified by:
    `setOrdinate` in interface `CoordinateSequence`
  Specified by:
    `setOrdinate` in class `PackedCoordinateSequence`
  Parameters:
    `index` - the coordinate index
    `ordinate` - the ordinate index in the coordinate, 0 based, smaller than the number of dimensions
    `value` - the new ordinate value
  See Also:
    `com.vividsolutions.jts.geom.PackedCoordinateSequence#setOrdinate(int, int, double)`

### expandEnvelope

    public Envelope expandEnvelope(Envelope env)

  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.

  Parameters:
    `env` - the envelope to expand
  Returns:
    a ref to the expanded envelope

JTS Topology Suite version 1.13