Replies the nearest bus hub to the given point.

@param x x coordinate.
@param y y coordinate.
@return the nearest bus hub or <code>null</code> if none was found.
12254
@Pure
	public BusHub getNearestBusHub(double x, double y) {
		double distance = Double.POSITIVE_INFINITY;
		BusHub bestHub = null;
		double dist;

		for (final BusHub hub : this.validBusHubs) {
			dist = hub.distance(x, y);
			if (dist < distance) {
				distance = dist;
				bestHub = hub;
			}
		}

		return bestHub;
	}
476825
@Pure
	public final BusItineraryHalt getNearestBusHalt(Point2D<?, ?> point) {
		return getNearestBusHalt(point.getX(), point.getY());
	}
127097
@Pure
	public static Point2d L93_L4(double x, double y) {
		final Point2d ntfLambdaPhi = NTFLambert_NTFLambdaPhi(x, y,
				LAMBERT_93_N,
				LAMBERT_93_C,
				LAMBERT_93_XS,
				LAMBERT_93_YS);
		return NTFLambdaPhi_NTFLambert(
				ntfLambdaPhi.getX(), ntfLambdaPhi.getY(),
				LAMBERT_4_N,
				LAMBERT_4_C,
				LAMBERT_4_XS,
				LAMBERT_4_YS);
	}
1052869
public Point getScreenCoords (int x, int y)
    {
        return MisoUtil.fullToScreen(_metrics, x, y, new Point());
    }
508731
public Shape<?> findShapeAtPoint(final int x, final int y)
    {
        if (isVisible())
        {
            final SelectionLayer selection = getSelectionLayer();

            if (null != selection)
            {
                final ImageDataPixelColor rgba = selection.getContext().getImageDataPixelColor(x, y);// x,y is adjusted to canvas coordinates in event dispatch

                if (null != rgba)
                {
                    if (rgba.getA() != 255)
                    {
                        return null;
                    }
                    final Shape<?> shape = m_shape_color_map.get(rgba.toBrowserRGB());

                    if ((null != shape) && (shape.isVisible()))
                    {
                        return shape;
                    }
                }
            }
        }
        return null;
    }
661944
public Point rotateAndScalePoint(int x, int y, Point reuse) {
		return applyMatrixToPoint(x, y, reuse, mRotateAndScaleMatrix, mOrientation != 0);
	}
968720
@Override
	@Pure
	public final P getNearest(Point2D<?, ?> position) {
		final Pair<P, Double> data = getNearestData(position.getX(), position.getY());
		if (data != null) {
			return data.getKey();
		}
		return null;
	}
750339
@Pure
	public static Point2d L2_L1(double x, double y) {
		final Point2d ntfLambdaPhi = NTFLambert_NTFLambdaPhi(x, y,
				LAMBERT_2_N,
				LAMBERT_2_C,
				LAMBERT_2_XS,
				LAMBERT_2_YS);
		return NTFLambdaPhi_NTFLambert(
				ntfLambdaPhi.getX(), ntfLambdaPhi.getY(),
				LAMBERT_1_N,
				LAMBERT_1_C,
				LAMBERT_1_XS,
				LAMBERT_1_YS);
	}
646702
@Pure
	public static GeodesicPosition EL2_WSG84(double x, double y) {
		final Point2d ntfLambdaPhi = NTFLambert_NTFLambdaPhi(x, y,
				LAMBERT_2E_N,
				LAMBERT_2E_C,
				LAMBERT_2E_XS,
				LAMBERT_2E_YS);
		return NTFLambdaPhi_WSG84(ntfLambdaPhi.getX(), ntfLambdaPhi.getY());
	}
654769
public static boolean isInside(Circle circle, double x, double y)
    {
        return distanceFromCenter(circle, x, y) < circle.getRadius();
    }
135098
@Pure
	public static Point2d L1_L4(double x, double y) {
		final Point2d ntfLambdaPhi = NTFLambert_NTFLambdaPhi(x, y,
				LAMBERT_1_N,
				LAMBERT_1_C,
				LAMBERT_1_XS,
				LAMBERT_1_YS);
		return NTFLambdaPhi_NTFLambert(
				ntfLambdaPhi.getX(), ntfLambdaPhi.getY(),
				LAMBERT_4_N,
				LAMBERT_4_C,
				LAMBERT_4_XS,
				LAMBERT_4_YS);
	}
711313
public double get(double x, double epsilon)
    {
        Point nearest = getNearest(x, epsilon);
        return nearest.getY();
    }
1008078
public float distanceSquared(Vector2f point) {
		getClosestPoint(point, closest);
		closest.sub(point);

		float result = closest.lengthSquared();

		return result;
	}
882860
public static Location of(final Point point) {
		requireNonNull(point);
		return of(
			point.getLatitude(),
			point.getLongitude(),
			point.getElevation().orElse(null)
		);
	}
575946
@Pure
	public static GeodesicPosition L4_WSG84(double x, double y) {
		final Point2d ntfLambdaPhi = NTFLambert_NTFLambdaPhi(x, y,
				LAMBERT_4_N,
				LAMBERT_4_C,
				LAMBERT_4_XS,
				LAMBERT_4_YS);
		return NTFLambdaPhi_WSG84(ntfLambdaPhi.getX(), ntfLambdaPhi.getY());
	}
668844
public static Coordinate getCenterPoint(Bbox bbox) {
		double centerX = (bbox.getWidth() == 0 ? bbox.getX() : bbox.getX() + bbox.getWidth() / 2);
		double centerY = (bbox.getHeight() == 0 ? bbox.getY() : bbox.getY() + bbox.getHeight() / 2);
		return new Coordinate(centerX, centerY);
	}
230112
public Point unrotateAndScalePoint(int x, int y, Point reuse) {
		return applyMatrixToPoint(x, y, reuse, mUnrotateAndScaleMatrix, mOrientation != 0);
	}