Skip to content

Instantly share code, notes, and snippets.

@jkutianski
Created August 8, 2013 04:45
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 jkutianski/6181516 to your computer and use it in GitHub Desktop.
Save jkutianski/6181516 to your computer and use it in GitHub Desktop.
Dirty hack to merge geoJSON feature.
// Sample use: node mergeFeatures.js argentina.json buenos_aires.json > argentina_merged.json
var origin1 = require(path.resolve(__dirname, process.argv[2])),
origin2 = require(path.resolve(__dirname, process.argv[3])),
destination = {
"type": "FeatureCollection",
"features": []
};
destination.features = origin1.features.concat(origin2.features);
console.log(
JSON.stringify(destination)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment