Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

turf-point-on-surface

Package Overview
Dependencies
8
Maintainers
9
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.10 to 3.0.12

12

package.json
{
"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
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc