Comparing version 3.0.4 to 3.1.0
{ | ||
"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. | ||
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
93839
89
229
569