turf-inside
Advanced tools
Comparing version 3.0.10 to 3.0.12
{ | ||
"name": "turf-inside", | ||
"version": "3.0.10", | ||
"version": "3.0.12", | ||
"description": "turf inside module", | ||
@@ -28,3 +28,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"turf-invariant": "^3.0.10" | ||
"turf-invariant": "^3.0.12" | ||
}, | ||
@@ -34,4 +34,4 @@ "devDependencies": { | ||
"tape": "^3.5.0", | ||
"turf-helpers": "^3.0.10" | ||
"turf-helpers": "^3.0.12" | ||
} | ||
} |
# turf-inside | ||
[![build status](https://secure.travis-ci.org/Turfjs/turf-inside.png)](http://travis-ci.org/Turfjs/turf-inside) | ||
# inside | ||
turf inside module | ||
### `turf.inside(point, polygon)` | ||
Takes a Point and a Polygon or MultiPolygon and determines if the point resides inside the polygon. The polygon can | ||
Takes a [Point](Point) and a [Polygon](Polygon) or [MultiPolygon](MultiPolygon) and determines if the point resides inside the polygon. The polygon can | ||
be convex or concave. The function accounts for holes. | ||
**Parameters** | ||
### Parameters | ||
- `point` **Feature<Point>** input point | ||
- `polygon` **Feature<(Polygon | MultiPolygon)>** input polygon or multipolygon | ||
| parameter | type | description | | ||
| --------- | --------------------------------- | ----------------------------- | | ||
| `point` | Feature\.\<Point\> | input point | | ||
| `polygon` | Feature\.\<Polygon|MultiPolygon\> | input polygon or multipolygon | | ||
**Examples** | ||
### Example | ||
```js | ||
```javascript | ||
var pt1 = { | ||
@@ -74,9 +65,15 @@ "type": "Feature", | ||
Returns **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** `true` if the Point is inside the Polygon; `false` if the Point is not inside the Polygon | ||
**Returns** `Boolean`, `true` if the Point is inside the Polygon; `false` if the Point is not inside the Polygon | ||
--- | ||
## Installation | ||
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. | ||
Requires [nodejs](http://nodejs.org/). | ||
### Installation | ||
Install this module individually: | ||
```sh | ||
@@ -86,8 +83,6 @@ $ npm install turf-inside | ||
## Tests | ||
Or install the Turf module that includes it as a function: | ||
```sh | ||
$ npm test | ||
$ npm install turf | ||
``` | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9409
87
Updatedturf-invariant@^3.0.12