geojson-merge
Merge multiple GeoJSON files into one FeatureCollection.
install
npm install geojson-mergeapi
merge([geojson, geojson2...])
Merges GeoJSON objects (geometry, feature, or featurecollection) into one FeatureCollection.
cli
Options:
-sor--streamto use the high-performance streaming mode. This allows you to combine very large GeoJSON files. Streaming mode requires every GeoJSON file to contain a FeatureCollection at the top level.npm install -g geojson-merge geojson-merge file.geojson otherfile.geojson > combined.geojson
geojson-merge (for dummies)
Windows Instructions:
- Start the
node.jsapplication - Open
cmd.exe - Browse to a folder where you'd like
geojson-mergeinstalled - In
cmd.exetype the install string from above - Wait patiently, it could take a moment to start
- Use
cd node_modulesto change directory to thenode_modulesfolder - For simplicity sake, move your .geojson files into this
node_modulesdirectory - Run this command to merge your files:
node geojson-merge file1.geojson file2.geojson > merged.geojsonMerging multiple files in a folder
geojson-merge folder/*.geojson > combined.geojson