Fix tabs-vs-spaces warning, remove extra debugging.
parent
3158d945aa
commit
1c96a66db9
|
|
@ -11,8 +11,6 @@ if (pc) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print("hello world");
|
|
||||||
|
|
||||||
function writeDir(json) {
|
function writeDir(json) {
|
||||||
json_str = JSON.stringify(json, "", " ");
|
json_str = JSON.stringify(json, "", " ");
|
||||||
dirent = '' + json_str.length;
|
dirent = '' + json_str.length;
|
||||||
|
|
@ -66,9 +64,7 @@ function readTarFile(tar, f) {
|
||||||
json_off = st.read(tar, 0, 16) * 1;
|
json_off = st.read(tar, 0, 16) * 1;
|
||||||
print(json_off);
|
print(json_off);
|
||||||
json = st.read(tar, json_off, -1);
|
json = st.read(tar, json_off, -1);
|
||||||
//print(json);
|
|
||||||
files = JSON.parse(json);
|
files = JSON.parse(json);
|
||||||
//print(files);
|
|
||||||
rec = files[f];
|
rec = files[f];
|
||||||
return st.read(tar, rec.st, rec.si);
|
return st.read(tar, rec.st, rec.si);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ function tileToLatLon(x, y, z, x_, y_) {
|
||||||
var [ w, s, e, n ] = merc.bbox(x, y, z);
|
var [ w, s, e, n ] = merc.bbox(x, y, z);
|
||||||
var lon = (e - w) * (x_ / 4096) + w;
|
var lon = (e - w) * (x_ / 4096) + w;
|
||||||
var lat = (n - s) * (1-(y_ / 4096)) + s;
|
var lat = (n - s) * (1-(y_ / 4096)) + s;
|
||||||
//console.log("to ", lon, lat);
|
|
||||||
return [ lon, lat ];
|
return [ lon, lat ];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -25,7 +24,6 @@ function convGeom(tile, geom) {
|
||||||
for (i = 0; i< geom.length; i++) {
|
for (i = 0; i< geom.length; i++) {
|
||||||
var x = geom[i][0];
|
var x = geom[i][0];
|
||||||
var y = geom[i][1];
|
var y = geom[i][1];
|
||||||
//console.log("Geometry: ", geom, geom.length, "X,y", x, y);
|
|
||||||
var pos = tileToLatLon(tile.x, tile.y, tile.z, x, y);
|
var pos = tileToLatLon(tile.x, tile.y, tile.z, x, y);
|
||||||
g.push(pos);
|
g.push(pos);
|
||||||
}
|
}
|
||||||
|
|
@ -136,11 +134,6 @@ var merc = new sphm({
|
||||||
antimeridian: true
|
antimeridian: true
|
||||||
});
|
});
|
||||||
|
|
||||||
//console.log(merc.ll([124, 123], 15));
|
|
||||||
//console.log(merc.px([17734, 11102], 15));
|
|
||||||
//console.log(merc.bbox(17734, 11102, 15));
|
|
||||||
//return;
|
|
||||||
|
|
||||||
console.log("Splitting data");
|
console.log("Splitting data");
|
||||||
var meta = {}
|
var meta = {}
|
||||||
meta.min_zoom = 0;
|
meta.min_zoom = 0;
|
||||||
|
|
@ -167,10 +160,7 @@ for (const id in index.tiles) {
|
||||||
const z = tile.z;
|
const z = tile.z;
|
||||||
console.log(num++, ":", tile.x, tile.y, z);
|
console.log(num++, ":", tile.x, tile.y, z);
|
||||||
var d = index.getTile(z, tile.x, tile.y).features;
|
var d = index.getTile(z, tile.x, tile.y).features;
|
||||||
//console.log(d);
|
|
||||||
var n = `delme/z${z}-${tile.x}-${tile.y}` ;
|
var n = `delme/z${z}-${tile.x}-${tile.y}` ;
|
||||||
//output[n] = d;
|
|
||||||
//console.log(n);
|
|
||||||
writeTile(n, d, tile)
|
writeTile(n, d, tile)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue