# geojson-dissolve

> Dissolve contiguous GeoJSON LineStrings and Polygons into single units.

Latest version **3.1.0** (published 2017-04-12) · ISC license · 0 weekly downloads

## Install

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

## 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 | 3.1.0 |
| Published | 2017-04-12 |
| First published | 2017-01-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 22 |
| Author | Stephen Whitmore |
| Maintainers | gmaclennan, noffle |
| Keywords | geojson, dissolve, merge, linestring, lines, polygon, multilinestring, multipolygon |

## Links

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

## Dependencies (5)

- [@turf/meta](https://npm.io/package/@turf/meta.md) ^3.7.5
- [geojson-flatten](https://npm.io/package/geojson-flatten.md) ^0.2.1
- [topojson-client](https://npm.io/package/topojson-client.md) ^3.0.0
- [topojson-server](https://npm.io/package/topojson-server.md) ^3.0.0
- [geojson-linestring-dissolve](https://npm.io/package/geojson-linestring-dissolve.md) 0.0.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

- 3.1.0 (latest) — 2017-04-12
- 3.0.0 — 2017-02-09
- 2.0.0 — 2017-02-01
- 1.0.0 — 2017-01-31

## README

# geojson-dissolve

[![Build Status](https://img.shields.io/travis/digidem/geojson-dissolve.svg)](https://travis-ci.org/digidem/geojson-dissolve)
[![npm](https://img.shields.io/npm/v/geojson-dissolve.svg?maxAge=2592000)](https://www.npmjs.com/package/geojson-dissolve)


> Dissolve contiguous GeoJSON (Multi)LineStrings and (Multi)Polygons into single units.

## Usage

```js
var dissolve = require('geojson-dissolve')

var line1 = {
  type: 'LineString',
  coordinates: [
    [0.0, 0.0],
    [1.0, 1.0],
    [2.0, 2.0]
  ]
}

var line2 = {
  type: 'LineString',
  coordinates: [
    [2.0, 2.0],
    [3.0, 3.0]
  ]
}

console.log(dissolve([line1, line2]))
```

This will output

```js
{
  type: 'LineString',
  coordinates: [
    [0.0, 0.0],
    [1.0, 1.0],
    [2.0, 2.0],
    [3.0, 3.0]
  ]
}
```

## API

```js
var dissolve = require('geojson-dissolve')
```

### `dissolve([geojson])` or `dissolve(gj1, gj2, ...)`

Consumes a list of homogenous [GeoJSON
objects](https://tools.ietf.org/html/rfc7946#section-3), and returns a single [GeoJSON Geometry Object](https://tools.ietf.org/html/rfc7946#section-3.1), with all touching `LineString`s and `Polygon`s dissolved into single geometries.

## Install

With [npm](https://npmjs.org/) installed, run

```
$ npm install geojson-dissolve
```

## License

ISC

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