@ulrik.ek/wgs84 1.0.3 → 1.0.4
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 +3 -3
- package/dist/index.js +11 -12
- package/dist/index.js.map +1 -1
- package/package.json +61 -61
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ const lat = 15;
|
|
|
26
26
|
const lon = 25;
|
|
27
27
|
const p: wgs84.Point = wgs84.point(lat, lon);
|
|
28
28
|
|
|
29
|
-
// Getting a new point
|
|
29
|
+
// Getting a new point 300m north and 400m east of the first point
|
|
30
30
|
const p1: wgs84.Point = wgs84.pointEastOf(wgs84.pointNorthOf(p, 300), 400);
|
|
31
31
|
const newLat = p1.coordinates[1]; // GeoJSON uses [lon, lat] order!
|
|
32
32
|
const newLon = p1.coordinates[0];
|
|
@@ -45,7 +45,7 @@ This will produce the following output
|
|
|
45
45
|
> Distance along east=400.00504064747975
|
|
46
46
|
> Total distance=500.0040325271862
|
|
47
47
|
|
|
48
|
-
##
|
|
48
|
+
## Documentation
|
|
49
49
|
|
|
50
50
|
The following functions are available:
|
|
51
51
|
|
|
@@ -63,7 +63,7 @@ pointEastOf(origin: Point, dE: number): Point;
|
|
|
63
63
|
pointAbove(origin: Point, dH: number): Point;
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
[Full Typedoc documentation](https://github.com/UEk/wgs84/blob/main/doc/
|
|
66
|
+
[Full Typedoc documentation](https://github.com/UEk/wgs84/blob/main/doc/globals.md)
|
|
67
67
|
|
|
68
68
|
# Build and Test
|
|
69
69
|
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.point = point;
|
|
4
|
+
exports.R1 = R1;
|
|
5
|
+
exports.R2 = R2;
|
|
6
|
+
exports.distanceNorth = distanceNorth;
|
|
7
|
+
exports.distanceEast = distanceEast;
|
|
8
|
+
exports.distanceUp = distanceUp;
|
|
9
|
+
exports.distance = distance;
|
|
10
|
+
exports.bearing = bearing;
|
|
11
|
+
exports.pointNorthOf = pointNorthOf;
|
|
12
|
+
exports.pointEastOf = pointEastOf;
|
|
13
|
+
exports.pointAbove = pointAbove;
|
|
4
14
|
function point(lat, lon, height) {
|
|
5
15
|
const result = height
|
|
6
16
|
? { coordinates: [lon, lat, height], type: 'Point' }
|
|
@@ -8,7 +18,6 @@ function point(lat, lon, height) {
|
|
|
8
18
|
validCoord(result);
|
|
9
19
|
return result;
|
|
10
20
|
}
|
|
11
|
-
exports.point = point;
|
|
12
21
|
const R = 6378.137 * 1000;
|
|
13
22
|
const f = 1 / 298.257_223_563;
|
|
14
23
|
const eSquared = f * (2 - f);
|
|
@@ -17,13 +26,11 @@ function R1(position) {
|
|
|
17
26
|
const lat = degToRad(position.coordinates[1]);
|
|
18
27
|
return (R * (1 - eSquared)) / Math.pow(1 - eSquared * Math.pow(Math.sin(lat), 2), 3 / 2);
|
|
19
28
|
}
|
|
20
|
-
exports.R1 = R1;
|
|
21
29
|
function R2(position) {
|
|
22
30
|
validCoord(position);
|
|
23
31
|
const lat = degToRad(position.coordinates[1]);
|
|
24
32
|
return R / Math.sqrt(1 - eSquared * Math.pow(Math.sin(lat), 2));
|
|
25
33
|
}
|
|
26
|
-
exports.R2 = R2;
|
|
27
34
|
function distanceNorth(origin, target) {
|
|
28
35
|
validCoord(origin);
|
|
29
36
|
validCoord(target);
|
|
@@ -31,7 +38,6 @@ function distanceNorth(origin, target) {
|
|
|
31
38
|
const targetLat = degToRad(target.coordinates[1]);
|
|
32
39
|
return R1(origin) * (targetLat - originLat);
|
|
33
40
|
}
|
|
34
|
-
exports.distanceNorth = distanceNorth;
|
|
35
41
|
function distanceEast(origin, target) {
|
|
36
42
|
validCoord(origin);
|
|
37
43
|
validCoord(target);
|
|
@@ -47,7 +53,6 @@ function distanceEast(origin, target) {
|
|
|
47
53
|
}
|
|
48
54
|
return R2(origin) * Math.cos(originLat) * deltaAngle;
|
|
49
55
|
}
|
|
50
|
-
exports.distanceEast = distanceEast;
|
|
51
56
|
function distanceUp(origin, target) {
|
|
52
57
|
if (origin.coordinates.length === 3 && target.coordinates.length === 3) {
|
|
53
58
|
return target.coordinates[2] - origin.coordinates[2];
|
|
@@ -56,7 +61,6 @@ function distanceUp(origin, target) {
|
|
|
56
61
|
throw new Error('Input is not GeoJSON Point with height.');
|
|
57
62
|
}
|
|
58
63
|
}
|
|
59
|
-
exports.distanceUp = distanceUp;
|
|
60
64
|
function distance(origin, target) {
|
|
61
65
|
if (origin.coordinates.length === 2 || target.coordinates.length === 2) {
|
|
62
66
|
return Math.hypot(distanceNorth(origin, target), distanceEast(origin, target));
|
|
@@ -68,14 +72,12 @@ function distance(origin, target) {
|
|
|
68
72
|
throw new Error('Inputs are not GeoJSON Points.');
|
|
69
73
|
}
|
|
70
74
|
}
|
|
71
|
-
exports.distance = distance;
|
|
72
75
|
function bearing(origin, target) {
|
|
73
76
|
validCoord(origin);
|
|
74
77
|
validCoord(target);
|
|
75
78
|
return ((radToDeg(Math.atan2(distanceEast(origin, target), distanceNorth(origin, target))) + 360) %
|
|
76
79
|
360);
|
|
77
80
|
}
|
|
78
|
-
exports.bearing = bearing;
|
|
79
81
|
function pointNorthOf(origin, dN) {
|
|
80
82
|
validCoord(origin);
|
|
81
83
|
const lon = origin.coordinates[0];
|
|
@@ -91,7 +93,6 @@ function pointNorthOf(origin, dN) {
|
|
|
91
93
|
validCoord(result);
|
|
92
94
|
return result;
|
|
93
95
|
}
|
|
94
|
-
exports.pointNorthOf = pointNorthOf;
|
|
95
96
|
function pointEastOf(origin, dE) {
|
|
96
97
|
validCoord(origin);
|
|
97
98
|
const lat = origin.coordinates[1];
|
|
@@ -110,7 +111,6 @@ function pointEastOf(origin, dE) {
|
|
|
110
111
|
return { coordinates: [lon, lat], type: 'Point' };
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
|
-
exports.pointEastOf = pointEastOf;
|
|
114
114
|
function pointAbove(origin, dH) {
|
|
115
115
|
validCoord(origin);
|
|
116
116
|
return {
|
|
@@ -118,7 +118,6 @@ function pointAbove(origin, dH) {
|
|
|
118
118
|
type: 'Point'
|
|
119
119
|
};
|
|
120
120
|
}
|
|
121
|
-
exports.pointAbove = pointAbove;
|
|
122
121
|
function degToRad(deg) {
|
|
123
122
|
return (deg * Math.PI) / 180;
|
|
124
123
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAiBA,sBAMC;AAeD,gBAIC;AAQD,gBAIC;AASD,sCAMC;AASD,oCAaC;AAQD,gCAMC;AAUD,4BAYC;AAUD,0BAQC;AASD,oCAaC;AASD,kCAiBC;AASD,gCAMC;AA/LD,SAAgB,KAAK,CAAC,GAAW,EAAE,GAAW,EAAE,MAAe;IAC3D,MAAM,MAAM,GAAU,MAAM;QACxB,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE;QACpD,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;IACjD,UAAU,CAAC,MAAM,CAAC,CAAC;IACnB,OAAO,MAAM,CAAC;AAClB,CAAC;AAGD,MAAM,CAAC,GAAW,QAAQ,GAAG,IAAI,CAAC;AAElC,MAAM,CAAC,GAAW,CAAC,GAAG,eAAe,CAAC;AAEtC,MAAM,QAAQ,GAAW,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAQrC,SAAgB,EAAE,CAAC,QAAe;IAC9B,UAAU,CAAC,QAAQ,CAAC,CAAC;IACrB,MAA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C,CAAC;IACnB,OAAO;QACH,WAAW,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;QACvF,IAAI,EAAE,OAAO;KAChB,CAAC;AACN,CAAC;AAED,SAAS,QAAQ,CAAC,GAAW;IACzB,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC;AACjC,CAAC;AAED,SAAS,QAAQ,CAAC,GAAW;IACzB,OAAO,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AACjC,CAAC;AAED,SAAS,UAAU,CAAC,CAAQ;IACxB,IACI,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,CAAC;QAC1D,CAAC,EAAE,IAAI,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;QACvB,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,EAAE;QACrB,CAAC,GAAG,IAAI,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;QACxB,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,GAAG,EACzB,CAAC;QACC,OAAO,IAAI,CAAC;IAChB,CAAC;SAAM,CAAC;QACJ,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAC/D,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@ulrik.ek/wgs84",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Basic library for computing small distances between WGS84 coordinates using a flat earth approximation.",
|
|
5
|
-
"author": "Ulrik E.",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"main": "dist/index.js",
|
|
8
|
-
"directories": {
|
|
9
|
-
"doc": "doc",
|
|
10
|
-
"test": "test"
|
|
11
|
-
},
|
|
12
|
-
"type": "commonjs",
|
|
13
|
-
"scripts": {
|
|
14
|
-
"audit": "npm audit --registry=https://registry.npmjs.org",
|
|
15
|
-
"lint": "npx eslint .",
|
|
16
|
-
"lint_fix": "npx eslint . --fix",
|
|
17
|
-
"style": "npx prettier --check \"./**/*.ts\" --check \"./**/*.json\" --check \"./**/*.md\"",
|
|
18
|
-
"style_fix": "npx prettier --write \"./**/*.ts\" --write \"./**/*.json\" --write \"./**/*.md\"",
|
|
19
|
-
"verify_and_install": "npm cache verify && npm install",
|
|
20
|
-
"clean": "npx shx rm -rf ./coverage/ ./report/ ./dist/",
|
|
21
|
-
"build": "tsc --build tsconfig.json",
|
|
22
|
-
"test": "npm run clean && npx jest --clearCache && jest --verbose --coverage --color --modulePathIgnorePatterns=./dist/ && npm run build",
|
|
23
|
-
"run_example": "npx ts-node example/index.ts",
|
|
24
|
-
"type_doc": "npx typedoc --plugin typedoc-plugin-markdown --out doc src/index.ts --excludeNotDocumented"
|
|
25
|
-
},
|
|
26
|
-
"devDependencies": {
|
|
27
|
-
"@types/geojson": "^7946.0.
|
|
28
|
-
"@types/jest": "^29.5.12",
|
|
29
|
-
"@types/node": "^
|
|
30
|
-
"@typescript-eslint/eslint-plugin": "^7.5.0",
|
|
31
|
-
"@typescript-eslint/parser": "^7.5.0",
|
|
32
|
-
"eslint": "^8.57.0",
|
|
33
|
-
"eslint-plugin-import": "^2.29.1",
|
|
34
|
-
"eslint-plugin-jest": "^27.9.0",
|
|
35
|
-
"eslint-plugin-json": "^3.1.0",
|
|
36
|
-
"eslint-plugin-simple-import-sort": "^12.0.0",
|
|
37
|
-
"eslint-plugin-sort-class-members": "^1.20.0",
|
|
38
|
-
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
39
|
-
"eslint-plugin-unicorn": "^52.0.0",
|
|
40
|
-
"eslint-plugin-yaml": "^0.5.0",
|
|
41
|
-
"jest": "^29.7.0",
|
|
42
|
-
"jest-junit": "^16.0.0",
|
|
43
|
-
"prettier": "
|
|
44
|
-
"shx": "^0.3.4",
|
|
45
|
-
"ts-jest": "^29.1.2",
|
|
46
|
-
"ts-node": "^10.9.2",
|
|
47
|
-
"typedoc": "^0.
|
|
48
|
-
"typedoc-plugin-markdown": "^
|
|
49
|
-
"typescript": "^5.
|
|
50
|
-
},
|
|
51
|
-
"types": "./dist/index.d.ts",
|
|
52
|
-
"repository": {
|
|
53
|
-
"type": "git",
|
|
54
|
-
"url": "git+https://github.com/UEk/wgs84.git"
|
|
55
|
-
},
|
|
56
|
-
"bugs": {
|
|
57
|
-
"url": "https://github.com/UEk/wgs84/issues"
|
|
58
|
-
},
|
|
59
|
-
"homepage": "https://github.com/UEk/wgs84#readme",
|
|
60
|
-
"keywords": ["wgs84", "geojson", "latitude", "longitude"]
|
|
61
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@ulrik.ek/wgs84",
|
|
3
|
+
"version": "1.0.4",
|
|
4
|
+
"description": "Basic library for computing small distances between WGS84 coordinates using a flat earth approximation.",
|
|
5
|
+
"author": "Ulrik E.",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"directories": {
|
|
9
|
+
"doc": "doc",
|
|
10
|
+
"test": "test"
|
|
11
|
+
},
|
|
12
|
+
"type": "commonjs",
|
|
13
|
+
"scripts": {
|
|
14
|
+
"audit": "npm audit --registry=https://registry.npmjs.org",
|
|
15
|
+
"lint": "npx eslint .",
|
|
16
|
+
"lint_fix": "npx eslint . --fix",
|
|
17
|
+
"style": "npx prettier --check \"./**/*.ts\" --check \"./**/*.json\" --check \"./**/*.md\"",
|
|
18
|
+
"style_fix": "npx prettier --write \"./**/*.ts\" --write \"./**/*.json\" --write \"./**/*.md\"",
|
|
19
|
+
"verify_and_install": "npm cache verify && npm install",
|
|
20
|
+
"clean": "npx shx rm -rf ./coverage/ ./report/ ./dist/",
|
|
21
|
+
"build": "tsc --build tsconfig.json",
|
|
22
|
+
"test": "npm run clean && npx jest --clearCache && jest --verbose --coverage --color --modulePathIgnorePatterns=./dist/ && npm run build",
|
|
23
|
+
"run_example": "npx ts-node example/index.ts",
|
|
24
|
+
"type_doc": "npx typedoc --plugin typedoc-plugin-markdown --out doc src/index.ts --excludeNotDocumented"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/geojson": "^7946.0.14",
|
|
28
|
+
"@types/jest": "^29.5.12",
|
|
29
|
+
"@types/node": "^22.1.0",
|
|
30
|
+
"@typescript-eslint/eslint-plugin": "^7.5.0",
|
|
31
|
+
"@typescript-eslint/parser": "^7.5.0",
|
|
32
|
+
"eslint": "^8.57.0",
|
|
33
|
+
"eslint-plugin-import": "^2.29.1",
|
|
34
|
+
"eslint-plugin-jest": "^27.9.0",
|
|
35
|
+
"eslint-plugin-json": "^3.1.0",
|
|
36
|
+
"eslint-plugin-simple-import-sort": "^12.0.0",
|
|
37
|
+
"eslint-plugin-sort-class-members": "^1.20.0",
|
|
38
|
+
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
39
|
+
"eslint-plugin-unicorn": "^52.0.0",
|
|
40
|
+
"eslint-plugin-yaml": "^0.5.0",
|
|
41
|
+
"jest": "^29.7.0",
|
|
42
|
+
"jest-junit": "^16.0.0",
|
|
43
|
+
"prettier": "3.3.0",
|
|
44
|
+
"shx": "^0.3.4",
|
|
45
|
+
"ts-jest": "^29.1.2",
|
|
46
|
+
"ts-node": "^10.9.2",
|
|
47
|
+
"typedoc": "^0.26.5",
|
|
48
|
+
"typedoc-plugin-markdown": "^4.2.3",
|
|
49
|
+
"typescript": "^5.5.4"
|
|
50
|
+
},
|
|
51
|
+
"types": "./dist/index.d.ts",
|
|
52
|
+
"repository": {
|
|
53
|
+
"type": "git",
|
|
54
|
+
"url": "git+https://github.com/UEk/wgs84.git"
|
|
55
|
+
},
|
|
56
|
+
"bugs": {
|
|
57
|
+
"url": "https://github.com/UEk/wgs84/issues"
|
|
58
|
+
},
|
|
59
|
+
"homepage": "https://github.com/UEk/wgs84#readme",
|
|
60
|
+
"keywords": ["wgs84", "geojson", "latitude", "longitude"]
|
|
61
|
+
}
|