# geojson2ndjson

> Convert a GeoJSON file into newline-delimited JSON output, one line per feature, and the reverse.

Latest version **0.5.0** (published 2019-02-26) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install geojson2ndjson
pnpm add geojson2ndjson
yarn add geojson2ndjson
bun add geojson2ndjson
```

Provides the commands `geojson2ndjson`, `ndjson2geojson`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.0 |
| Published | 2019-02-26 |
| First published | 2018-02-11 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Steve Bennett |
| Maintainers | stevage |

## Links

- npm: https://www.npmjs.com/package/geojson2ndjson
- Repository: https://github.com/stevage/geojson2ndjson
- Homepage: https://github.com/stevage/geojson2ndjson#readme
- Issues: https://github.com/stevage/geojson2ndjson/issues
- npm.io page: https://npm.io/package/geojson2ndjson

## Dependencies (3)

- [yargs](https://npm.io/package/yargs.md) ^11.0.0
- [JSONStream](https://npm.io/package/JSONStream.md) ^1.3.2
- [line-input-stream](https://npm.io/package/line-input-stream.md) ^1.0.1

## Recent versions

- 0.5.0 (latest) — 2019-02-26
- 0.4.0 — 2018-07-11
- 0.3.0 — 2018-03-15
- 0.2.0 — 2018-02-11
- 0.1.3 — 2018-02-11
- 0.1.2 — 2018-02-11
- 0.1.1 — 2018-02-11
- 0.1.0 — 2018-02-11

## README

## geojson2ndjson

Converts a GeoJSON file on disk into a newline-delimited output, following the [ndjson](http://ndjson.org/) specification. So you can combine it with the [ndjson-cli](https://www.npmjs.com/package/ndjson-cli) tools, for instance.

### Usage

```
npm install -g geojson2ndjson
geojson2ndjson myfile.geojson | ...
```

Or read from standard input:

```
cat myfile.geojson | geojson2ndjson | ...
```

Or multiple files:

```
geojson2ndjson *.geojson > everything.nd.json
```

## ndjson2geojson

Converts a line-delimited GeoJSON file on disk into regular GeoJSON output, with no validation.

### Usage

```
npm install -g geojson2ndjson
ndjson2geojson myfile.json | ...
```

Or read from standard input:

```
cat myfile.json | ndjson2geojson | ...
```

### Examples

List the properties of every feature, without the geometries:

```
geojson2ndjson myfile.geojson | ndjson-map d.properties
```

Remove every property except "name" from a GeoJSON file:

```
geojson2ndjson myfile.geojson | ndjson-map 'd.properties = {name: d.properties.name}, d' | ndjson2geojson > myfile-out.geojson
```

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