/[projects]/dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/Adresse.java
ViewVC logotype

Diff of /dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/Adresse.java

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

revision 2210 by torben, Wed Apr 30 08:15:48 2014 UTC revision 2211 by torben, Thu Sep 11 20:44:20 2014 UTC
# Line 1  Line 1 
1  package dk.daoas.fulddaekning;  package dk.daoas.fulddaekning;
2    
3  public class Adresse {  public class Adresse extends GeoPoint {
4          public int id;          public int id;
5          public int postnr;          public int postnr;
6          public String adresse;          public String adresse;
7          public int gadeid;          public int gadeid;
8          public int husnr;          public int husnr;
9          public String husnrbogstav;          public String husnrbogstav;
         public double latitude;  
         public double longitude;  
10          public String rute;          public String rute;
11                    
12                    
# Line 17  public class Adresse { Line 15  public class Adresse {
15                  return "Adresse id=" + id+ " postnr=" + postnr + " adresse=" + adresse;                  return "Adresse id=" + id+ " postnr=" + postnr + " adresse=" + adresse;
16          }          }
17                    
         public static double beregnAfstand(Adresse adr1, Adresse adr2) {                  
                 //(62.8*sqrt(3.1*(Power(a.Latitude-x.Latitude,2)+Power(a.Longitude-x.Longitude,2)))) as Afstand,  
                   
                   
                 double pwrLat = Math.pow(adr1.latitude - adr2.latitude, 2);  
                 double pwrLng = Math.pow(adr1.longitude-adr2.longitude, 2);  
                   
                 return 62.8 * Math.sqrt( 3.1 * (pwrLat + pwrLng) );  
                   
         }  
           
           
           
18  }  }

Legend:
Removed from v.2210  
changed lines
  Added in v.2211

  ViewVC Help
Powered by ViewVC 1.1.20