# geojpairdown

> Takes a geojson file and creates two files, one with the geojson and an id, the other a json object with the keys as values.

Latest version **1.0.1** (published 2016-06-05) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2016-06-05 |
| First published | 2016-04-10 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | mpmckenna8 |
| Maintainers | mpmckenna8 |
| Keywords | geojson, json |

## Links

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

## Dependencies (2)

- [split](https://npm.io/package/split.md) ^1.0.0
- [geojson-validation](https://npm.io/package/geojson-validation.md) ^0.1.6

## 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

- 1.0.1 (latest) — 2016-06-05
- 1.0.0 — 2016-04-10

## README

This is to split up a geojson file which may have a lot of attributes, and just
give it one id attribute and another file which all or the specified fields which
can then be joined to the other layer when/if required.

For an example of how to use it check see if it works with your geojson see the test directory
and specifically the test.js file for a implementation.


Basically you require it and give it the first argument as a string path to your file and
the second argument as the beginning of the file output.

So like in the sample if you do

var pairDown = require('../index.js');

var pair = pairDown('./test/testfile.geojson', './test/tester');


This will output in the test directory a file tester.geojson and testerfeats.json with the Basically
geojson in one and the feature data in the json.


caveats:
  right now designed just to handle OSM files coming out of qgis in geojson format.
  only designed/tested with polygon features.
  a bunch of sloppy console.log ing


What's going on

In index js

Initialize all the filestreams

On each data event the first chunk gets called with startit() and the following ones with nextFeatStart()


startit starts making a file then starts to split it up

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