createFromSequence method

CoordinateSequence createFromSequence(
  1. CoordinateSequence coordSeq
)
override

@see CoordinateSequenceFactory#create(CoordinateSequence)

Implementation

CoordinateSequence createFromSequence(CoordinateSequence coordSeq) {
  int dimension = coordSeq.getDimension();
  int measures = coordSeq.getMeasures();
  if (type == DOUBLE) {
    return Double.fromCoordinatesDimMeas(
        coordSeq.toCoordinateArray(), dimension, measures);
  } else {
    throw ArgumentError("Only PackedCoordinateSequence Double supported");
  }
}