getSegmentEnd method

Coordinate? getSegmentEnd()

Gets the second {@link Coordinate} of the current segment. (the coordinate of the next vertex). If the iterator is at the end of a line, null is returned.

@return a {@link Coordinate} or null

Implementation

Coordinate? getSegmentEnd() {
  if (vertexIndex < getLine().getNumPoints() - 1)
    return currentLine!.getCoordinateN(vertexIndex + 1);
  return null;
}