turf-point-on-surface
Advanced tools
Comparing version 3.0.10 to 3.0.12
{ | ||
"name": "turf-point-on-surface", | ||
"version": "3.0.10", | ||
"version": "3.0.12", | ||
"description": "turf point-on-surface module", | ||
@@ -32,8 +32,8 @@ "main": "index.js", | ||
"dependencies": { | ||
"turf-center": "^3.0.10", | ||
"turf-distance": "^3.0.10", | ||
"turf-explode": "^3.0.10", | ||
"turf-inside": "^3.0.10", | ||
"turf-helpers": "^3.0.10" | ||
"turf-center": "^3.0.12", | ||
"turf-distance": "^3.0.12", | ||
"turf-explode": "^3.0.12", | ||
"turf-inside": "^3.0.12", | ||
"turf-helpers": "^3.0.12" | ||
} | ||
} |
# turf-point-on-surface | ||
[![build status](https://secure.travis-ci.org/Turfjs/turf-point-on-surface.png)](http://travis-ci.org/Turfjs/turf-point-on-surface) | ||
# pointOnSurface | ||
turf point-on-surface module | ||
Takes a feature and returns a [Point](Point) guaranteed to be on the surface of the feature. | ||
- Given a [Polygon](Polygon), the point will be in the area of the polygon | ||
- Given a [LineString](LineString), the point will be along the string | ||
- Given a [Point](Point), the point will the same as the input | ||
### `turf.point-on-surface(input)` | ||
**Parameters** | ||
Takes a feature and returns a Point guaranteed to be on the surface of the feature. | ||
- `fc` **(Feature | FeatureCollection)** any feature or set of features | ||
* Given a Polygon, the point will be in the area of the polygon | ||
* Given a LineString, the point will be along the string | ||
* Given a Point, the point will the same as the input | ||
**Examples** | ||
### Parameters | ||
| parameter | type | description | | ||
| --------- | -------------------------- | ------------------------------ | | ||
| `input` | Feature\,FeatureCollection | any feature or set of features | | ||
### Example | ||
```js | ||
```javascript | ||
// create a random polygon | ||
@@ -43,9 +34,15 @@ var polygon = turf.random('polygon'); | ||
Returns **Feature** a point on the surface of `input` | ||
**Returns** `Feature`, a point on the surface of `input` | ||
--- | ||
## 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 | ||
@@ -55,8 +52,6 @@ $ npm install turf-point-on-surface | ||
## Tests | ||
Or install the Turf module that includes it as a function: | ||
```sh | ||
$ npm test | ||
$ npm install turf | ||
``` | ||
11888
56
Updatedturf-center@^3.0.12
Updatedturf-distance@^3.0.12
Updatedturf-explode@^3.0.12
Updatedturf-helpers@^3.0.12
Updatedturf-inside@^3.0.12