{"id":13554541,"url":"https://github.com/mapbox/geojson-merge","last_synced_at":"2026-01-11T08:53:03.467Z","repository":{"id":19160745,"uuid":"22392390","full_name":"mapbox/geojson-merge","owner":"mapbox","description":"Merge multiple GeoJSON files into one FeatureCollection.","archived":false,"fork":false,"pushed_at":"2024-11-25T15:52:44.000Z","size":20,"stargazers_count":235,"open_issues_count":17,"forks_count":33,"subscribers_count":121,"default_branch":"master","last_synced_at":"2025-03-26T20:17:16.672Z","etag":null,"topics":["banished"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mapbox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-29T19:22:09.000Z","updated_at":"2025-03-24T03:30:32.000Z","dependencies_parsed_at":"2022-09-06T19:10:38.284Z","dependency_job_id":null,"html_url":"https://github.com/mapbox/geojson-merge","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapbox%2Fgeojson-merge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapbox%2Fgeojson-merge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapbox%2Fgeojson-merge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapbox%2Fgeojson-merge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mapbox","download_url":"https://codeload.github.com/mapbox/geojson-merge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246956497,"owners_count":20860447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["banished"],"created_at":"2024-08-01T12:02:50.109Z","updated_at":"2025-04-03T07:31:41.408Z","avatar_url":"https://github.com/mapbox.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","others","👨‍💻 JavaScript Libraries"],"sub_categories":["Data Processing"],"readme":"# geojson-merge\n\n[![build status](https://secure.travis-ci.org/mapbox/geojson-merge.png)](http://travis-ci.org/mapbox/geojson-merge)\n\nMerge multiple [GeoJSON](http://geojson.org/) files into one FeatureCollection.\n\n## install\n\n```bash\n$ npm install --save @mapbox/geojson-merge\n```\n\n## API\n\n\u003c!-- Generated by documentation.js. Update this documentation by updating the source code. --\u003e\n\n### merge\n\nMerge a series of GeoJSON objects into one FeatureCollection containing all\nfeatures in all files.  The objects can be any valid GeoJSON root object,\nincluding FeatureCollection, Feature, and Geometry types.\n\n**Parameters**\n\n-   `inputs` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)\u003e** a list of GeoJSON objects of any type\n\n**Examples**\n\n```javascript\nvar geojsonMerge = require('@mapbox/geojson-merge');\n\nvar mergedGeoJSON = geojsonMerge.merge([\n  { type: 'Point', coordinates: [0, 1] },\n  { type: 'Feature', geometry: { type: 'Point', coordinates: [0, 1] }, properties: {} }\n]);\n\nconsole.log(JSON.stringify(mergedGeoJSON));\n```\n\nReturns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** a geojson FeatureCollection.\n\n### mergeFeatureCollectionStream\n\nMerge GeoJSON files containing GeoJSON FeatureCollections\ninto a single stream of a FeatureCollection as a JSON string.\n\nThis is more limited than merge - it only supports FeatureCollections\nas input - but more performant, since it can operate on GeoJSON files\nlarger than what you can keep in memory at one time.\n\n**Parameters**\n\n-   `inputs` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e** a list of filenames of GeoJSON files\n\n**Examples**\n\n```javascript\nvar geojsonMerge = require('@mapbox/geojson-merge');\n\nvar mergedStream = geojsonMerge.mergeFeatureCollectionStream([\n  'features.geojson',\n  'otherFeatures.geojson'])\n\nmergedStream.pipe(process.stdout);\n```\n\nReturns **[Stream](https://nodejs.org/api/stream.html)** output: a stringified JSON of a FeatureCollection.\n\n## cli\n\nOptions:\n\n\u003e `-s` or `--stream` to use the high-performance streaming mode. This allows\n\u003e you to combine very large GeoJSON files. Streaming mode requires every\n\u003e GeoJSON file to contain a FeatureCollection at the top level.\n\n```bash\n$ npm install -g @mapbox/geojson-merge\n$ geojson-merge file.geojson otherfile.geojson \u003e combined.geojson\n```\n\n## geojson-merge (for dummies)\n\n### Windows Instructions:\n\n1.  Start the `node.js` application  \n2.  Open `cmd.exe`  \n3.  Browse to a folder where you'd like `geojson-merge` installed  \n4.  In `cmd.exe` type the install string from above  \n5.  Wait patiently, it could take a moment to start  \n6.  Use `cd node_modules` to change directory  to the `node_modules` folder  \n7.  For simplicity sake, move your .geojson files into this `node_modules` directory  \n8.  Run this command to merge your files:  \n\n```bash\n$ node geojson-merge file1.geojson file2.geojson \u003e merged.geojson\n```\n\n**Merging multiple files in a folder**\n\n```bash\n$ geojson-merge folder/*.geojson \u003e combined.geojson\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmapbox%2Fgeojson-merge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmapbox%2Fgeojson-merge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmapbox%2Fgeojson-merge/lists"}