Created
December 1, 2011 07:25
-
-
Save zhm/1414632 to your computer and use it in GitHub Desktop.
merge GeoJSON quick&dirty
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var files = process.argv.slice(2); | |
var output = { type: 'LineString', coordinates: [ ] }; | |
for (var i = 0; i < files.length; ++i) { | |
output.coordinates.append(JSON.parse(fs.readFileSync(files[i])).coordinates); | |
} | |
fs.writeFileSync('output.json', JSON.stringify(output, null, '\t')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment