createLineString method

LineString createLineString(
  1. List<Coordinate>? coordinates
)

Creates a LineString using the given Coordinates. A null or empty array creates an empty LineString.

@param coordinates an array without null elements, or an empty array, or null

Implementation

LineString createLineString(List<Coordinate>? coordinates) {
  return createLineStringSeq(coordinates != null
      ? getCoordinateSequenceFactory().create(coordinates)
      : null);
}