Skip to content

Commit

Permalink
feat: Added bbox as command line argument. (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
BjoernSchilberg authored and tmcw committed Jan 29, 2019
1 parent 98f97d0 commit d65f6bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion geojson-random
Expand Up @@ -2,6 +2,7 @@

var count = (process.argv[2] && parseInt(process.argv[2], 10)) || 100;
var type = process.argv[3] || 'point';
var bbox = (process.argv[4] && JSON.parse(process.argv[4]));
var geojsonStream = require('geojson-stream');
var geojsonRandom = require('./');

Expand All @@ -10,5 +11,5 @@ if (type === 'point-stream') {
.pipe(geojsonStream.stringify())
.pipe(process.stdout);
} else {
console.log(JSON.stringify(geojsonRandom[type](count)));
console.log(JSON.stringify(geojsonRandom[type](count,bbox)));
}

0 comments on commit d65f6bc

Please sign in to comment.