dump-tile 1.0.0 → 1.0.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 +7 -7
- package/index.js +6 -4
- package/package.json +4 -7
- package/History.md +0 -5
package/Readme.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[![NPM version][npm-image]][npm-url]
|
|
2
|
-
[![Build Status][
|
|
3
|
-
[![Dependency Status][
|
|
2
|
+
[![Build Status][build-image]][build-url]
|
|
3
|
+
[![Dependency Status][deps-image]][deps-url]
|
|
4
4
|
|
|
5
5
|
# dump-tile
|
|
6
6
|
|
|
@@ -26,11 +26,11 @@ cat tile.pbf | dump-tile > tile.json
|
|
|
26
26
|
|
|
27
27
|
MIT © [Damian Krzeminski](https://furkot.com)
|
|
28
28
|
|
|
29
|
-
[npm-image]: https://img.shields.io/npm/v/dump-tile
|
|
29
|
+
[npm-image]: https://img.shields.io/npm/v/dump-tile
|
|
30
30
|
[npm-url]: https://npmjs.org/package/dump-tile
|
|
31
31
|
|
|
32
|
-
[
|
|
33
|
-
[
|
|
32
|
+
[build-url]: https://github.com/pirxpilot/dump-tile/actions/workflows/check.yaml
|
|
33
|
+
[build-image]: https://img.shields.io/github/actions/workflow/status/pirxpilot/dump-tile/check.yaml?branch=main
|
|
34
34
|
|
|
35
|
-
[
|
|
36
|
-
[
|
|
35
|
+
[deps-image]: https://img.shields.io/librariesio/release/npm/dump-tile
|
|
36
|
+
[deps-url]: https://libraries.io/npm/dump-tile
|
package/index.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const { buffer } = require('node:stream/consumers');
|
|
4
4
|
const Pbf = require('pbf');
|
|
5
5
|
const { VectorTile } = require('@mapbox/vector-tile');
|
|
6
6
|
|
|
7
|
+
module.exports = dump;
|
|
8
|
+
|
|
7
9
|
function dump(input, output) {
|
|
8
|
-
|
|
10
|
+
return buffer(input)
|
|
11
|
+
.then(buffer => dumpBuffer(buffer, output));
|
|
9
12
|
}
|
|
10
13
|
|
|
11
14
|
function dumpBuffer(buffer, output) {
|
|
@@ -38,7 +41,7 @@ function dumpFeature(vf) {
|
|
|
38
41
|
|
|
39
42
|
function dumpGeometry(vg) {
|
|
40
43
|
function convertRing(ring) {
|
|
41
|
-
return ring.reduce(function(r, { x, y }) {
|
|
44
|
+
return ring.reduce(function (r, { x, y }) {
|
|
42
45
|
r.push(x, y);
|
|
43
46
|
return r;
|
|
44
47
|
}, []);
|
|
@@ -49,4 +52,3 @@ function dumpGeometry(vg) {
|
|
|
49
52
|
if (!module.parent) {
|
|
50
53
|
dump(process.stdin, process.stdout);
|
|
51
54
|
}
|
|
52
|
-
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dump-tile",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Dumps MVT tiles encoded in .pbf to JSON",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Damian Krzeminski",
|
|
7
7
|
"email": "pirxpilot@furkot.com",
|
|
8
8
|
"url": "https://furkot.com"
|
|
9
9
|
},
|
|
10
|
-
"repository": "pirxpilot/dump-tile",
|
|
10
|
+
"repository": "github:pirxpilot/dump-tile",
|
|
11
11
|
"bin": "./index.js",
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"keywords": [
|
|
@@ -18,13 +18,10 @@
|
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@mapbox/vector-tile": "^1.3.1",
|
|
21
|
-
"concat-stream": "^1.6.1",
|
|
22
21
|
"pbf": "^3.1.0"
|
|
23
22
|
},
|
|
24
23
|
"devDependencies": {
|
|
25
|
-
"jshint": "
|
|
26
|
-
"mocha": "^5.0.4",
|
|
27
|
-
"should": "^13.2.1"
|
|
24
|
+
"@pirxpilot/jshint": "~3"
|
|
28
25
|
},
|
|
29
26
|
"scripts": {
|
|
30
27
|
"test": "make check"
|
|
@@ -32,4 +29,4 @@
|
|
|
32
29
|
"files": [
|
|
33
30
|
"index.js"
|
|
34
31
|
]
|
|
35
|
-
}
|
|
32
|
+
}
|