code: public Coordinate snap(Coordinate coordinate) {
  		Coordinate result = coordinate;
  		currentDistance = Double.MAX_VALUE;
  		hasSnapped = false;
  
  		for (SnappingRule snappingRule : snappingRules) {
  			if (!hasSnapped) {
  				double distance = Math.min(currentDistance, snappingRule.getDistance());
  				result = snappingRule.getAlgorithm().snap(coordinate, distance);
  				if (snappingRule.getAlgorithm().hasSnapped()) {
  					currentDistance = snappingRule.getAlgorithm().getCalculatedDistance();
  					hasSnapped = true;
  				}
  			}
  		}
  		eventBus.fireEvent(new CoordinateSnapEvent(coordinate, result));
  		return result;
  	}
docs: Using the current list of snapping rules, try to snap the given coordinate. Fires a {@link CoordinateSnapEvent}
  in any case (whether snapping occurred or not).
  
  @param coordinate The original location.
  @return The returned (perhaps snapped) location. If no snapping occurred, the original location is returned.