summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1cc1900)
This avoids locale-specific number formatting, which breaks
googleearth when importing the resulting file.
Signed-off-by: Keith Packard <keithp@keithp.com>
package org.altusmetrum.altoslib_6;
import java.io.*;
package org.altusmetrum.altoslib_6;
import java.io.*;
+import java.util.*;
+
+class KMLWriter extends PrintWriter {
+ public PrintWriter printf(String format, Object ... arguments) {
+ return printf(Locale.ROOT, format, arguments);
+ }
+
+ public KMLWriter(File name) throws FileNotFoundException {
+ super(name);
+ }
+}
public class AltosKML implements AltosWriter {
File name;
public class AltosKML implements AltosWriter {
File name;
int flight_state = -1;
AltosState prev = null;
double gps_start_altitude;
int flight_state = -1;
AltosState prev = null;
double gps_start_altitude;
+ if (out != null) {
+ out.close();
+ out = null;
+ }
}
public void write(AltosState state) {
}
public void write(AltosState state) {
public AltosKML(File in_name) throws FileNotFoundException {
name = in_name;
public AltosKML(File in_name) throws FileNotFoundException {
name = in_name;
- out = new PrintStream(name);
+ out = new KMLWriter(name);
}
public AltosKML(String in_string) throws FileNotFoundException {
}
public AltosKML(String in_string) throws FileNotFoundException {