• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

visgl / deck.gl / 10502912171

22 Aug 2024 06:20AM UTC coverage: 61.189% (-28.0%) from 89.221%
10502912171

Pull #9096

github

web-flow
Merge 2623861fe into bf7b00267
Pull Request #9096: GPU Aggregation (5/8): GridLayer

1903 of 2546 branches covered (74.74%)

Branch coverage included in aggregate %.

775 of 823 new or added lines in 10 files covered. (94.17%)

17884 existing lines in 262 files now uncovered.

37927 of 62547 relevant lines covered (60.64%)

158.97 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

58.33
/modules/carto/src/layers/schema/spatialjson-utils.ts
1
import {bigIntToHex} from 'quadbin';
1✔
2

1✔
3
export type IndexScheme = 'h3' | 'quadbin';
1✔
4
type TypedArray = Float32Array | Float64Array;
1✔
5

1✔
6
export type Indices = {value: BigUint64Array};
1✔
7
export type NumericProps = Record<string, {value: number[] | TypedArray}>;
1✔
8
export type Properties = Record<string, string | number | boolean | null>;
1✔
9
export type Cells = {
1✔
10
  indices: Indices;
1✔
11
  numericProps: NumericProps;
1✔
12
  properties: Properties[];
1✔
13
};
1✔
14
export type SpatialBinary = {scheme?: IndexScheme; cells: Cells};
1✔
15
export type SpatialJson = {
1✔
16
  id: string | bigint;
1✔
17
  properties: Properties;
1✔
18
}[];
1✔
19

1✔
20
export function binaryToSpatialjson(binary: SpatialBinary): SpatialJson {
1✔
UNCOV
21
  const {cells, scheme} = binary;
×
UNCOV
22
  const count = cells.indices.value.length;
×
UNCOV
23
  const spatial: any[] = [];
×
UNCOV
24
  for (let i = 0; i < count; i++) {
×
UNCOV
25
    const id = scheme === 'h3' ? bigIntToHex(cells.indices.value[i]) : cells.indices.value[i];
×
UNCOV
26

×
UNCOV
27
    const properties = {...cells.properties[i]};
×
UNCOV
28
    for (const key of Object.keys(cells.numericProps)) {
×
UNCOV
29
      properties[key] = cells.numericProps[key].value[i];
×
UNCOV
30
    }
×
UNCOV
31
    spatial.push({id, properties});
×
UNCOV
32
  }
×
UNCOV
33

×
UNCOV
34
  return spatial;
×
UNCOV
35
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc