Skip to content

Commit

Permalink
Merge pull request #26 from andrewharvey/maintainance
Browse files Browse the repository at this point in the history
maintenance
  • Loading branch information
mollymerp committed Jun 4, 2018
2 parents b3476b3 + ff9c724 commit a4e8ed3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
19 changes: 14 additions & 5 deletions README.md
Expand Up @@ -22,13 +22,22 @@ including FeatureCollection, Feature, and Geometry types.

**Parameters**

- `inputs` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)>** a list of GeoJSON objects of any type
- `inputs` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** a list of GeoJSON objects of any type

Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** a geojson FeatureCollection.- @example
var geojsonMerge = require('@mapbox/geojson-merge');var mergedStream = geojsonMerge.merge(\[
**Examples**

```javascript
var geojsonMerge = require('@mapbox/geojson-merge');

var mergedGeoJSON = geojsonMerge.merge([
{ type: 'Point', coordinates: [0, 1] },
{ type: 'Feature', geometry: { type: 'Point', coordinates: [0, 1] }, properties: {} }
]);mergedStream.pipe(process.stdout);
]);

console.log(JSON.stringify(mergedGeoJSON));
```

Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** a geojson FeatureCollection.

### mergeFeatureCollectionStream

Expand All @@ -41,7 +50,7 @@ larger than what you can keep in memory at one time.

**Parameters**

- `inputs` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)>** a list of filenames of GeoJSON files
- `inputs` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** a list of filenames of GeoJSON files

**Examples**

Expand Down
8 changes: 4 additions & 4 deletions index.js
@@ -1,4 +1,4 @@
var normalize = require('geojson-normalize');
var normalize = require('@mapbox/geojson-normalize');
var geojsonStream = require('geojson-stream');
var fs = require('fs');

Expand All @@ -9,15 +9,15 @@ var fs = require('fs');
*
* @param {Array<Object>} inputs a list of GeoJSON objects of any type
* @return {Object} a geojson FeatureCollection.
* * @example
* @example
* var geojsonMerge = require('@mapbox/geojson-merge');
*
* var mergedStream = geojsonMerge.merge([
* var mergedGeoJSON = geojsonMerge.merge([
* { type: 'Point', coordinates: [0, 1] },
* { type: 'Feature', geometry: { type: 'Point', coordinates: [0, 1] }, properties: {} }
* ]);
*
* mergedStream.pipe(process.stdout);
* console.log(JSON.stringify(mergedGeoJSON));
*/
function merge (inputs) {
var output = {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -26,12 +26,12 @@
},
"homepage": "https://github.com/mapbox/geojson-merge",
"dependencies": {
"@mapbox/geojson-normalize": "^0.0.1",
"geojson-fixtures": "~0.1.0",
"geojson-normalize": "0.0.0",
"geojson-stream": "0.0.1",
"minimist": "^1.2.0",
"stream-concat": "0.1.0",
"tape": "~2.13.4"
"tape": "^4.9.0"
},
"devDependencies": {
"concat-stream": "^1.6.0",
Expand Down

0 comments on commit a4e8ed3

Please sign in to comment.