This package has been deprecated

Author message:

This module is now under the @mapbox namespace: install @mapbox/geojson-merge instead

geojson-merge

0.3.0 • Public • Published

geojson-merge

build status

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:

  1. Start the node.js application
  2. Open cmd.exe
  3. Browse to a folder where you'd like geojson-merge installed
  4. In cmd.exe type the install string from above
  5. Wait patiently, it could take a moment to start
  6. Use cd node_modules to change directory to the node_modules folder
  7. For simplicity sake, move your .geojson files into this node_modules directory
  8. 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

Package Sidebar

Install

npm i geojson-merge

Weekly Downloads

12

Version

0.3.0

License

ISC

Last publish

Collaborators

  • mapbox-admin