midpoint method

Point midpoint()

Returns the midPoint of the LineString.

Example:

LineString([Coordinate(1, 2), Coordinate(3, 4)]).midpoint(); // Point(Coordinate(2, 3))

Implementation

Point midpoint() {
  return along(length / 2);
}