forked from ramyaragupathy/railwaymap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
32 lines (26 loc) · 767 Bytes
/
index.js
File metadata and controls
32 lines (26 loc) · 767 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//bbox: [-122.05862045288086, 36.93768132842635, -121.97296142578124, 37.00378647456494]
'use strict';
var tileReduce = require('tile-reduce');
var path = require('path');
// var argv = require('minimist')(process.argv.slice(2));
// var mbtilesPath = argv.mbtiles;
tileReduce({
bbox: [-168, -64, 193, 84],
zoom: 12,
map: path.join(__dirname, '/railway.js'),
sources: [{
name: 'osm',
mbtiles: __dirname + '/latest.planet.mbtiles',
raw: false
}]
})
.on('reduce', function(feature) {
// if (feature.length > largest.length) {
// largest.length = feature.length;
// largest.feature = feature.feature;
// }
})
.on('end', function() {
// write the largest roundabout to stderr
// process.stderr.write(JSON.stringify(largest));
});