Java Distance Calculate squareDist31TileMetric(int x1, int y1, int x2, int y2)

Here you can find the source of squareDist31TileMetric(int x1, int y1, int x2, int y2)

Description

square Dist Tile Metric

License

Open Source License

Declaration

public static double squareDist31TileMetric(int x1, int y1, int x2, int y2) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static double squareDist31TileMetric(int x1, int y1, int x2, int y2) {
        // translate into meters 
        double dy = convert31YToMeters(y1, y2);
        double dx = convert31XToMeters(x1, x2);
        return dx * dx + dy * dy;
    }//ww w .j a  v a  2  s.co m

    public static double convert31YToMeters(double y1, double y2) {
        // translate into meters 
        return (y1 - y2) * 0.01863d;
    }

    public static double convert31XToMeters(double x1, double x2) {
        // translate into meters 
        return (x1 - x2) * 0.011d;
    }
}

Related

  1. distVincentyRAD(double lat1, double lon1, double lat2, double lon2)
  2. getDistance(double lat1, double lng1, double lat2, double lng2)
  3. sqrDistance(float x1, float y1, float x2, float y2)
  4. squaredDistance(float[] p, int a, int b)
  5. squaredEuclideanDistance(double[] x, double[] y)
  6. squareDistance(double pointAX, double pointAY, double pointBX, double pointBY)
  7. squareDistance(double x1, double y1, double x2, double y2)
  8. squaredistance(double[] v1, double[] v2)
  9. squareDistance(final double[] a, final double[] b)