docs: protected final void computeGeoLocationForDistance(double desired_distance, double shifting,
  			Point2D<?, ?> geoLocation, Vector2D<?, ?> tangent) {
  		assert geoLocation != null;
  		double desiredDistance = desired_distance;
  		for (final PointGroup group : groups()) {
  			Point2d prevPoint = null;
  
  			for (final Point2d thepoint : group.points()) {
  				if (prevPoint != null) {
  					// Compute the length between the current point and the previous point
  					double vx = thepoint.getX() - prevPoint.getX();
  					double vy = thepoint.getY() - prevPoint.getY();
  					final double norm = Math.hypot(vx, vy);
  					if (desiredDistance < norm && norm != 0) {
  						// The desired distance is on this part's segment
  						if (norm != 0) {
  
  							// Compute the vector and the new point
  							vx /= norm;
  							double px = vx * desiredDistance + prevPoint.getX();
  
  							vy /= norm;
  							double py = vy * desiredDistance + prevPoint.getY();
  
  							if (tangent != null) {
  								tangent.set(vx, vy);
  							}
  
  							// Shift the point on the left or on the right depending on
  							// the sign of the shifting value
  							if (shifting != 0) {
  								final Vector2d perpend = new Vector2d(vx, vy);
  								perpend.makeOrthogonal();
  								perpend.scale(shifting);
  								px += perpend.getX();
  								py += perpend.getY();
  							}
  
  							geoLocation.set(px, py);
  							return;
  						}
  						if (tangent != null) {
  							tangent.set(Double.NaN, Double.NaN);
  						}
  						geoLocation.set(thepoint);
  						return;
  					}
  					// pass to the next couple of points
  					desiredDistance -= norm;
  				}
  				prevPoint = thepoint;
  			}
  		}
  		// The end of the segment was reached
  		final int ptsCount = getPointCount();
  		final Point2d p0 = getPointAt(ptsCount - 2);
  		final Point2d p1 = getPointAt(ptsCount - 1);
  		if (tangent != null) {
  			// The tangent is colinear to the last segment
  			tangent.sub(p1, p0);
  			tangent.normalize();
  		}
  		if (shifting != 0.) {
  			final Vector2d perpend = new Vector2d(
  					p1.getX() - p0.getX(),
  					p1.getY() - p0.getY());
  			perpend.normalize();
  			perpend.makeOrthogonal();
  			perpend.scale(shifting);
  			geoLocation.set(
  					p1.getX() + perpend.getX(),
  					p1.getY() + perpend.getY());
  		} else {
  			geoLocation.set(p1);
  		}
  	}