createCS static method

CoordinateSequence createCS(
  1. CoordinateSequenceFactory csFactory,
  2. int size,
  3. int dimension
)

Creates a {@link CoordinateSequence} using the provided factory confirming the provided size and dimension are respected.

If the requested dimension is larger than the CoordinateSequence implementation can provide, then a sequence of maximum possible dimension should be created. An error should not be thrown.

This method is functionally identical to calling csFactory.create(size,dim) - it contains additional logic to work around a limitation on the commonly used CoordinateArraySequenceFactory.

@param size the number of coordinates in the sequence @param dimension the dimension of the coordinates in the sequence

Implementation

static CoordinateSequence createCS(
    CoordinateSequenceFactory csFactory, int size, int dimension) {
  // the coordinates don't have measures
  return createCSMeas(csFactory, size, dimension, 0);
}