Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] support GeoArrow format #2385

Merged
merged 43 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
57ecca0
[Feat] Support WKB geometry column in CSV
lixun910 Sep 15, 2023
910692b
support wkb in csv
lixun910 Sep 6, 2023
68caef7
update package.json
lixun910 Sep 7, 2023
c8f8478
clean up
lixun910 Sep 7, 2023
e173eaf
init impl
lixun910 Sep 12, 2023
c3edd32
wip
lixun910 Sep 13, 2023
aae3990
wip
lixun910 Sep 15, 2023
186113a
add test cases
lixun910 Sep 16, 2023
a412478
wip
lixun910 Sep 18, 2023
676da91
add arrow wkb/wkt
lixun910 Sep 18, 2023
47d5a60
clean up
lixun910 Sep 18, 2023
b85511d
reorg test files
lixun910 Sep 18, 2023
6e4007e
clean up
lixun910 Sep 18, 2023
8796c14
wip
lixun910 Sep 18, 2023
7948e16
try binary format in GeoJsonLayer
lixun910 Oct 16, 2023
7b99a39
wip
lixun910 Oct 17, 2023
8c6c673
add hover on arrowlayer
lixun910 Oct 18, 2023
becfff8
fix table for geoarrow
lixun910 Oct 18, 2023
8e4c1ae
support filtering
lixun910 Oct 19, 2023
fe5a2f7
fix polygon with hole
lixun910 Oct 19, 2023
5ffce6e
support point arrow
lixun910 Oct 19, 2023
c68c2c1
support linestring
lixun910 Oct 19, 2023
0430f2d
add gpu filter
lixun910 Oct 19, 2023
aa1029e
clean up
lixun910 Oct 19, 2023
15faaa8
clean after rebase
lixun910 Oct 19, 2023
4ec9b70
wip
lixun910 Oct 19, 2023
b185d8f
wip
lixun910 Oct 19, 2023
a938152
wip
lixun910 Oct 19, 2023
63aa253
wip
lixun910 Oct 20, 2023
52a4f09
bump to loaders.gl 4.0.1
lixun910 Nov 1, 2023
6150d79
support Arrow using loaders.gl
lixun910 Nov 1, 2023
f0c572a
comments
lixun910 Nov 1, 2023
a4ae70a
clean up
lixun910 Nov 1, 2023
27d0043
address comments
lixun910 Nov 2, 2023
b76ae9b
modify file names
lixun910 Nov 2, 2023
2631251
clean
lixun910 Nov 2, 2023
f924e80
improv perf
lixun910 Nov 2, 2023
282b822
consolidate GeoJsonLayer and GeoArrowLayer
lixun910 Nov 8, 2023
836ebe5
wip
lixun910 Nov 8, 2023
2d2fdd4
update to loaders.gl 4.0.2
lixun910 Nov 8, 2023
000d758
fix lint;fix test cases
lixun910 Nov 9, 2023
3de6a88
comments
lixun910 Nov 9, 2023
54c5db6
bump loaders.gl to 4.0.3
lixun910 Nov 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
"@kepler.gl/actions": "3.0.0-alpha.1",
"@kepler.gl/cloud-providers": "3.0.0-alpha.1",
"@kepler.gl/constants": "3.0.0-alpha.1",
"@kepler.gl/effects": "3.0.0-alpha.1",
"@kepler.gl/layers": "3.0.0-alpha.1",
"@kepler.gl/effects": "3.0.0-alpha.1",
"@kepler.gl/localization": "3.0.0-alpha.1",
"@kepler.gl/processors": "3.0.0-alpha.1",
"@kepler.gl/reducers": "3.0.0-alpha.1",
Expand Down
4 changes: 2 additions & 2 deletions src/effects/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
"umd"
],
"dependencies": {
"suncalc": "^1.9.0",
lixun910 marked this conversation as resolved.
Show resolved Hide resolved
"@deck.gl/core": "^8.9.12",
"@luma.gl/core": "^8.5.19",
"@luma.gl/shadertools": "^8.5.19",
"@kepler.gl/utils": "3.0.0-alpha.1",
"@kepler.gl/constants": "3.0.0-alpha.1",
"@kepler.gl/types": "3.0.0-alpha.1",
"suncalc": "^1.9.0"
"@kepler.gl/types": "3.0.0-alpha.1"
},
"nyc": {
"sourceMap": false,
Expand Down
2 changes: 1 addition & 1 deletion src/layers/src/geojson-layer/geojson-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import normalize from '@mapbox/geojson-normalize';
import bbox from '@turf/bbox';
import {parseSync} from '@loaders.gl/core';
import {WKBLoader, WKTLoader} from '@loaders.gl/wkt';
import { binaryToGeometry } from '@loaders.gl/gis';
import {binaryToGeometry} from '@loaders.gl/gis';

import {Feature, BBox} from 'geojson';
import {getSampleData} from '@kepler.gl/utils';
Expand Down
14 changes: 9 additions & 5 deletions src/processors/src/file-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ import {parseInBatches} from '@loaders.gl/core';
import {JSONLoader, _JSONPath} from '@loaders.gl/json';
import {CSVLoader} from '@loaders.gl/csv';
import {ArrowLoader} from '@loaders.gl/arrow';
import {processArrowTable, processGeojson, processKeplerglJSON, processRowObject} from './data-processor';
import {
processArrowTable,
processGeojson,
processKeplerglJSON,
processRowObject
} from './data-processor';
import {generateHashId, isPlainObject} from '@kepler.gl/utils';
import {DATASET_FORMATS} from '@kepler.gl/constants';
import {Loader} from '@loaders.gl/loader-utils';
Expand Down Expand Up @@ -158,7 +163,7 @@ export async function* readBatch(
// Only json parse will have `FINAL_RESULT`
if (batch.batchType === BATCH_TYPE.FINAL_RESULT) {
if (batch.container) {
result = { ...batch.container };
result = {...batch.container};
}
// Set the streamed data correctly is Batch json path is set
// and the path streamed is not the top level object (jsonpath = '$')
Expand All @@ -179,7 +184,7 @@ export async function* readBatch(

yield {
...batch,
...(batch.schema ? { headers: Object.keys(batch.schema) } : {}),
...(batch.schema ? {headers: Object.keys(batch.schema)} : {}),
fileName,
// if dataset is CSV, data is set to the raw batches
data: result ? result : batches
Expand Down Expand Up @@ -227,8 +232,7 @@ export function processFileData({
if (isArrowData(data)) {
format = DATASET_FORMATS.arrow;
processor = processArrowTable;
}
else if (isKeplerGlMap(data)) {
} else if (isKeplerGlMap(data)) {
format = DATASET_FORMATS.keplergl;
processor = processKeplerglJSON;
} else if (isRowObject(data)) {
Expand Down
4 changes: 2 additions & 2 deletions src/reducers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@
"@kepler.gl/cloud-providers": "3.0.0-alpha.1",
"@kepler.gl/constants": "3.0.0-alpha.1",
"@kepler.gl/deckgl-layers": "3.0.0-alpha.1",
"@kepler.gl/effects": "3.0.0-alpha.1",
"@kepler.gl/layers": "3.0.0-alpha.1",
"@kepler.gl/effects": "3.0.0-alpha.1",
"@kepler.gl/localization": "3.0.0-alpha.1",
"@kepler.gl/processors": "3.0.0-alpha.1",
"@kepler.gl/schemas": "3.0.0-alpha.1",
"@kepler.gl/table": "3.0.0-alpha.1",
"@kepler.gl/tasks": "3.0.0-alpha.1",
"@kepler.gl/types": "3.0.0-alpha.1",
"@kepler.gl/utils": "3.0.0-alpha.1",
"@loaders.gl/loader-utils": "^3.4.14",
"@loaders.gl/loader-utils": "^4.0.1",
"@types/lodash.clonedeep": "^4.5.7",
"@types/lodash.flattendeep": "^4.4.7",
"@types/lodash.get": "^4.4.6",
Expand Down
2 changes: 1 addition & 1 deletion src/table/src/kepler-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class KeplerTable {
const inputDataFormat = data.cols ? DataForm.COLS_ARRAY : DataForm.ROWS_ARRAY;

const dataContainer = createDataContainer(dataContainerData, {
// @ts-expect-error
// @ts-expect-error ProtoDataset field missing property fieldIdx, valueAccessor
fields: data.fields,
inputDataFormat
});
Expand Down
213 changes: 0 additions & 213 deletions test/fixtures/test-arrow-data.js

This file was deleted.