From d65f6bcb311d1dfe617980121b3a7379e5e1f792 Mon Sep 17 00:00:00 2001 From: BjoernSchilberg Date: Tue, 29 Jan 2019 08:13:20 +0100 Subject: [PATCH] feat: Added bbox as command line argument. (#19) --- geojson-random | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/geojson-random b/geojson-random index c49079b..ee5cfe1 100755 --- a/geojson-random +++ b/geojson-random @@ -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('./'); @@ -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))); }