@turf/nearest-point-on-line
Advanced tools
Comparing version 5.0.4 to 5.1.0
@@ -42,3 +42,3 @@ 'use strict'; | ||
options = options || {}; | ||
if (!helpers.isObject(options)) throw new Error('options is invalid'); | ||
if (!helpers.isObject(options)) { throw new Error('options is invalid'); } | ||
@@ -45,0 +45,0 @@ // validation |
{ | ||
"name": "@turf/nearest-point-on-line", | ||
"version": "5.0.4", | ||
"version": "5.1.0", | ||
"description": "turf nearest-point-on-line module", | ||
"main": "main", | ||
"module": "index", | ||
"jsnext:main": "index", | ||
"main": "main.js", | ||
"module": "main.mjs", | ||
"types": "index.d.ts", | ||
@@ -12,3 +11,4 @@ "files": [ | ||
"index.d.ts", | ||
"main.js" | ||
"main.js", | ||
"main.mjs" | ||
], | ||
@@ -18,3 +18,4 @@ "scripts": { | ||
"test": "node -r @std/esm test.js", | ||
"bench": "node -r @std/esm bench.js" | ||
"bench": "node -r @std/esm bench.js", | ||
"docs": "node ../../scripts/generate-readmes" | ||
}, | ||
@@ -33,8 +34,9 @@ "repository": { | ||
"@std/esm": "*", | ||
"@turf/along": "^5.0.4", | ||
"@turf/length": "^5.0.4", | ||
"@turf/truncate": "^5.0.4", | ||
"@turf/along": "^5.1.0", | ||
"@turf/length": "^5.1.0", | ||
"@turf/truncate": "^5.1.0", | ||
"benchmark": "*", | ||
"load-json-file": "*", | ||
"rollup": "*", | ||
"rollup-plugin-buble": "*", | ||
"tape": "*", | ||
@@ -44,9 +46,9 @@ "write-json-file": "*" | ||
"dependencies": { | ||
"@turf/bearing": "^5.0.4", | ||
"@turf/destination": "^5.0.4", | ||
"@turf/distance": "^5.0.4", | ||
"@turf/helpers": "^5.0.4", | ||
"@turf/invariant": "^5.0.4", | ||
"@turf/line-intersect": "^5.0.4", | ||
"@turf/meta": "^5.0.4" | ||
"@turf/bearing": "^5.1.0", | ||
"@turf/destination": "^5.1.0", | ||
"@turf/distance": "^5.1.0", | ||
"@turf/helpers": "^5.1.0", | ||
"@turf/invariant": "^5.1.0", | ||
"@turf/line-intersect": "^5.1.0", | ||
"@turf/meta": "^5.1.0" | ||
}, | ||
@@ -53,0 +55,0 @@ "@std/esm": { |
@@ -7,8 +7,8 @@ # @turf/nearest-point-on-line | ||
Takes a [Point](http://geojson.org/geojson-spec.html#point) and a [LineString](http://geojson.org/geojson-spec.html#linestring) and calculates the closest Point on the (Multi)LineString. | ||
Takes a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and a [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) and calculates the closest Point on the (Multi)LineString. | ||
**Parameters** | ||
- `lines` **([Geometry](http://geojson.org/geojson-spec.html#geometry) \| [Feature](http://geojson.org/geojson-spec.html#feature-objects)<([LineString](http://geojson.org/geojson-spec.html#linestring) \| [MultiLineString](http://geojson.org/geojson-spec.html#multilinestring))>)** lines to snap to | ||
- `pt` **([Geometry](http://geojson.org/geojson-spec.html#geometry) \| [Feature](http://geojson.org/geojson-spec.html#feature-objects)<[Point](http://geojson.org/geojson-spec.html#point)> | [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)>)** point to snap from | ||
- `lines` **([Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)<([LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) \| [MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5))>)** lines to snap to | ||
- `pt` **([Geometry](https://tools.ietf.org/html/rfc7946#section-3.1) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)> | [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)>)** point to snap from | ||
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Optional parameters (optional, default `{}`) | ||
@@ -37,3 +37,3 @@ - `options.units` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** can be degrees, radians, miles, or kilometers (optional, default `'kilometers'`) | ||
Returns **[Feature](http://geojson.org/geojson-spec.html#feature-objects)<[Point](http://geojson.org/geojson-spec.html#point)>** closest point on the `line` to `point`. The properties object will contain three values: `index`: closest point was found on nth line part, `dist`: distance between pt and the closest point, `location`: distance along the line between start and the closest point. | ||
Returns **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)>** closest point on the `line` to `point`. The properties object will contain three values: `index`: closest point was found on nth line part, `dist`: distance between pt and the closest point, `location`: distance along the line between start and the closest point. | ||
@@ -40,0 +40,0 @@ <!-- This file is automatically generated. Please don't edit it directly: |
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
18913
7
301
10
Updated@turf/bearing@^5.1.0
Updated@turf/destination@^5.1.0
Updated@turf/distance@^5.1.0
Updated@turf/helpers@^5.1.0
Updated@turf/invariant@^5.1.0
Updated@turf/line-intersect@^5.1.0
Updated@turf/meta@^5.1.0