class BufferComputing {

  public static ILineString buildHalfOffsetLine(Side side, ILineString line,
      double distance) {
    IPolygon offsetBuffer = buildHalfOffsetBuffer(side, line, distance);
    IDirectPositionList pts = offsetBuffer.coord();

    for (IDirectPosition pt : line.coord())
      pts.remove(pt);
    // then remove the last point of the polygon
    pts.remove(pts.size() - 1);

    return new GM_LineString(pts);

  }

}