summaryrefslogtreecommitdiffstats
path: root/DataStructure/Interpolator.java
diff options
context:
space:
mode:
Diffstat (limited to 'DataStructure/Interpolator.java')
-rw-r--r--DataStructure/Interpolator.java35
1 files changed, 33 insertions, 2 deletions
diff --git a/DataStructure/Interpolator.java b/DataStructure/Interpolator.java
index 3869255..14310d8 100644
--- a/DataStructure/Interpolator.java
+++ b/DataStructure/Interpolator.java
@@ -4,6 +4,9 @@ import helper.ListBTS;
import java.awt.geom.Path2D;
import java.awt.geom.Point2D;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.ObjectOutputStream;
import java.util.ArrayList;
import java.util.Date;
@@ -29,6 +32,30 @@ public class Interpolator extends GSMMap {
}
+ public void toGoogleKml(String filename) throws IOException {
+ new GoogleOut(this, filename).write();
+ }
+
+ /**
+ * Saves GSM map as Object on filesystem
+ *
+ * @param filename
+ */
+ public void save(String filename) {
+
+ try {
+ FileOutputStream fos = new FileOutputStream(filename);
+ ObjectOutputStream out = new ObjectOutputStream(fos);
+ out.writeObject(this);
+ out.close();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ // e.printStackTrace();
+ System.out.println("Cannot write Object to filesystem");
+ }
+ System.out.println("GSMmap saved");
+ }
+
/**
* Interpolates every Point on the map,every arfcn
*/
@@ -346,19 +373,23 @@ public class Interpolator extends GSMMap {
public int x;
public int y;
public SingleBTS what;
+
public voronoi primary;
@Override
public void run() {
- if (x < Xcoords.length && y < Ycoords.length)
+ if (x < Xcoords.length && y < Ycoords.length) {
+ voronoi primary = new voronoi();
+ primary.sortNode(Interpolator.this, what.ARFCN, 1);
interpolateAT(x, y, what, primary);
+ }
}
public interpolateThread(int x, int y, SingleBTS what, voronoi primary) {
this.x = x;
this.y = y;
this.what = what;
- this.primary = primary;
+ // this.primary=primary;
}
}