@turf/great-circle
Advanced tools
Comparing version 7.1.0 to 7.2.0
// index.js | ||
import { lineString } from "@turf/helpers"; | ||
import { getCoord } from "@turf/invariant"; | ||
@@ -219,4 +220,3 @@ | ||
options = options || {}; | ||
if (typeof options !== "object") | ||
throw new Error("options is invalid"); | ||
if (typeof options !== "object") throw new Error("options is invalid"); | ||
var properties = options.properties; | ||
@@ -229,2 +229,7 @@ var npoints = options.npoints; | ||
npoints = npoints || 100; | ||
if (start[0] === end[0] && start[1] === end[1]) { | ||
const arr = Array(npoints); | ||
arr.fill([start[0], start[1]]); | ||
return lineString(arr, properties); | ||
} | ||
offset = offset || 10; | ||
@@ -231,0 +236,0 @@ var generator = new GreatCircle( |
{ | ||
"name": "@turf/great-circle", | ||
"version": "7.1.0", | ||
"version": "7.2.0", | ||
"description": "turf great-circle module", | ||
@@ -61,19 +61,19 @@ "author": "Turf Authors", | ||
"devDependencies": { | ||
"@turf/truncate": "^7.1.0", | ||
"@turf/truncate": "^7.2.0", | ||
"@types/benchmark": "^2.1.5", | ||
"@types/tape": "^4.2.32", | ||
"@types/tape": "^4.13.4", | ||
"benchmark": "^2.1.4", | ||
"load-json-file": "^7.0.1", | ||
"npm-run-all": "^4.1.5", | ||
"tape": "^5.7.2", | ||
"tsup": "^8.0.1", | ||
"tsx": "^4.6.2", | ||
"tape": "^5.9.0", | ||
"tsup": "^8.3.5", | ||
"tsx": "^4.19.2", | ||
"write-json-file": "^5.0.0" | ||
}, | ||
"dependencies": { | ||
"@turf/helpers": "^7.1.0", | ||
"@turf/invariant": "^7.1.0", | ||
"@turf/helpers": "^7.2.0", | ||
"@turf/invariant": "^7.2.0", | ||
"@types/geojson": "^7946.0.10" | ||
}, | ||
"gitHead": "68915eeebc9278bb40dec3f1034499698a0561ef" | ||
"gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867" | ||
} |
@@ -9,3 +9,4 @@ # @turf/great-circle | ||
If the `start` and `end` points span the antimeridian, the resulting feature will | ||
be split into a `MultiLineString`. | ||
be split into a `MultiLineString`. If the `start` and `end` positions are the same | ||
then a `LineString` will be returned with duplicate coordinates the length of the `npoints` option. | ||
@@ -12,0 +13,0 @@ ### Parameters |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
70783
552
68
Updated@turf/helpers@^7.2.0
Updated@turf/invariant@^7.2.0