/**
   * Stop splitting the geometry.
   *
   * @param callback the {@link GeometryArrayFunction} to be executed after the splitting has
   *     stopped
   */
  public void stop(final GeometryArrayFunction callback) {
    started = false;
    service.stop();
    if (callback != null) {
      calculate(
          new GeometryArrayFunction() {

            public void execute(Geometry[] geometries) {
              callback.execute(geometries);
              splitLine = null;
              eventBus.fireEvent(new GeometrySplitStopEvent(geometry));
            }
          });
    } else {
      eventBus.fireEvent(new GeometrySplitStopEvent(geometry));
      splitLine = null;
    }
  }