Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

geolib

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

geolib - npm Package Compare versions

Comparing version 3.0.4 to 3.1.0

es/wktToPolygon.d.ts

2

package.json
{
"name": "geolib",
"version": "3.0.4",
"version": "3.1.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -445,3 +445,3 @@ # Geolib

### getCoordinateKey(point, keysToLookup)`
### `getCoordinateKey(point, keysToLookup)`

@@ -550,1 +550,21 @@ Is used by `getCoordinateKeys` under the hood and returns the property name out of a list of possible names.

Returns the converted area as number.
### `wktToPolygon(wkt)`
Converts the Well-known text (a.k.a WKT) to polygon that Geolib understands.
[https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry#Geometric_Objects](WKT)
```js
geolib.wktToPolygon('POLYGON ((30 10.54321, 40 40, 20 40, 10 20, 30 10))');
// [
// { latitude: 10.54321, longitude: 30 },
// { latitude: 40, longitude: 40 },
// { latitude: 40, longitude: 20 },
// { latitude: 20, longitude: 10 },
// { latitude: 10, longitude: 30 },}
// ]
```
Returns the array of coordinates.
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc