@loaders.gl/parquet 4.4.1 → 4.4.2
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/dist/index.cjs +7 -5
- package/dist/index.cjs.map +2 -2
- package/dist/lib/constants.js +1 -1
- package/dist/lib/parsers/parse-geoparquet-to-geojson.d.ts.map +1 -1
- package/dist/lib/parsers/parse-geoparquet-to-geojson.js +4 -3
- package/dist/lib/parsers/parse-geoparquet-to-geojson.js.map +1 -1
- package/dist/parquet-json-loader.js +1 -1
- package/dist/parquet-json-writer.js +1 -1
- package/package.json +10 -10
- package/src/lib/parsers/parse-geoparquet-to-geojson.ts +4 -4
package/dist/lib/constants.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
5
5
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
6
|
-
export const VERSION = typeof "4.4.
|
|
6
|
+
export const VERSION = typeof "4.4.2" !== 'undefined' ? "4.4.2" : 'latest';
|
|
7
7
|
export const PARQUET_WASM_URL = 'https://unpkg.com/parquet-wasm@0.6.1/esm/parquet_wasm_bg.wasm';
|
|
8
8
|
/**
|
|
9
9
|
* Parquet File Magic String
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-geoparquet-to-geojson.d.ts","sourceRoot":"","sources":["../../../src/lib/parsers/parse-geoparquet-to-geojson.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AAC3D,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACpB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,KAAK,EAAC,wBAAwB,EAAC,qCAAkC;AAIxE,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,YAAY,EAClB,OAAO,CAAC,EAAE,wBAAwB,GACjC,OAAO,CAAC,cAAc,GAAG,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"parse-geoparquet-to-geojson.d.ts","sourceRoot":"","sources":["../../../src/lib/parsers/parse-geoparquet-to-geojson.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AAC3D,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACpB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,KAAK,EAAC,wBAAwB,EAAC,qCAAkC;AAIxE,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,YAAY,EAClB,OAAO,CAAC,EAAE,wBAAwB,GACjC,OAAO,CAAC,cAAc,GAAG,YAAY,CAAC,CAGxC;AAED,wBAAuB,4BAA4B,CACjD,IAAI,EAAE,YAAY,EAClB,OAAO,CAAC,EAAE,wBAAwB,GACjC,aAAa,CAAC,mBAAmB,GAAG,iBAAiB,CAAC,CAOxD"}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
// loaders.gl
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
|
+
import { convertWKBTableToGeoJSON } from '@loaders.gl/gis';
|
|
4
5
|
import { parseParquetFile, parseParquetFileInBatches } from "./parse-parquet-to-json.js";
|
|
5
6
|
export async function parseGeoParquetFile(file, options) {
|
|
6
7
|
const table = await parseParquetFile(file, { ...options, shape: 'object-row-table' });
|
|
7
|
-
|
|
8
|
-
return table;
|
|
8
|
+
return convertWKBTableToGeoJSON(table, table.schema);
|
|
9
9
|
}
|
|
10
10
|
export async function* parseGeoParquetFileInBatches(file, options) {
|
|
11
11
|
const tableBatches = parseParquetFileInBatches(file, { ...options, shape: 'object-row-table' });
|
|
12
12
|
for await (const batch of tableBatches) {
|
|
13
|
-
|
|
13
|
+
const geojson = convertWKBTableToGeoJSON(batch, batch.schema);
|
|
14
|
+
yield { ...batch, ...geojson };
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
17
|
//# sourceMappingURL=parse-geoparquet-to-geojson.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-geoparquet-to-geojson.js","sourceRoot":"","sources":["../../../src/lib/parsers/parse-geoparquet-to-geojson.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;
|
|
1
|
+
{"version":3,"file":"parse-geoparquet-to-geojson.js","sourceRoot":"","sources":["../../../src/lib/parsers/parse-geoparquet-to-geojson.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AASpC,OAAO,EAAC,wBAAwB,EAAC,MAAM,iBAAiB,CAAC;AAIzD,OAAO,EAAC,gBAAgB,EAAE,yBAAyB,EAAC,mCAAgC;AAEpF,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,IAAkB,EAClB,OAAkC;IAElC,MAAM,KAAK,GAAG,MAAM,gBAAgB,CAAC,IAAI,EAAE,EAAC,GAAG,OAAO,EAAE,KAAK,EAAE,kBAAkB,EAAC,CAAC,CAAC;IACpF,OAAO,wBAAwB,CAAC,KAAK,EAAE,KAAK,CAAC,MAAO,CAAC,CAAC;AACxD,CAAC;AAED,MAAM,CAAC,KAAK,SAAS,CAAC,CAAC,4BAA4B,CACjD,IAAkB,EAClB,OAAkC;IAElC,MAAM,YAAY,GAAG,yBAAyB,CAAC,IAAI,EAAE,EAAC,GAAG,OAAO,EAAE,KAAK,EAAE,kBAAkB,EAAC,CAAC,CAAC;IAE9F,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,YAAY,EAAE,CAAC;QACvC,MAAM,OAAO,GAAG,wBAAwB,CAAC,KAAuB,EAAE,KAAK,CAAC,MAAO,CAAC,CAAC;QACjF,MAAM,EAAC,GAAG,KAAK,EAAE,GAAG,OAAO,EAAC,CAAC;IAC/B,CAAC;AACH,CAAC"}
|
|
@@ -16,7 +16,7 @@ import { Buffer } from "./polyfills/buffer/install-buffer-polyfill.js";
|
|
|
16
16
|
export { Buffer };
|
|
17
17
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
18
18
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
19
|
-
const VERSION = typeof "4.4.
|
|
19
|
+
const VERSION = typeof "4.4.2" !== 'undefined' ? "4.4.2" : 'latest';
|
|
20
20
|
/**
|
|
21
21
|
* ParquetJS table loader
|
|
22
22
|
*/
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { ParquetFormat } from "./parquet-format.js";
|
|
5
5
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
6
6
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
7
|
-
const VERSION = typeof "4.4.
|
|
7
|
+
const VERSION = typeof "4.4.2" !== 'undefined' ? "4.4.2" : 'latest';
|
|
8
8
|
export const ParquetJSONWriter = {
|
|
9
9
|
...ParquetFormat,
|
|
10
10
|
id: 'parquet',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/parquet",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.2",
|
|
4
4
|
"description": "Framework-independent loader for Apache Parquet files",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -63,14 +63,14 @@
|
|
|
63
63
|
"base64-js and ieee754 are used by buffer polyfill"
|
|
64
64
|
],
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@loaders.gl/arrow": "4.4.
|
|
67
|
-
"@loaders.gl/bson": "4.4.
|
|
68
|
-
"@loaders.gl/compression": "4.4.
|
|
69
|
-
"@loaders.gl/geoarrow": "4.4.
|
|
70
|
-
"@loaders.gl/gis": "4.4.
|
|
71
|
-
"@loaders.gl/loader-utils": "4.4.
|
|
72
|
-
"@loaders.gl/schema": "4.4.
|
|
73
|
-
"@loaders.gl/wkt": "4.4.
|
|
66
|
+
"@loaders.gl/arrow": "4.4.2",
|
|
67
|
+
"@loaders.gl/bson": "4.4.2",
|
|
68
|
+
"@loaders.gl/compression": "4.4.2",
|
|
69
|
+
"@loaders.gl/geoarrow": "4.4.2",
|
|
70
|
+
"@loaders.gl/gis": "4.4.2",
|
|
71
|
+
"@loaders.gl/loader-utils": "4.4.2",
|
|
72
|
+
"@loaders.gl/schema": "4.4.2",
|
|
73
|
+
"@loaders.gl/wkt": "4.4.2",
|
|
74
74
|
"@probe.gl/log": "^4.1.1",
|
|
75
75
|
"async-mutex": "^0.2.2",
|
|
76
76
|
"base64-js": "^1.3.1",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"@loaders.gl/core": "~4.4.0",
|
|
98
98
|
"apache-arrow": ">= 17.0.0"
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "1c9649781db0403dbf7c3f1224bbeec77bd812eb"
|
|
101
101
|
}
|
|
@@ -9,7 +9,7 @@ import type {
|
|
|
9
9
|
ObjectRowTable,
|
|
10
10
|
ObjectRowTableBatch
|
|
11
11
|
} from '@loaders.gl/schema';
|
|
12
|
-
|
|
12
|
+
import {convertWKBTableToGeoJSON} from '@loaders.gl/gis';
|
|
13
13
|
|
|
14
14
|
import type {ParquetJSONLoaderOptions} from '../../parquet-json-loader';
|
|
15
15
|
|
|
@@ -20,8 +20,7 @@ export async function parseGeoParquetFile(
|
|
|
20
20
|
options?: ParquetJSONLoaderOptions
|
|
21
21
|
): Promise<ObjectRowTable | GeoJSONTable> {
|
|
22
22
|
const table = await parseParquetFile(file, {...options, shape: 'object-row-table'});
|
|
23
|
-
|
|
24
|
-
return table;
|
|
23
|
+
return convertWKBTableToGeoJSON(table, table.schema!);
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
export async function* parseGeoParquetFileInBatches(
|
|
@@ -31,6 +30,7 @@ export async function* parseGeoParquetFileInBatches(
|
|
|
31
30
|
const tableBatches = parseParquetFileInBatches(file, {...options, shape: 'object-row-table'});
|
|
32
31
|
|
|
33
32
|
for await (const batch of tableBatches) {
|
|
34
|
-
|
|
33
|
+
const geojson = convertWKBTableToGeoJSON(batch as ObjectRowTable, batch.schema!);
|
|
34
|
+
yield {...batch, ...geojson};
|
|
35
35
|
}
|
|
36
36
|
}
|