0.3.0 • Published 8 years ago
geojson-merge v0.3.0
geojson-merge
Merge multiple GeoJSON files into one FeatureCollection.
install
npm install geojson-merge
api
merge([geojson, geojson2...])
Merges GeoJSON objects (geometry, feature, or featurecollection) into one FeatureCollection.
cli
Options:
-s
or--stream
to 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.js
application - Open
cmd.exe
- Browse to a folder where you'd like
geojson-merge
installed - In
cmd.exe
type the install string from above - Wait patiently, it could take a moment to start
- Use
cd node_modules
to change directory to thenode_modules
folder - For simplicity sake, move your .geojson files into this
node_modules
directory Run this command to merge your files:
node geojson-merge file1.geojson file2.geojson > merged.geojson
Merging multiple files in a folder
geojson-merge folder/*.geojson > combined.geojson