Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.vividsolutions.jts.geom.impl
Class PackedCoordinateSequenceFactory

    java.lang.Object
      com.vividsolutions.jts.geom.impl.PackedCoordinateSequenceFactory

All Implemented Interfaces:
  CoordinateSequenceFactory

public class PackedCoordinateSequenceFactory
extends java.lang.Object
implements CoordinateSequenceFactory

Builds packed array coordinate sequences. The array data type can be either double or float, and defaults to float.

Field Summary
`static int` | `DOUBLE`
`static PackedCoordinateSequenceFactory` | `DOUBLE_FACTORY`
`static int` | `FLOAT`
`static PackedCoordinateSequenceFactory` | `FLOAT_FACTORY`

Constructor Summary
`PackedCoordinateSequenceFactory()` Creates a new PackedCoordinateSequenceFactory of type DOUBLE.
`PackedCoordinateSequenceFactory(int type)` Creates a new PackedCoordinateSequenceFactory of the given type.
`PackedCoordinateSequenceFactory(int type, int dimension)` Creates a new PackedCoordinateSequenceFactory of the given type.

Method Summary
`CoordinateSequence` | `create(Coordinate[] coordinates)` Returns a `CoordinateSequence` based on the given array.
`CoordinateSequence` | `create(CoordinateSequence coordSeq)` Creates a `CoordinateSequence` which is a copy of the given `CoordinateSequence`.
`CoordinateSequence` | `create(double[] packedCoordinates, int dimension)`
`CoordinateSequence` | `create(float[] packedCoordinates, int dimension)`
`CoordinateSequence` | `create(int size, int dimension)` Creates a `CoordinateSequence` of the specified size and dimension.
`int` | `getDimension()`
`int` | `getType()` Returns the type of packed coordinate sequences this factory builds, either PackedCoordinateSequenceFactory#Float or PackedCoordinateSequenceFactory#Double
`void` | `setDimension(int dimension)`
`void` | `setType(int type)` Sets the type of packed coordinate sequences this factory builds, acceptable values are PackedCoordinateSequenceFactory#Floator PackedCoordinateSequenceFactory#Double

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

Field Detail

### DOUBLE

    public static final int DOUBLE

See Also:
  Constant Field Values

### FLOAT

    public static final int FLOAT

See Also:
  Constant Field Values

### DOUBLE_FACTORY

    public static final PackedCoordinateSequenceFactory DOUBLE_FACTORY

### FLOAT_FACTORY

    public static final PackedCoordinateSequenceFactory FLOAT_FACTORY

Constructor Detail

### PackedCoordinateSequenceFactory

    public PackedCoordinateSequenceFactory()

  Creates a new PackedCoordinateSequenceFactory of type DOUBLE.

### PackedCoordinateSequenceFactory

    public PackedCoordinateSequenceFactory(int type)

  Creates a new PackedCoordinateSequenceFactory of the given type. Acceptable type values are PackedCoordinateSequenceFactory#Floator PackedCoordinateSequenceFactory#Double

### PackedCoordinateSequenceFactory

    public PackedCoordinateSequenceFactory(int type,
                                           int dimension)

  Creates a new PackedCoordinateSequenceFactory of the given type. Acceptable type values are FLOATor DOUBLE

Method Detail

### getType

    public int getType()

  Returns the type of packed coordinate sequences this factory builds, either PackedCoordinateSequenceFactory#Float or PackedCoordinateSequenceFactory#Double

### setType

    public void setType(int type)

  Sets the type of packed coordinate sequences this factory builds, acceptable values are PackedCoordinateSequenceFactory#Floator PackedCoordinateSequenceFactory#Double

### getDimension

    public int getDimension()

### setDimension

    public void setDimension(int dimension)

### create

    public CoordinateSequence create(Coordinate[] coordinates)

  Description copied from interface: `CoordinateSequenceFactory`
  Returns a `CoordinateSequence` based on the given array. Whether the array is copied or simply referenced is implementation-dependent. This method must handle null arguments by creating an empty sequence.

  Specified by:
    `create` in interface `CoordinateSequenceFactory`
  Parameters:
    `coordinates` - the coordinates
  See Also:
    `CoordinateSequenceFactory.create(com.vividsolutions.jts.geom.Coordinate[])`

### create

    public CoordinateSequence create(CoordinateSequence coordSeq)

  Description copied from interface: `CoordinateSequenceFactory`
  Creates a `CoordinateSequence` which is a copy of the given `CoordinateSequence`. This method must handle null arguments by creating an empty sequence.

  Specified by:
    `create` in interface `CoordinateSequenceFactory`
  Parameters:
    `coordSeq` - the coordinate sequence to copy
  See Also:
    `CoordinateSequenceFactory.create(com.vividsolutions.jts.geom.CoordinateSequence)`

### create

    public CoordinateSequence create(double[] packedCoordinates,
                                     int dimension)

  See Also:
    `com.vividsolutions.jts.geom.CoordinateSequenceFactory#create(double[], int)`

### create

    public CoordinateSequence create(float[] packedCoordinates,
                                     int dimension)

  See Also:
    `com.vividsolutions.jts.geom.CoordinateSequenceFactory#create(float[], int)`

### create

    public CoordinateSequence create(int size,
                                     int dimension)

  Description copied from interface: `CoordinateSequenceFactory`
  Creates a `CoordinateSequence` of the specified size and dimension. For this to be useful, the `CoordinateSequence` implementation must be mutable.

  Specified by:
    `create` in interface `CoordinateSequenceFactory`
  Parameters:
    `size` - the number of coordinates in the sequence
    `dimension` - the dimension of the coordinates in the sequence (if user-specifiable, otherwise ignored)
  See Also:
    `CoordinateSequenceFactory.create(int, int)`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD