class CommonAlgorithmsFromCartAGen {

  public static ILineString openRingAtIndex(IRing ring, int index) {
    IDirectPositionList list = new DirectPositionList();
    for (int i = index; i < ring.coord().size() - 1; i++)
      list.add(ring.coord().get(i));
    for (int i = 0; i < index; i++)
      list.add(ring.coord().get(i));
    return new GM_LineString(list);
  }

}