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

Contents of /dao/FuldDaekningWorker/src/dk/daoas/fulddaekning/GeoPoint.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2211 - (show annotations) (download)
Thu Sep 11 20:44:20 2014 UTC (9 years, 8 months ago) by torben
File size: 617 byte(s)
Bedre validering af postnr BBox størrelse
1 package dk.daoas.fulddaekning;
2
3 public class GeoPoint {
4
5 public double latitude;
6 public double longitude;
7
8 public GeoPoint() { //Default
9 }
10
11 public GeoPoint(double lat, double lng) { //Default
12 latitude=lat;
13 longitude=lng;
14 }
15
16 public static double beregnAfstand(GeoPoint point1, GeoPoint point2) {
17 //(62.8*sqrt(3.1*(Power(a.Latitude-x.Latitude,2)+Power(a.Longitude-x.Longitude,2)))) as Afstand,
18
19
20 double pwrLat = Math.pow(point1.latitude - point2.latitude, 2);
21 double pwrLng = Math.pow(point1.longitude - point2.longitude, 2);
22
23 return 62.8 * Math.sqrt( 3.1 * (pwrLat + pwrLng) );
24 }
25 }

  ViewVC Help
Powered by ViewVC 1.1.20