Renamed vector-tile files from z:y:x to z-y-x schema

pull/51/head
Manuel Roth 2015-10-27 13:49:01 +01:00
rodzic 03de42f001
commit b6d4407ad2
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -5,14 +5,14 @@ var Protobuf = require('pbf');
var tileInformation = require('./tileInformation.js');
var http = require('http');
var urls = ['0:0:0', '1:1:0', '2:2:0', '3:4:2', '4:8:5', '5:16:11', '6:33:22', '7:67:44', '8:134:89', '9:268:179', '10:536:358', '11:1072:717', '12:2145:1434', '13:4290:2868', '14:8580:5737', '15:17161:11474'];
var urls = ['0-0-0', '1-1-0', '2-2-0', '3-4-2', '4-8-5', '5-16-11', '6-33-22', '7-67-44', '8-134-89', '9-268-179', '10-536-358', '11-1072-717', '12-2145-1434', '13-4290-2868', '14-8580-5737', '15-17161-11474'];
function processTiles(directory, name) {
urls.forEach(function(url) {
var filePath = directory + url + ".vector.pbf";
var tile = new VectorTile(new Protobuf(fs.readFileSync(filePath)));
var url1 = url.replace(':', '/');
var url2 = url1.replace(':', '/');
var url1 = url.replace('-', '/');
var url2 = url1.replace('-', '/');
var output = tileInformation.printOutput(tile.layers, name, url2);
writeOutput(output, name, url);
});

Plik binarny nie jest wyświetlany.