New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate building #3

Merged
merged 3 commits into from Mar 27, 2018
Jump to file or symbol
Failed to load files and symbols.
+45 −0
Diff settings

Always

Just for now

Next

duplicate building validator

  • Loading branch information...
karitotp committed Mar 22, 2018
commit fb468112e7854e07a197b2d7df54077d5c6c332b
@@ -0,0 +1,45 @@
'use strict';
var test = require('tape');
var logInterceptor = require('log-interceptor');
var path = require('path');
var processors = require('../index.js');
var zoom = 12;
var duplicateBuildingsTiles = path.join(
__dirname,
'/fixtures/duplicateBuilding.mbtiles'
);
var duplicatebuildingsOpts = {
bbox: [-71.373711, -12.840841, -71.355085, -12.828916],
zoom: zoom
};
test('duplicateBuildings', function(t) {
t.plan(4);
logInterceptor();
processors.duplicateBuildings(duplicatebuildingsOpts, duplicateBuildingsTiles, function() {
var logs = logInterceptor.end();
for (var i = 0; i < 1; i++) {
var geoJSON = JSON.parse(logs[i]);
t.equal(
geoJSON.features[0].properties._osmlint,
'duplicatebuildings',
'Should be duplicatebuildings'
);
t.equal(
geoJSON.features[0].geometry.type,
'Polygon',
'Should be Polygon'
);
t.equal(
geoJSON.features[0].properties['building'],
'yes',
'Should be yes'
);
t.equal(
geoJSON.features[0].properties['@user'],
'pgiraud',
'Should be pgiraud'
);
}
t.end();
});
});
Binary file not shown.
ProTip! Use n and p to navigate between commits in a pull request.