open-index/open-npm huggingface dataset:
npm package: @spatial/along
Description: turf along module
Author: Turf Authors
Latest version: 2.0.0

# @spatial/along

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## along

Takes a [LineString][1] and returns a [Point][2] at a specified distance along the line.

### Parameters

-   `line` **[Feature][3]&lt;[LineString][4]>** input line
-   `distance` **[number][5]** distance along the line
-   `options` **[Object][6]?** Optional parameters
    -   `options.units` **[string][7]** can be degrees, radians, miles, or kilometers (optional, default `"kilometers"`)

### Examples

```javascript
var line = turf.lineString([[-83, 30], [-84, 36], [-78, 41]]);
var options = {units: 'miles'};

var along = turf.along(line, 200, options);

//addToMap
var addToMap = [along, line]
```

Returns **[Feature][3]&lt;[Point][8]>** Point `distance` `units` along the line

[1]: https://tools.ietf.org/html/rfc7946#section-3.1.4

[2]: https://tools.ietf.org/html/rfc7946#section-3.1.2

[3]: https://tools.ietf.org/html/rfc7946#section-3.2

[4]: https://tools.ietf.org/html/rfc7946#section-3.1.4

[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number

[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String

[8]: https://tools.ietf.org/html/rfc7946#section-3.1.2

<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->

---

This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

### Installation

Install this module individually:

```sh
$ npm install @spatial/along
```

Or install the Turf module that includes it as a function:

```sh
$ npm install @turf/turf
```
npm package: @spatial/area
Description: turf area module
Author: Turf Authors
Latest version: 2.0.0

# @spatial/area

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## area

Takes one or more features and returns their area in square meters.

### Parameters

-   `geojson` **[GeoJSON][1]** input GeoJSON feature(s)

### Examples

```javascript
var polygon = turf.polygon([[[125, -15], [113, -22], [154, -27], [144, -15], [125, -15]]]);

var area = turf.area(polygon);

//addToMap
var addToMap = [polygon]
polygon.properties.area = area
```

Returns **[number][2]** area in square meters

[1]: https://tools.ietf.org/html/rfc7946#section-3

[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number

<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->

---

This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

### Installation

Install this module individually:

```sh
$ npm install @spatial/area
```

Or install the Turf module that includes it as a function:

```sh
$ npm install @turf/turf
```
npm package: @spatial/bbox
Description: turf bbox module
Author: Turf Authors
Latest version: 2.0.0

# @spatial/bbox

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## bbox

Takes a set of features, calculates the bbox of all input features, and returns a bounding box.

### Parameters

-   `geojson` **[GeoJSON][1]** any GeoJSON object

### Examples

```javascript
var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);
var bbox = turf.bbox(line);
var bboxPolygon = turf.bboxPolygon(bbox);

//addToMap
var addToMap = [line, bboxPolygon]
```

Returns **[BBox][2]** bbox extent in [minX, minY, maxX, maxY] order

[1]: https://tools.ietf.org/html/rfc7946#section-3

[2]: https://tools.ietf.org/html/rfc7946#section-5

<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->

---

This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

### Installation

Install this module individually:

```sh
$ npm install @spatial/bbox
```

Or install the Turf module that includes it as a function:

```sh
$ npm install @turf/turf
```
npm package: @spatial/bbox-clip
Description: turf bbox-clip module
Author: Turf Authors
Latest version: 2.0.0

# @spatial/bbox-clip

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## bboxClip

Takes a [Feature][1] and a bbox and clips the feature to the bbox using [lineclip][2].
May result in degenerate edges when clipping Polygons.

### Parameters

-   `feature` **[Feature][3]&lt;([LineString][4] \| [MultiLineString][5] \| [Polygon][6] \| [MultiPolygon][7])>** feature to clip to the bbox
-   `bbox` **[BBox][8]** extent in [minX, minY, maxX, maxY] order

### Examples

```javascript
var bbox = [0, 0, 10, 10];
var poly = turf.polygon([[[2, 2], [8, 4], [12, 8], [3, 7], [2, 2]]]);

var clipped = turf.bboxClip(poly, bbox);

//addToMap
var addToMap = [bbox, poly, clipped]
```

Returns **[Feature][3]&lt;([LineString][4] \| [MultiLineString][5] \| [Polygon][6] \| [MultiPolygon][7])>** clipped Feature

[1]: https://tools.ietf.org/html/rfc7946#section-3.2

[2]: https://github.com/mapbox/lineclip

[3]: https://tools.ietf.org/html/rfc7946#section-3.2

[4]: https://tools.ietf.org/html/rfc7946#section-3.1.4

[5]: https://tools.ietf.org/html/rfc7946#section-3.1.5

[6]: https://tools.ietf.org/html/rfc7946#section-3.1.6

[7]: https://tools.ietf.org/html/rfc7946#section-3.1.7

[8]: https://tools.ietf.org/html/rfc7946#section-5

<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->

---

This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

### Installation

Install this module individually:

```sh
$ npm install @spatial/bbox-clip
```

Or install the Turf module that includes it as a function:

```sh
$ npm install @turf/turf
```
npm package: @spatial/bbox-polygon
Description: turf bbox-polygon module
Author: Turf Authors
Latest version: 2.0.0

# @spatial/bbox-polygon

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## bboxPolygon

Takes a bbox and returns an equivalent [polygon][1].

### Parameters

-   `bbox` **[BBox][2]** extent in [minX, minY, maxX, maxY] order

### Examples

```javascript
var bbox = [0, 0, 10, 10];

var poly = turf.bboxPolygon(bbox);

//addToMap
var addToMap = [poly]
```

Returns **[Feature][3]&lt;[Polygon][4]>** a Polygon representation of the bounding box

[1]: https://tools.ietf.org/html/rfc7946#section-3.1.6

[2]: https://tools.ietf.org/html/rfc7946#section-5

[3]: https://tools.ietf.org/html/rfc7946#section-3.2

[4]: https://tools.ietf.org/html/rfc7946#section-3.1.6

<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->

---

This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

### Installation

Install this module individually:

```sh
$ npm install @spatial/bbox-polygon
```

Or install the Turf module that includes it as a function:

```sh
$ npm install @turf/turf
```
npm package: @spatial/bearing
Description: turf bearing module
Author: Turf Authors
Latest version: 2.0.0

# @spatial/bearing

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## bearing

Takes two [points][1] and finds the geographic bearing between them,
i.e. the angle measured in degrees from the north line (0 degrees)

### Parameters

-   `start` **[Coord][2]** starting Point
-   `end` **[Coord][2]** ending Point
-   `options` **[Object][3]** Optional parameters (optional, default `{}`)
    -   `options.final` **[boolean][4]** calculates the final bearing if true (optional, default `false`)

### Examples

```javascript
var point1 = turf.point([-75.343, 39.984]);
var point2 = turf.point([-75.534, 39.123]);

var bearing = turf.bearing(point1, point2);

//addToMap
var addToMap = [point1, point2]
point1.properties['marker-color'] = '#f00'
point2.properties['marker-color'] = '#0f0'
point1.properties.bearing = bearing
```

Returns **[number][5]** bearing in decimal degrees, between -180 and 180 degrees (positive clockwise)

[1]: https://tools.ietf.org/html/rfc7946#section-3.1.2

[2]: https://tools.ietf.org/html/rfc7946#section-3.1.1

[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean

[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number

<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->

---

This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

### Installation

Install this module individually:

```sh
$ npm install @spatial/bearing
```

Or install the Turf module that includes it as a function:

```sh
$ npm install @turf/turf
```
npm package: @spatial/bezier-spline
Description: turf bezier-spline module
Author: Turf Authors
Latest version: 2.0.0

# @spatial/bezier-spline

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## bezierSpline

Takes a [line][1] and returns a curved version
by applying a [Bezier spline][2]
algorithm.

The bezier spline implementation is by [Leszek Rybicki][3].

### Parameters

-   `line` **[Feature][4]&lt;[LineString][5]>** input LineString
-   `options` **[Object][6]** Optional parameters (optional, default `{}`)
    -   `options.resolution` **[number][7]** time in milliseconds between points (optional, default `10000`)
    -   `options.sharpness` **[number][7]** a measure of how curvy the path should be between splines (optional, default `0.85`)

### Examples

```javascript
var line = turf.lineString([
  [-76.091308, 18.427501],
  [-76.695556, 18.729501],
  [-76.552734, 19.40443],
  [-74.61914, 19.134789],
  [-73.652343, 20.07657],
  [-73.157958, 20.210656]
]);

var curved = turf.bezierSpline(line);

//addToMap
var addToMap = [line, curved]
curved.properties = { stroke: '#0F0' };
```

Returns **[Feature][4]&lt;[LineString][5]>** curved line

[1]: https://tools.ietf.org/html/rfc7946#section-3.1.4

[2]: http://en.wikipedia.org/wiki/B%C3%A9zier_spline

[3]: http://leszek.rybicki.cc/

[4]: https://tools.ietf.org/html/rfc7946#section-3.2

[5]: https://tools.ietf.org/html/rfc7946#section-3.1.4

[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number

<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->

---

This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

### Installation

Install this module individually:

```sh
$ npm install @spatial/bezier-spline
```

Or install the Turf module that includes it as a function:

```sh
$ npm install @turf/turf
```
npm package: @spatial/boolean-clockwise
Description: turf boolean-clockwise module
Author: Turf Authors
Latest version: 2.0.0

# @spatial/boolean-clockwise

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## booleanClockwise

Takes a ring and return true or false whether or not the ring is clockwise or counter-clockwise.

### Parameters

-   `line` **[Feature][1]&lt;[LineString][2]>** to be evaluated

### Examples

```javascript
var clockwiseRing = turf.lineString([[0,0],[1,1],[1,0],[0,0]]);
var counterClockwiseRing = turf.lineString([[0,0],[1,0],[1,1],[0,0]]);

turf.booleanClockwise(clockwiseRing)
//=true
turf.booleanClockwise(counterClockwiseRing)
//=false
```

Returns **[boolean][3]** true/false

[1]: https://tools.ietf.org/html/rfc7946#section-3.2

[2]: https://tools.ietf.org/html/rfc7946#section-3.1.4

[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean

<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->

---

This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

### Installation

Install this module individually:

```sh
$ npm install @spatial/boolean-clockwise
```

Or install the Turf module that includes it as a function:

```sh
$ npm install @turf/turf
```
npm package: @spatial/boolean-contains
Description: turf boolean-contains module
Author: Turf Authors
Latest version: 2.0.0

# @spatial/boolean-contains

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## booleanContains

Boolean-contains returns True if the second geometry is completely contained by the first geometry.
The interiors of both geometries must intersect and, the interior and boundary of the secondary (geometry b)
must not intersect the exterior of the primary (geometry a).
Boolean-contains returns the exact opposite result of the `@spatial/boolean-within`.

### Parameters

-   `feature1` **([Geometry][1] \| [Feature][2]&lt;any>)** GeoJSON Feature or Geometry
-   `feature2` **([Geometry][1] \| [Feature][2]&lt;any>)** GeoJSON Feature or Geometry

### Examples

```javascript
var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);
var point = turf.point([1, 2]);

turf.booleanContains(line, point);
//=true
```

Returns **[boolean][3]** true/false

[1]: https://tools.ietf.org/html/rfc7946#section-3.1

[2]: https://tools.ietf.org/html/rfc7946#section-3.2

[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean

<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->

---

This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

### Installation

Install this module individually:

```sh
$ npm install @spatial/boolean-contains
```

Or install the Turf module that includes it as a function:

```sh
$ npm install @turf/turf
```
npm package: @spatial/boolean-crosses
Description: turf boolean-crosses module
Author: Turf Authors
Latest version: 1.0.5

# @spatial/boolean-crosses

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## booleanCrosses

Boolean-Crosses returns True if the intersection results in a geometry whose dimension is one less than
the maximum dimension of the two source geometries and the intersection set is interior to
both source geometries.

Boolean-Crosses returns t (TRUE) for only multipoint/polygon, multipoint/linestring, linestring/linestring, linestring/polygon, and linestring/multipolygon comparisons.

### Parameters

-   `feature1` **([Geometry][1] \| [Feature][2]&lt;any>)** GeoJSON Feature or Geometry
-   `feature2` **([Geometry][1] \| [Feature][2]&lt;any>)** GeoJSON Feature or Geometry

### Examples

```javascript
var line1 = turf.lineString([[-2, 2], [4, 2]]);
var line2 = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);

var cross = turf.booleanCrosses(line1, line2);
//=true
```

Returns **[boolean][3]** true/false

[1]: https://tools.ietf.org/html/rfc7946#section-3.1

[2]: https://tools.ietf.org/html/rfc7946#section-3.2

[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean

<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->

---

This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

### Installation

Install this module individually:

```sh
$ npm install @spatial/boolean-crosses
```

Or install the Turf module that includes it as a function:

```sh
$ npm install @turf/turf
```
npm package: @spatial/boolean-disjoint
Description: turf boolean-disjoint module
Author: Turf Authors
Latest version: 1.0.5

# @spatial/boolean-disjoint

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## booleanDisjoint

Boolean-disjoint returns (TRUE) if the intersection of the two geometries is an empty set.

### Parameters

-   `feature1` **([Geometry][1] \| [Feature][2]&lt;any>)** GeoJSON Feature or Geometry
-   `feature2` **([Geometry][1] \| [Feature][2]&lt;any>)** GeoJSON Feature or Geometry

### Examples

```javascript
var point = turf.point([2, 2]);
var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);

turf.booleanDisjoint(line, point);
//=true
```

Returns **[boolean][3]** true/false

[1]: https://tools.ietf.org/html/rfc7946#section-3.1

[2]: https://tools.ietf.org/html/rfc7946#section-3.2

[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean

<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->

---

This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

### Installation

Install this module individually:

```sh
$ npm install @spatial/boolean-disjoint
```

Or install the Turf module that includes it as a function:

```sh
$ npm install @turf/turf
```
npm package: @spatial/boolean-equal
Description: turf boolean-equal module
Author: Turf Authors
Latest version: 2.0.0

# @spatial/boolean-equal

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## booleanEqual

Determine whether two geometries of the same type have identical X,Y coordinate values.
See [http://edndoc.esri.com/arcsde/9.0/general_topics/understand_spatial_relations.htm][1]

### Parameters

-   `feature1` **([Geometry][2] \| [Feature][3])** GeoJSON input
-   `feature2` **([Geometry][2] \| [Feature][3])** GeoJSON input

### Examples

```javascript
var pt1 = turf.point([0, 0]);
var pt2 = turf.point([0, 0]);
var pt3 = turf.point([1, 1]);

turf.booleanEqual(pt1, pt2);
//= true
turf.booleanEqual(pt2, pt3);
//= false
```

Returns **[boolean][4]** true if the objects are equal, false otherwise

[1]: http://edndoc.esri.com/arcsde/9.0/general_topics/understand_spatial_relations.htm

[2]: https://tools.ietf.org/html/rfc7946#section-3.1

[3]: https://tools.ietf.org/html/rfc7946#section-3.2

[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean

<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->

---

This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

### Installation

Install this module individually:

```sh
$ npm install @spatial/boolean-equal
```

Or install the Turf module that includes it as a function:

```sh
$ npm install @turf/turf
```
npm package: @spatial/boolean-overlap
Description: turf boolean-overlap module
Author: Turf Authors
Latest version: 1.0.5

# @spatial/boolean-overlap

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## booleanOverlap

Compares two geometries of the same dimension and returns true if their intersection set results in a geometry
different from both but of the same dimension. It applies to Polygon/Polygon, LineString/LineString,
Multipoint/Multipoint, MultiLineString/MultiLineString and MultiPolygon/MultiPolygon.

### Parameters

-   `feature1` **([Geometry][1] \| [Feature][2]&lt;([LineString][3] \| [MultiLineString][4] \| [Polygon][5] \| [MultiPolygon][6])>)** input
-   `feature2` **([Geometry][1] \| [Feature][2]&lt;([LineString][3] \| [MultiLineString][4] \| [Polygon][5] \| [MultiPolygon][6])>)** input

### Examples

```javascript
var poly1 = turf.polygon([[[0,0],[0,5],[5,5],[5,0],[0,0]]]);
var poly2 = turf.polygon([[[1,1],[1,6],[6,6],[6,1],[1,1]]]);
var poly3 = turf.polygon([[[10,10],[10,15],[15,15],[15,10],[10,10]]]);

turf.booleanOverlap(poly1, poly2)
//=true
turf.booleanOverlap(poly2, poly3)
//=false
```

Returns **[boolean][7]** true/false

[1]: https://tools.ietf.org/html/rfc7946#section-3.1

[2]: https://tools.ietf.org/html/rfc7946#section-3.2

[3]: https://tools.ietf.org/html/rfc7946#section-3.1.4

[4]: https://tools.ietf.org/html/rfc7946#section-3.1.5

[5]: https://tools.ietf.org/html/rfc7946#section-3.1.6

[6]: https://tools.ietf.org/html/rfc7946#section-3.1.7

[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean

<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->

---

This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

### Installation

Install this module individually:

```sh
$ npm install @spatial/boolean-overlap
```

Or install the Turf module that includes it as a function:

```sh
$ npm install @turf/turf
```
npm package: @spatial/boolean-parallel
Description: turf boolean-parallel module
Author: Turf Authors
Latest version: 2.0.0

# @spatial/boolean-parallel

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## booleanParallel

Boolean-Parallel returns True if each segment of `line1` is parallel to the correspondent segment of `line2`

### Parameters

-   `line1` **([Geometry][1] \| [Feature][2]&lt;[LineString][3]>)** GeoJSON Feature or Geometry
-   `line2` **([Geometry][1] \| [Feature][2]&lt;[LineString][3]>)** GeoJSON Feature or Geometry

### Examples

```javascript
var line1 = turf.lineString([[0, 0], [0, 1]]);
var line2 = turf.lineString([[1, 0], [1, 1]]);

turf.booleanParallel(line1, line2);
//=true
```

Returns **[boolean][4]** true/false if the lines are parallel

[1]: https://tools.ietf.org/html/rfc7946#section-3.1

[2]: https://tools.ietf.org/html/rfc7946#section-3.2

[3]: https://tools.ietf.org/html/rfc7946#section-3.1.4

[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean

<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->

---

This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

### Installation

Install this module individually:

```sh
$ npm install @spatial/boolean-parallel
```

Or install the Turf module that includes it as a function:

```sh
$ npm install @turf/turf
```
npm package: @spatial/boolean-point-in-polygon
Description: turf boolean-point-in-polygon module
Author: Turf Authors
Latest version: 2.0.0

# @spatial/boolean-point-in-polygon

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## booleanPointInPolygon

Takes a [Point][1] and a [Polygon][2] or [MultiPolygon][3] and determines if the point resides inside the polygon. The polygon can
be convex or concave. The function accounts for holes.

### Parameters

-   `point` **[Coord][4]** input point
-   `polygon` **[Feature][5]&lt;([Polygon][6] \| [MultiPolygon][7])>** input polygon or multipolygon
-   `options` **[Object][8]** Optional parameters (optional, default `{}`)
    -   `options.ignoreBoundary` **[boolean][9]** True if polygon boundary should be ignored when determining if the point is inside the polygon otherwise false. (optional, default `false`)

### Examples

```javascript
var pt = turf.point([-77, 44]);
var poly = turf.polygon([[
  [-81, 41],
  [-81, 47],
  [-72, 47],
  [-72, 41],
  [-81, 41]
]]);

turf.booleanPointInPolygon(pt, poly);
//= true
```

Returns **[boolean][9]** `true` if the Point is inside the Polygon; `false` if the Point is not inside the Polygon

[1]: https://tools.ietf.org/html/rfc7946#section-3.1.2

[2]: https://tools.ietf.org/html/rfc7946#section-3.1.6

[3]: https://tools.ietf.org/html/rfc7946#section-3.1.7

[4]: https://tools.ietf.org/html/rfc7946#section-3.1.1

[5]: https://tools.ietf.org/html/rfc7946#section-3.2

[6]: https://tools.ietf.org/html/rfc7946#section-3.1.6

[7]: https://tools.ietf.org/html/rfc7946#section-3.1.7

[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean

<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->

---

This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

### Installation

Install this module individually:

```sh
$ npm install @spatial/boolean-point-in-polygon
```

Or install the Turf module that includes it as a function:

```sh
$ npm install @turf/turf
```
npm package: @spatial/boolean-point-on-line
Description: turf boolean-point-on-line module
Author: Turf Authors
Latest version: 2.0.0

# @spatial/boolean-point-on-line

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## booleanPointOnLine

Returns true if a point is on a line. Accepts a optional parameter to ignore the start and end vertices of the linestring.

### Parameters

-   `pt` **[Coord][1]** GeoJSON Point
-   `line` **[Feature][2]&lt;[LineString][3]>** GeoJSON LineString
-   `options` **[Object][4]** Optional parameters (optional, default `{}`)
    -   `options.ignoreEndVertices` **[boolean][5]** whether to ignore the start and end vertices. (optional, default `false`)

### Examples

```javascript
var pt = turf.point([0, 0]);
var line = turf.lineString([[-1, -1],[1, 1],[1.5, 2.2]]);
var isPointOnLine = turf.booleanPointOnLine(pt, line);
//=true
```

Returns **[boolean][5]** true/false

[1]: https://tools.ietf.org/html/rfc7946#section-3.1.1

[2]: https://tools.ietf.org/html/rfc7946#section-3.2

[3]: https://tools.ietf.org/html/rfc7946#section-3.1.4

[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean

<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->

---

This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

### Installation

Install this module individually:

```sh
$ npm install @spatial/boolean-point-on-line
```

Or install the Turf module that includes it as a function:

```sh
$ npm install @turf/turf
```
npm package: @spatial/boolean-within
Description: turf boolean-within module
Author: Turf Authors
Latest version: 2.0.0

# @spatial/boolean-within

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## booleanWithin

Boolean-within returns true if the first geometry is completely within the second geometry.
The interiors of both geometries must intersect and, the interior and boundary of the primary (geometry a)
must not intersect the exterior of the secondary (geometry b).
Boolean-within returns the exact opposite result of the `@spatial/boolean-contains`.

### Parameters

-   `feature1` **([Geometry][1] \| [Feature][2]&lt;any>)** GeoJSON Feature or Geometry
-   `feature2` **([Geometry][1] \| [Feature][2]&lt;any>)** GeoJSON Feature or Geometry

### Examples

```javascript
var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);
var point = turf.point([1, 2]);

turf.booleanWithin(point, line);
//=true
```

Returns **[boolean][3]** true/false

[1]: https://tools.ietf.org/html/rfc7946#section-3.1

[2]: https://tools.ietf.org/html/rfc7946#section-3.2

[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean

<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->

---

This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

### Installation

Install this module individually:

```sh
$ npm install @spatial/boolean-within
```

Or install the Turf module that includes it as a function:

```sh
$ npm install @turf/turf
```
npm package: @spatial/buffer
Description: turf buffer module
Author: Turf Authors
Latest version: 2.0.0

# @spatial/buffer

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## buffer

Calculates a buffer for input features for a given radius. Units supported are miles, kilometers, and degrees.

When using a negative radius, the resulting geometry may be invalid if
it's too small compared to the radius magnitude. If the input is a
FeatureCollection, only valid members will be returned in the output
FeatureCollection - i.e., the output collection may have fewer members than
the input, or even be empty.

### Parameters

-   `geojson` **([FeatureCollection][1] \| [Geometry][2] \| [Feature][3]&lt;any>)** input to be buffered
-   `radius` **[number][4]** distance to draw the buffer (negative values are allowed)
-   `options` **[Object][5]** Optional parameters (optional, default `{}`)
    -   `options.units` **[string][6]** any of the options supported by turf units (optional, default `"kilometers"`)
    -   `options.steps` **[number][4]** number of steps (optional, default `64`)

### Examples

```javascript
var point = turf.point([-90.548630, 14.616599]);
var buffered = turf.buffer(point, 500, {units: 'miles'});

//addToMap
var addToMap = [point, buffered]
```

Returns **([FeatureCollection][1] \| [Feature][3]&lt;([Polygon][7] \| [MultiPolygon][8])> | [undefined][9])** buffered features

[1]: https://tools.ietf.org/html/rfc7946#section-3.3

[2]: https://tools.ietf.org/html/rfc7946#section-3.1

[3]: https://tools.ietf.org/html/rfc7946#section-3.2

[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number

[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String

[7]: https://tools.ietf.org/html/rfc7946#section-3.1.6

[8]: https://tools.ietf.org/html/rfc7946#section-3.1.7

[9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined

<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->

---

This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

### Installation

Install this module individually:

```sh
$ npm install @spatial/buffer
```

Or install the Turf module that includes it as a function:

```sh
$ npm install @turf/turf
```
npm package: @spatial/center
Description: turf center module
Author: Turf Authors
Latest version: 2.0.0

# @spatial/center

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## center

Takes a [Feature][1] or [FeatureCollection][2] and returns the absolute center point of all features.

### Parameters

-   `geojson` **[GeoJSON][3]** GeoJSON to be centered
-   `options` **[Object][4]** Optional parameters (optional, default `{}`)
    -   `options.properties` **[Object][4]** an Object that is used as the [Feature][1]'s properties (optional, default `{}`)

### Examples

```javascript
var features = turf.featureCollection([
  turf.point( [-97.522259, 35.4691]),
  turf.point( [-97.502754, 35.463455]),
  turf.point( [-97.508269, 35.463245])
]);

var center = turf.center(features);

//addToMap
var addToMap = [features, center]
center.properties['marker-size'] = 'large';
center.properties['marker-color'] = '#000';
```

Returns **[Feature][5]&lt;[Point][6]>** a Point feature at the absolute center point of all input features

[1]: https://tools.ietf.org/html/rfc7946#section-3.2

[2]: https://tools.ietf.org/html/rfc7946#section-3.3

[3]: https://tools.ietf.org/html/rfc7946#section-3

[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[5]: https://tools.ietf.org/html/rfc7946#section-3.2

[6]: https://tools.ietf.org/html/rfc7946#section-3.1.2

<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->

---

This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

### Installation

Install this module individually:

```sh
$ npm install @spatial/center
```

Or install the Turf module that includes it as a function:

```sh
$ npm install @turf/turf
```
npm package: @spatial/center-mean
Description: turf center-mean module
Author: Turf Authors
Latest version: 2.0.0

# @spatial/center-mean

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## centerMean

Takes a [Feature][1] or [FeatureCollection][2] and returns the mean center. Can be weighted.

### Parameters

-   `geojson` **[GeoJSON][3]** GeoJSON to be centered
-   `options` **[Object][4]** Optional parameters (optional, default `{}`)
    -   `options.properties` **[Object][4]** an Object that is used as the [Feature][1]'s properties (optional, default `{}`)
    -   `options.weight` **[number][5]?** the property name used to weight the center

### Examples

```javascript
var features = turf.featureCollection([
  turf.point([-97.522259, 35.4691], {weight: 10}),
  turf.point([-97.502754, 35.463455], {weight: 3}),
  turf.point([-97.508269, 35.463245], {weight: 5})
]);

var options = {weight: "weight"}
var mean = turf.centerMean(features, options);

//addToMap
var addToMap = [features, mean]
mean.properties['marker-size'] = 'large';
mean.properties['marker-color'] = '#000';
```

Returns **[Feature][6]&lt;[Point][7]>** a Point feature at the mean center point of all input features

[1]: https://tools.ietf.org/html/rfc7946#section-3.2

[2]: https://tools.ietf.org/html/rfc7946#section-3.3

[3]: https://tools.ietf.org/html/rfc7946#section-3

[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number

[6]: https://tools.ietf.org/html/rfc7946#section-3.2

[7]: https://tools.ietf.org/html/rfc7946#section-3.1.2

<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->

---

This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

### Installation

Install this module individually:

```sh
$ npm install @spatial/center-mean
```

Or install the Turf module that includes it as a function:

```sh
$ npm install @turf/turf
```
npm package: @spatial/center-of-mass
Description: turf center-of-mass module
Author: Turf Authors
Latest version: 2.0.0

# @spatial/center-of-mass

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## centerOfMass

Takes any [Feature][1] or a [FeatureCollection][2] and returns its [center of mass][3] using this formula: [Centroid of Polygon][4].

### Parameters

-   `geojson` **[GeoJSON][5]** GeoJSON to be centered
-   `properties` **[Object][6]** an Object that is used as the [Feature][1]'s properties (optional, default `{}`)

### Examples

```javascript
var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);

var center = turf.centerOfMass(polygon);

//addToMap
var addToMap = [polygon, center]
```

Returns **[Feature][7]&lt;[Point][8]>** the center of mass

[1]: https://tools.ietf.org/html/rfc7946#section-3.2

[2]: https://tools.ietf.org/html/rfc7946#section-3.3

[3]: https://en.wikipedia.org/wiki/Center_of_mass

[4]: https://en.wikipedia.org/wiki/Centroid#Centroid_of_polygon

[5]: https://tools.ietf.org/html/rfc7946#section-3

[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[7]: https://tools.ietf.org/html/rfc7946#section-3.2

[8]: https://tools.ietf.org/html/rfc7946#section-3.1.2

<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->

---

This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

### Installation

Install this module individually:

```sh
$ npm install @spatial/center-of-mass
```

Or install the Turf module that includes it as a function:

```sh
$ npm install @turf/turf
```
npm package: @spatial/centroid
Description: turf centroid module
Author: Turf Authors
Latest version: 2.0.0

# @spatial/centroid

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## centroid

Takes one or more features and calculates the centroid using the mean of all vertices.
This lessens the effect of small islands and artifacts when calculating the centroid of a set of polygons.

### Parameters

-   `geojson` **[GeoJSON][1]** GeoJSON to be centered
-   `properties` **[Object][2]** an Object that is used as the [Feature][3]'s properties (optional, default `{}`)

### Examples

```javascript
var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);

var centroid = turf.centroid(polygon);

//addToMap
var addToMap = [polygon, centroid]
```

Returns **[Feature][4]&lt;[Point][5]>** the centroid of the input features

[1]: https://tools.ietf.org/html/rfc7946#section-3

[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[3]: https://tools.ietf.org/html/rfc7946#section-3.2

[4]: https://tools.ietf.org/html/rfc7946#section-3.2

[5]: https://tools.ietf.org/html/rfc7946#section-3.1.2

<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->

---

This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

### Installation

Install this module individually:

```sh
$ npm install @spatial/centroid
```

Or install the Turf module that includes it as a function:

```sh
$ npm install @turf/turf
```
npm package: @spatial/circle
Description: turf circle module
Author: Turf Authors
Latest version: 2.0.0

# @spatial/circle

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## circle

Takes a [Point][1] and calculates the circle polygon given a radius in degrees, radians, miles, or kilometers; and steps for precision.

### Parameters

-   `center` **([Feature][2]&lt;[Point][3]> | [Array][4]&lt;[number][5]>)** center point
-   `radius` **[number][5]** radius of the circle
-   `options` **[Object][6]** Optional parameters (optional, default `{}`)
    -   `options.steps` **[number][5]** number of steps (optional, default `64`)
    -   `options.units` **[string][7]** miles, kilometers, degrees, or radians (optional, default `'kilometers'`)
    -   `options.properties` **[Object][6]** properties (optional, default `{}`)

### Examples

```javascript
var center = [-75.343, 39.984];
var radius = 5;
var options = {steps: 10, units: 'kilometers', properties: {foo: 'bar'}};
var circle = turf.circle(center, radius, options);

//addToMap
var addToMap = [turf.point(center), circle]
```

Returns **[Feature][2]&lt;[Polygon][8]>** circle polygon

[1]: https://tools.ietf.org/html/rfc7946#section-3.1.2

[2]: https://tools.ietf.org/html/rfc7946#section-3.2

[3]: https://tools.ietf.org/html/rfc7946#section-3.1.2

[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array

[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number

[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String

[8]: https://tools.ietf.org/html/rfc7946#section-3.1.6

<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->

---

This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

### Installation

Install this module individually:

```sh
$ npm install @spatial/circle
```

Or install the Turf module that includes it as a function:

```sh
$ npm install @turf/turf
```
npm package: @spatial/clean-coords
Description: turf clean-coords module
Author: Turf Authors
Latest version: 2.0.0

# @spatial/clean-coords

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## cleanCoords

Removes redundant coordinates from any GeoJSON Geometry.

### Parameters

-   `geojson` **([Geometry][1] \| [Feature][2])** Feature or Geometry
-   `options` **[Object][3]** Optional parameters (optional, default `{}`)
    -   `options.mutate` **[boolean][4]** allows GeoJSON input to be mutated (optional, default `false`)

### Examples

```javascript
var line = turf.lineString([[0, 0], [0, 2], [0, 5], [0, 8], [0, 8], [0, 10]]);
var multiPoint = turf.multiPoint([[0, 0], [0, 0], [2, 2]]);

turf.cleanCoords(line).geometry.coordinates;
//= [[0, 0], [0, 10]]

turf.cleanCoords(multiPoint).geometry.coordinates;
//= [[0, 0], [2, 2]]
```

Returns **([Geometry][1] \| [Feature][2])** the cleaned input Feature/Geometry

[1]: https://tools.ietf.org/html/rfc7946#section-3.1

[2]: https://tools.ietf.org/html/rfc7946#section-3.2

[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean

<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->

---

This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

### Installation

Install this module individually:

```sh
$ npm install @spatial/clean-coords
```

Or install the Turf module that includes it as a function:

```sh
$ npm install @turf/turf
```
npm package: @spatial/clone
Description: turf clone module
Author: Turf Authors
Latest version: 2.0.0

# @spatial/clone

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## clone

Returns a cloned copy of the passed GeoJSON Object, including possible 'Foreign Members'.
~3-5x faster than the common JSON.parse + JSON.stringify combo method.

### Parameters

-   `geojson` **[GeoJSON][1]** GeoJSON Object

### Examples

```javascript
var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]], {color: 'red'});

var lineCloned = turf.clone(line);
```

Returns **[GeoJSON][1]** cloned GeoJSON Object

[1]: https://tools.ietf.org/html/rfc7946#section-3

<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->

---

This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

### Installation

Install this module individually:

```sh
$ npm install @spatial/clone
```

Or install the Turf module that includes it as a function:

```sh
$ npm install @turf/turf
```