Last active
August 29, 2015 14:05
-
-
Save yhahn/bdc4b4c10bf2b40120a1 to your computer and use it in GitHub Desktop.
solid vt testcase
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "solid-test", | |
"dependencies": { | |
"mapnik": "1.4.13" | |
}, | |
"main": "test.js", | |
"scripts": { | |
"test": "node test.js" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var mapnik = require('mapnik'); | |
var assert = require('assert'); | |
var queue = ['12.771.1608','13.1337.2825','10.196.370']; | |
function check() { | |
if (!queue.length) process.exit(); | |
var coords = queue.shift().split('.'); | |
var vt = new mapnik.VectorTile(+coords[0],+coords[1],+coords[2]); | |
vt.setData(fs.readFileSync('./' +coords.join('.')+ '.vector.pbf')); | |
vt.parse(); | |
vt.isSolid(function(err, solid, key) { | |
assert.ifError(err); | |
console.log(coords, solid, key); | |
check(); | |
}); | |
} | |
check(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment