summaryrefslogtreecommitdiffstats
path: root/VoronoiInterpolate.java
blob: fbb8ab8a6f269d4bd3e888defbbe311d4b445b29 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.sql.SQLException;

import DataStructure.GoogleOut;
import DataStructure.Interpolator;
import Parse.NMEAParse;
import Parse.sqlreader;

public class VoronoiInterpolate {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			sqlreader sql = new sqlreader(new NMEAParse("vorabbaubooster.log"),
					262026003662195l, 3000l);
			Interpolator map = new Interpolator(sql, 0.00004);
			map.average();
			map.removeOutlier();
			GoogleOut average = new GoogleOut(map, "average-all.kml");
			average.write();
			// int size = 3;
			map.interpolateVR();
			// breakpoint bei arfcn 880, x=60, y=13!!!!!
			GoogleOut google = new GoogleOut(map, "voronoi-interpolation.kml");
			google.write();

			// gsmmap speichern
			FileOutputStream fos = new FileOutputStream(
					"interpolatedGSMMap.obj");
			ObjectOutputStream oos = new ObjectOutputStream(fos);
			oos.writeObject(map);

		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

}