Skip to content

Instantly share code, notes, and snippets.

@dnomadb
Created March 4, 2015 22:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dnomadb/42b9bd2371b476166937 to your computer and use it in GitHub Desktop.
Save dnomadb/42b9bd2371b476166937 to your computer and use it in GitHub Desktop.
var Dyno = require('dyno');
var trizilla = require('trizilla')();
var tilebelt = require('tilebelt');
var args = require('minimist')(process.argv.slice(2));
var jobTile = JSON.parse(args._[0]);
var decompressType = args._[1] || 'Decompressor';
var jobKey = tilebelt.tileToQuadkey(jobTile);
var config = {
region: 'local',
endpoint: 'http://localhost:4567',
table: 'weather-lattice'
};
var dyno = Dyno(config);
var scanner = require('../lib/scan-handler')();
var queryOptions = {
id: {'EQ': jobKey }
}
dyno.query(queryOptions, {limit: 100})
.pipe(scanner.handleScan())
.pipe(trizilla.decompress(decompressType))
.pipe(process.stdout);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment