# geojson-summary

> return a text summary of what is in a geojson object

Latest version **0.5.0** (published 2016-03-11) · BSD license · 0 weekly downloads

## Install

```sh
npm install geojson-summary
pnpm add geojson-summary
yarn add geojson-summary
bun add geojson-summary
```

Provides the command `geojson-summary`.

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.5.0 |
| Published | 2016-03-11 |
| First published | 2014-01-13 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 35 |
| Author | Tom MacWright |
| Maintainers | tmcw |
| Keywords | geojson, summary, text, description |

## Links

- npm: https://www.npmjs.com/package/geojson-summary
- Repository: https://github.com/mapbox/geojson-summary
- Issues: https://github.com/mapbox/geojson-summary/issues
- npm.io page: https://npm.io/package/geojson-summary

## Dependencies (2)

- [comma-number](https://npm.io/package/comma-number.md) ^1.1.0
- [concat-stream](https://npm.io/package/concat-stream.md) ~1.4.1

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.5.0 (latest) — 2016-03-11
- 0.4.0 — 2016-01-07
- 0.3.1 — 2015-11-09
- 0.3.0 — 2014-08-07
- 0.2.0 — 2014-01-16
- 0.1.0 — 2014-01-13

## README

[![Build Status](https://travis-ci.org/mapbox/geojson-summary.png)](https://travis-ci.org/mapbox/geojson-summary)

# geojson-summary

Generate a plain-english summary of what is in a GeoJSON file.

## install

    npm install geojson-summary

## api

### `summary(geojson, options)`

Given a GeoJSON object, return an object with `sentence` (string) and
`parts` (array of strings) members describing the object.

Options:

* `types`: an object of type to name mappings like the default:

```js
{
    Point: [' point', ' points'],
    Polygon: [' polygon', ' polygons'],
    LineString: [' line', ' lines']
}
```

## example

```js
summary([{
    type: 'Feature',
    properties: {},
    geometry: { "type": "Polygon",
      "coordinates": [
        [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]
        ]
     }
}])

// Returns:
/*
{
    sentence: '1 polygon',
    parts: ['1 polygon']
}
*/
```

---
_Source: https://npm.io/package/geojson-summary · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
