/[projects]/dao/DaoAdresseVedligehold/src/main/java/dk/daoas/adressevedligehold/afstandandenrute/GeoPointHelper.java
ViewVC logotype

Diff of /dao/DaoAdresseVedligehold/src/main/java/dk/daoas/adressevedligehold/afstandandenrute/GeoPointHelper.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2878 by torben, Sat Jan 30 14:05:53 2016 UTC revision 2941 by torben, Sat Feb 13 06:34:26 2016 UTC
# Line 31  public class GeoPointHelper { Line 31  public class GeoPointHelper {
31          /* :: This function converts decimal degrees to radians : */          /* :: This function converts decimal degrees to radians : */
32          /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */          /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
33          private static double deg2rad(double deg) {          private static double deg2rad(double deg) {
34                  return (deg * Math.PI / 180.0);                  return deg * Math.PI / 180.0;
35          }          }
36    
37          /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */          /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
38          /* :: This function converts radians to decimal degrees : */          /* :: This function converts radians to decimal degrees : */
39          /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */          /* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
40          private static double rad2deg(double rad) {          private static double rad2deg(double rad) {
41                  return (rad * 180 / Math.PI);                  return rad * 180 / Math.PI;
42          }          }
43    
44          // http://www.geodatasource.com/developers/java          // http://www.geodatasource.com/developers/java
# Line 54  public class GeoPointHelper { Line 54  public class GeoPointHelper {
54    
55                  // indtil nu er dist i miles - så vi omregner lige til km                  // indtil nu er dist i miles - så vi omregner lige til km
56                  dist = dist * 1.609344;                  dist = dist * 1.609344;
57                  return (dist);                  return dist;
58          }          }
59    
60          public static double beregnAfstand(Address p1, Address p2) {          public static double beregnAfstand(Address p1, Address p2) {

Legend:
Removed from v.2878  
changed lines
  Added in v.2941

  ViewVC Help
Powered by ViewVC 1.1.20