@turf/great-circle
Advanced tools
Comparing version 5.0.6 to 5.1.0
16
main.js
@@ -41,2 +41,4 @@ 'use strict'; | ||
Arc.prototype.json = function () { | ||
var this$1 = this; | ||
if (this.geometries.length <= 0) { | ||
@@ -53,3 +55,3 @@ return {'geometry': { 'type': 'LineString', 'coordinates': null }, | ||
for (var i = 0; i < this.geometries.length; i++) { | ||
multiline.push(this.geometries[i].coords); | ||
multiline.push(this$1.geometries[i].coords); | ||
} | ||
@@ -64,2 +66,4 @@ return {'geometry': { 'type': 'MultiLineString', 'coordinates': multiline }, | ||
Arc.prototype.wkt = function () { | ||
var this$1 = this; | ||
var wkt_string = ''; | ||
@@ -69,6 +73,6 @@ var wkt = 'LINESTRING('; | ||
for (var i = 0; i < this.geometries.length; i++) { | ||
if (this.geometries[i].coords.length === 0) { | ||
if (this$1.geometries[i].coords.length === 0) { | ||
return 'LINESTRING(empty)'; | ||
} else { | ||
var coords = this.geometries[i].coords; | ||
var coords = this$1.geometries[i].coords; | ||
coords.forEach(collect); | ||
@@ -131,2 +135,4 @@ wkt_string += wkt.substring(0, wkt.length - 1) + ')'; | ||
GreatCircle.prototype.Arc = function (npoints, options) { | ||
var this$1 = this; | ||
var first_pass = []; | ||
@@ -140,3 +146,3 @@ if (!npoints || npoints <= 2) { | ||
var step = delta * i; | ||
var pair = this.interpolate(step); | ||
var pair = this$1.interpolate(step); | ||
first_pass.push(pair); | ||
@@ -275,3 +281,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; | ||
@@ -278,0 +284,0 @@ var npoints = options.npoints; |
{ | ||
"name": "@turf/great-circle", | ||
"version": "5.0.6", | ||
"version": "5.1.0", | ||
"description": "turf great-circle module", | ||
@@ -45,6 +45,7 @@ "main": "main.js", | ||
"@std/esm": "*", | ||
"@turf/truncate": "*", | ||
"@turf/truncate": "^5.1.0", | ||
"benchmark": "*", | ||
"load-json-file": "*", | ||
"rollup": "*", | ||
"rollup-plugin-buble": "*", | ||
"tape": "*", | ||
@@ -54,4 +55,4 @@ "write-json-file": "*" | ||
"dependencies": { | ||
"@turf/helpers": "^5.0.4", | ||
"@turf/invariant": "^5.0.4" | ||
"@turf/helpers": "^5.1.0", | ||
"@turf/invariant": "^5.1.0" | ||
}, | ||
@@ -58,0 +59,0 @@ "@std/esm": { |
@@ -7,8 +7,8 @@ # @turf/great-circle | ||
Calculate great circles routes as [LineString](http://geojson.org/geojson-spec.html#linestring) | ||
Calculate great circles routes as [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) | ||
**Parameters** | ||
- `start` **([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)>)** source point feature | ||
- `end` **([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)>)** destination point feature | ||
- `start` **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** source point feature | ||
- `end` **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** destination point feature | ||
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Optional parameters (optional, default `{}`) | ||
@@ -32,3 +32,3 @@ - `options.properties` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** line feature properties (optional, default `{}`) | ||
Returns **[Feature](http://geojson.org/geojson-spec.html#feature-objects)<[LineString](http://geojson.org/geojson-spec.html#linestring)>** great circle line feature | ||
Returns **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)<[LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)>** great circle line feature | ||
@@ -35,0 +35,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
806
36944
8
Updated@turf/helpers@^5.1.0
Updated@turf/invariant@^5.1.0