class GM_LineString extends GM_CurveSegment implements ILineString {

  @Override
  public IDirectPosition param(double s) {
    double d = 0;
    for (int i = 0; i < this.sizeControlPoint() - 1; i++) {
      IDirectPosition p1 = this.getControlPoint(i);
      IDirectPosition p2 = this.getControlPoint(i + 1);
      double length = p1.distance(p2);
      if (s <= d + length) {
        IDirectPosition point = Operateurs.param(s - d, p1, p2);
        return point;
      } else {
        d += length;
      }
    }
    return null;
  }

  public  GM_LineString(List<IDirectPosition> list, boolean allowRepeated);
  public  GM_LineString(List<IDirectPosition> list);
  public  GM_LineString(IDirectPosition... list);
  public  GM_LineString(IDirectPositionList points);
  public  GM_LineString(IDirectPositionList points, boolean allowRepeated);

}