Revision 10450 branches/simbologia/libraries/libFMap/src/com/iver/cit/gvsig/fmap/tools/geo/Geo.java

View differences:

Geo.java
13 13
    public static double SqKm = 707632.4; /* Square km per spherical degree. */
14 14
    public static double SqM = 707632400000.0; /* Square M per spherical degree. */
15 15

  
16
    double hav(double X)/*  Haversine function: hav(x)= (1-cos(x))/2.  */
17
     {
16
    public static double getDecimalDegrees(double m) {
17
    	///(m*180)/ (6378137.0 * Math.PI)
18
    	return (m*8.983152841195214E-6);
19
    }
20

  
21
    /*  Haversine function: hav(x)= (1-cos(x))/2.  */
22
    private static double hav(double X){
18 23
        return (1.0 - Math.cos(X)) / 2.0;
19 24
    }
20 25

  
21 26
    /*  Returns the area of a spherical polygon in spherical degrees,
22 27
    given the latitudes and longitudes in Lat and Lon, respectively.
23 28
    The N data points have indices which range from 0 to N-1. */
24
    public double sphericalPolyArea(double[] lat, double[] lon, int n) {
29
    public static double sphericalPolyArea(double[] lat, double[] lon, int n) {
25 30
        int j;
26 31
        int k;
27 32
        double lam1;

Also available in: Unified diff