Java Degree to Meter degToMeters(double deg)

Here you can find the source of degToMeters(double deg)

Description

deg To Meters

License

Open Source License

Declaration

public static double degToMeters(double deg) 

Method Source Code

//package com.java2s;

public class Main {
    public static double degToMeters(double deg) {
        // Converts an angle (lon or lat) to meters.
        // We assume a spherical Earth and being at the sea level.
        double earthRadius = 6371 * 1000; // in meters
        return (deg * Math.PI * earthRadius / 180);
    }/*from  www  . ja  v  a 2  s .  c  o  m*/
}