If a line is closed, the boundary is the empty set, otherwise it is the 2 endpoints. I thought about doing something like:
  lazy val boundary: Option[(Point, Point)] = {
    if (isClosed) {
      None
    } else {
      val endpoints = geom.getBoundary.getCoordinates
      Some(endpoint(0), endpoint(1))
    }
  }

But, it didn't seem to fit in with what we had been doing so far.