# turf-overlaps

> find whether spatial features overlap

Latest version **1.0.3** (published 2015-01-31) · ISC license · 0 weekly downloads

## Install

```sh
npm install turf-overlaps
pnpm add turf-overlaps
yarn add turf-overlaps
bun add turf-overlaps
```

## 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.3 |
| Published | 2015-01-31 |
| First published | 2015-01-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Tim Channell |
| Maintainers | tcql |
| Keywords | turf, gis, overlap |

## Links

- npm: https://www.npmjs.com/package/turf-overlaps
- Repository: https://github.com/tchannel/turf-overlaps
- Issues: https://github.com/tchannel/turf-overlaps/issues
- npm.io page: https://npm.io/package/turf-overlaps

## Dependencies (1)

- [turf-is-clockwise](https://npm.io/package/turf-is-clockwise.md) ^1.0.0

## Recent versions

- 1.0.3 (latest) — 2015-01-31
- 1.0.2 — 2015-01-31
- 1.0.1 — 2015-01-31
- 1.0.0 — 2015-01-31

## README

# turf-overlaps

find whether spatial features overlap


### `overlap(poly1, poly2)`

Takes two Linestring, Polygon or MultiPolygon features and finds whether they overlap.


### Parameters

| parameter | type    | description        |
| --------- | ------- | ------------------ |
| `poly1`   | Feature | the first Feature, containing LineString, Polygon or MultiPolygon geometry  |
| `poly2`   | Feature | the second Feature, containing LineString, Polygon or MultiPolygon geometry |


### Example

```js
var poly1 = turf.polygon([[
  [0, 0],
  [0, 2],
  [2, 2],
  [2, 0],
  [0, 0]
]]);

var poly2 = turf.polygon([[
  [1, 1],
  [1, 3],
  [3, 3],
  [3, 1],
  [1, 1]
]]);

var overlapping = overlaps(poly1, poly2);

// true
```

## Installation

```sh
$ npm install --save turf-overlaps
```

## Usage

```js
overlaps = require('turf-overlaps');

var is_overlapping = overlap(poly1, poly2);
```


## Tests

```sh
$ npm test
```

## Todo

- Add tests for MultiPolygon
- Add tests for testing overlaps for non-homogenous types (LineString vs Polygon, etc)

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