midpoint method
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);
}
Returns the midPoint of the LineString.
Example:
LineString([Coordinate(1, 2), Coordinate(3, 4)]).midpoint(); // Point(Coordinate(2, 3))
Point midpoint() {
return along(length / 2);
}