|
|
|
@ -66,7 +66,7 @@ public class IntegerGeoPoint implements GeoPoint {
|
|
|
|
|
return Math.abs(int2coord(1) - int2coord(2));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static final double maxint = new Double(Integer.MAX_VALUE).doubleValue();
|
|
|
|
|
private static final double maxint = (double) Integer.MAX_VALUE;
|
|
|
|
|
private static final double upscale = maxint / 360.0d;
|
|
|
|
|
|
|
|
|
|
private static final int coord2int(double coord) {
|
|
|
|
@ -92,7 +92,7 @@ public class IntegerGeoPoint implements GeoPoint {
|
|
|
|
|
@Override
|
|
|
|
|
public boolean equals(final Object o) {
|
|
|
|
|
if (!(o instanceof IntegerGeoPoint)) return false;
|
|
|
|
|
IntegerGeoPoint oo = (IntegerGeoPoint) o;
|
|
|
|
|
final IntegerGeoPoint oo = (IntegerGeoPoint) o;
|
|
|
|
|
return (this.latlon == oo.latlon);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -102,9 +102,9 @@ public class IntegerGeoPoint implements GeoPoint {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
double lat = 13.419444d;
|
|
|
|
|
double lon = 52.548611d;
|
|
|
|
|
GeoPoint c = new IntegerGeoPoint(lat, lon);
|
|
|
|
|
final double lat = 13.419444d;
|
|
|
|
|
final double lon = 52.548611d;
|
|
|
|
|
final GeoPoint c = new IntegerGeoPoint(lat, lon);
|
|
|
|
|
System.out.println(c.toString() + " #" + c.hashCode());
|
|
|
|
|
System.out.println("error: lat: " + (Math.abs(c.lat() - lat) / meter) + " meter; lon: " + (Math.abs(c.lon() - lon) / meter) + " meter");
|
|
|
|
|
System.out.println("accuracyLat = " + c.accuracyLat() / meter + " meter, accuracyLon = " + c.accuracyLon() / meter + " meter");
|
|
|
|
|