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

Contents of /dao/FuldDaekningWorker/src/main/java/dk/daoas/fulddaekning/Adresse.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2744 - (show annotations) (download)
Wed Oct 7 19:32:00 2015 UTC (8 years, 7 months ago) by torben
File size: 985 byte(s)
Ny k-d tree implementation
1 package dk.daoas.fulddaekning;
2
3 import com.jwetherell.algorithms.data_structures.KdTree;
4
5 public class Adresse extends KdTree.XYZPoint {
6 public int id;
7 public short postnr;
8 public String vejnavn;
9 public int gadeid;
10 public short husnr;
11 public String husnrbogstav;
12 public String rute;
13 public short ho;
14
15 public double latitude;
16 public double longitude;
17
18 public double xyz[] = new double[3];
19
20 public Adresse(Double latitude, Double longitude) {
21 super(latitude, longitude);
22
23 this.latitude = latitude;
24 this.longitude = longitude;
25
26 xyz[0] = Math.cos(Math.toRadians(latitude)) * Math.cos(Math.toRadians(longitude));
27 xyz[1] = Math.cos(Math.toRadians(latitude)) * Math.sin(Math.toRadians(longitude));
28 xyz[2] = Math.sin(Math.toRadians(latitude));
29
30 }
31
32
33 @Override
34 public String toString() {
35 return "Adresse id=" + id+ " postnr=" + postnr + " adresse=" + vejnavn + " " + husnr + husnrbogstav + " ho=" + ho;
36 }
37
38 }

  ViewVC Help
Powered by ViewVC 1.1.20