cleanup
This commit is contained in:
parent
b410059282
commit
fa989aba66
@ -377,69 +377,4 @@ public class MapDatabase implements IMapDatabase {
|
||||
int count = data.getInt();
|
||||
parseGeometryArray(data, count);
|
||||
}
|
||||
|
||||
// taken from mapsforge GeoUtils
|
||||
// private static final double EQUATORIAL_RADIUS = 6378137.0;
|
||||
// private static final double[] EPSILON_ZERO = new double[] { 0, 0 };
|
||||
//
|
||||
// static double latitudeDistance(int meters) {
|
||||
// return (meters * 360) / (2 * Math.PI * EQUATORIAL_RADIUS);
|
||||
// }
|
||||
//
|
||||
// static double longitudeDistance(int meters, double latitude) {
|
||||
// return (meters * 360) / (2 * Math.PI * EQUATORIAL_RADIUS * Math.cos(Math.toRadians(latitude)));
|
||||
// }
|
||||
//
|
||||
// private static double[] bufferInDegrees(long tileY, byte zoom, int enlargementInMeter) {
|
||||
// if (enlargementInMeter == 0) {
|
||||
// return EPSILON_ZERO;
|
||||
// }
|
||||
//
|
||||
// double[] epsilons = new double[2];
|
||||
// double lat = MercatorProjection.tileYToLatitude(tileY, zoom);
|
||||
// epsilons[0] = latitudeDistance(enlargementInMeter);
|
||||
// epsilons[1] = longitudeDistance(enlargementInMeter, lat);
|
||||
//
|
||||
// return epsilons;
|
||||
// }
|
||||
//
|
||||
// static String tileToBOX3D(Tile tile, int pixel) {
|
||||
// double minLat = MercatorProjection.pixelYToLatitude(tile.getPixelY() + Tile.TILE_SIZE + pixel, tile.zoomLevel);
|
||||
// double maxLat = MercatorProjection.pixelYToLatitude(tile.getPixelY() - pixel, tile.zoomLevel);
|
||||
//
|
||||
// double minLon = MercatorProjection.pixelXToLongitude(tile.getPixelX() - pixel, tile.zoomLevel);
|
||||
// double maxLon = MercatorProjection.pixelXToLongitude(tile.getPixelX() + Tile.TILE_SIZE + pixel, tile.zoomLevel);
|
||||
//
|
||||
// return "ST_SetSRID('BOX3D(" + minLon + " " + minLat + ", " + " " + maxLon + " " + maxLat + ")'::box3d ,4326)";
|
||||
// }
|
||||
//
|
||||
// static String tileToBOX3D(Tile tile, int pixel, int projection) {
|
||||
//
|
||||
// double minLat = MercatorProjection.pixelYToLatitude(tile.getPixelY() + Tile.TILE_SIZE + pixel, tile.zoomLevel);
|
||||
// double maxLat = MercatorProjection.pixelYToLatitude(tile.getPixelY() - pixel, tile.zoomLevel);
|
||||
//
|
||||
// double minLon = MercatorProjection.pixelXToLongitude(tile.getPixelX() - pixel, tile.zoomLevel);
|
||||
// double maxLon = MercatorProjection.pixelXToLongitude(tile.getPixelX() + Tile.TILE_SIZE + pixel, tile.zoomLevel);
|
||||
//
|
||||
// return String
|
||||
// .format("ST_Transform(ST_SetSRID('BOX3D(%f %f, %f %f)'::box3d , 4326), %d)",
|
||||
// new Double(minLon), new Double(minLat), new Double(maxLon), new Double(maxLat), new Integer(
|
||||
// projection));
|
||||
// }
|
||||
//
|
||||
// static String tileToBOX3D(long tileX, long tileY, byte zoom, int enlargementInMeter) {
|
||||
// double minLat = MercatorProjection.tileYToLatitude(tileY + 1, zoom);
|
||||
// double maxLat = MercatorProjection.tileYToLatitude(tileY, zoom);
|
||||
// double minLon = MercatorProjection.tileXToLongitude(tileX, zoom);
|
||||
// double maxLon = MercatorProjection.tileXToLongitude(tileX + 1, zoom);
|
||||
//
|
||||
// double[] epsilons = bufferInDegrees(tileY, zoom, enlargementInMeter);
|
||||
//
|
||||
// minLon -= epsilons[1];
|
||||
// minLat -= epsilons[0];
|
||||
// maxLon += epsilons[1];
|
||||
// maxLat += epsilons[0];
|
||||
//
|
||||
// return "ST_SetSRID('BOX3D(" + minLon + " " + minLat + ", " + " " + maxLon + " " + maxLat + ")'::box3d ,4326)";
|
||||
// }
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user