@turf/great-circle 6.5.0 → 7.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -10,12 +10,13 @@ be split into a `MultiLineString`.
10
10
 
11
11
  ### Parameters
12
12
 
13
- - `start` **[Coord][3]** source point feature
14
- - `end` **[Coord][3]** destination point feature
15
- - `options` **[Object][4]** Optional parameters (optional, default `{}`)
16
- - `options.properties` **[Object][4]** line feature properties (optional, default `{}`)
17
- - `options.npoints` **[number][5]** number of points (optional, default `100`)
18
- - `options.offset` **[number][5]** offset controls the likelyhood that lines will
13
+ * `start` **[Coord][3]** source point feature
14
+ * `end` **[Coord][3]** destination point feature
15
+ * `options` **[Object][4]** Optional parameters (optional, default `{}`)
16
+
17
+ * `options.properties` **[Object][4]** line feature properties (optional, default `{}`)
18
+ * `options.npoints` **[number][5]** number of points (optional, default `100`)
19
+ * `options.offset` **[number][5]** offset controls the likelyhood that lines will
19
20
  be split which cross the dateline. The higher the number the more likely. (optional, default `10`)
20
21
 
21
22
  ### Examples
@@ -30,7 +31,7 @@ var greatCircle = turf.greatCircle(start, end, {properties: {name: 'Seattle to D
30
31
  var addToMap = [start, end, greatCircle]
31
32
  ```
32
33
 
33
- Returns **[Feature][6]<([LineString][7] \| [MultiLineString][8])>** great circle line feature
34
+ Returns **[Feature][6]<([LineString][7] | [MultiLineString][8])>** great circle line feature
34
35
 
35
36
  [1]: https://tools.ietf.org/html/rfc7946#section-3.1.4
36
37
 
package/dist/es/index.js CHANGED
@@ -1,5 +1,31 @@
1
1
  import { getCoord } from '@turf/invariant';
2
2
 
3
+ /*!
4
+ * Copyright (c) 2019, Dane Springmeyer
5
+ *
6
+ * Redistribution and use in source and binary forms, with or without
7
+ * modification, are permitted provided that the following conditions are
8
+ * met:
9
+ *
10
+ * * Redistributions of source code must retain the above copyright
11
+ * notice, this list of conditions and the following disclaimer.
12
+ * * Redistributions in binary form must reproduce the above copyright
13
+ * notice, this list of conditions and the following disclaimer in
14
+ * the documentation and/or other materials provided with the
15
+ * distribution.
16
+ *
17
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
18
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
19
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
21
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
24
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
+ */
3
29
  var D2R = Math.PI / 180;
4
30
  var R2D = 180 / Math.PI;
5
31
 
package/dist/js/index.js CHANGED
@@ -2,6 +2,32 @@
2
2
 
3
3
  var invariant = require('@turf/invariant');
4
4
 
5
+ /*!
6
+ * Copyright (c) 2019, Dane Springmeyer
7
+ *
8
+ * Redistribution and use in source and binary forms, with or without
9
+ * modification, are permitted provided that the following conditions are
10
+ * met:
11
+ *
12
+ * * Redistributions of source code must retain the above copyright
13
+ * notice, this list of conditions and the following disclaimer.
14
+ * * Redistributions in binary form must reproduce the above copyright
15
+ * notice, this list of conditions and the following disclaimer in
16
+ * the documentation and/or other materials provided with the
17
+ * distribution.
18
+ *
19
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
20
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
+ */
5
31
  var D2R = Math.PI / 180;
6
32
  var R2D = 180 / Math.PI;
7
33
 
package/index.d.ts CHANGED
@@ -2,9 +2,9 @@ import {
2
2
  LineString,
3
3
  MultiLineString,
4
4
  Feature,
5
- Coord,
6
- Properties,
7
- } from "@turf/helpers";
5
+ GeoJsonProperties,
6
+ } from "geojson";
7
+ import { Coord } from "@turf/helpers";
8
8
 
9
9
  /**
10
10
  * http://turfjs.org/docs/#greatcircle
@@ -13,7 +13,7 @@ export default function greatCircle(
13
13
  start: Coord,
14
14
  end: Coord,
15
15
  options?: {
16
- properties?: Properties;
16
+ properties?: GeoJsonProperties;
17
17
  npoints?: number;
18
18
  offset?: number;
19
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turf/great-circle",
3
- "version": "6.5.0",
3
+ "version": "7.0.0-alpha.1",
4
4
  "description": "turf great-circle module",
5
5
  "author": "Turf Authors",
6
6
  "contributors": [
@@ -33,6 +33,7 @@
33
33
  "exports": {
34
34
  "./package.json": "./package.json",
35
35
  ".": {
36
+ "types": "./index.d.ts",
36
37
  "import": "./dist/es/index.js",
37
38
  "require": "./dist/js/index.js"
38
39
  }
@@ -44,25 +45,26 @@
44
45
  "index.d.ts"
45
46
  ],
46
47
  "scripts": {
47
- "bench": "node -r esm bench.js",
48
+ "bench": "tsx bench.js",
48
49
  "build": "rollup -c ../../rollup.config.js && echo '{\"type\":\"module\"}' > dist/es/package.json",
49
- "docs": "node ../../scripts/generate-readmes",
50
+ "docs": "tsx ../../scripts/generate-readmes",
50
51
  "test": "npm-run-all test:*",
51
- "test:tape": "node -r esm test.js",
52
- "test:types": "tsc --esModuleInterop --noEmit types.ts"
52
+ "test:tape": "tsx test.js",
53
+ "test:types": "tsc --esModuleInterop --noEmit --strict types.ts"
53
54
  },
54
55
  "devDependencies": {
55
- "@turf/truncate": "^6.5.0",
56
+ "@turf/truncate": "^7.0.0-alpha.1",
56
57
  "benchmark": "*",
57
58
  "load-json-file": "*",
58
59
  "npm-run-all": "*",
59
60
  "rollup": "*",
60
61
  "tape": "*",
62
+ "tsx": "*",
61
63
  "write-json-file": "*"
62
64
  },
63
65
  "dependencies": {
64
- "@turf/helpers": "^6.5.0",
65
- "@turf/invariant": "^6.5.0"
66
+ "@turf/helpers": "^7.0.0-alpha.1",
67
+ "@turf/invariant": "^7.0.0-alpha.1"
66
68
  },
67
- "gitHead": "5375941072b90d489389db22b43bfe809d5e451e"
69
+ "gitHead": "cf7a0c507b017ca066acffd0ce23bda5b393fb5a"
68
70
  }