Skip to content

Instantly share code, notes, and snippets.

@yhahn
Last active August 29, 2015 14:05
Show Gist options
  • Save yhahn/bdc4b4c10bf2b40120a1 to your computer and use it in GitHub Desktop.
Save yhahn/bdc4b4c10bf2b40120a1 to your computer and use it in GitHub Desktop.
solid vt testcase
{
"name": "solid-test",
"dependencies": {
"mapnik": "1.4.13"
},
"main": "test.js",
"scripts": {
"test": "node test.js"
}
}
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