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

visgl / loaders.gl / 24139120841

08 Apr 2026 01:53PM UTC coverage: 65.319% (+30.2%) from 35.137%
24139120841

push

github

web-flow
chore: Replace puppeteer with playwright (#3350)

14216 of 18890 branches covered (75.26%)

Branch coverage included in aggregate %.

3 of 3 new or added lines in 1 file covered. (100.0%)

3248 existing lines in 369 files now uncovered.

73509 of 115413 relevant lines covered (63.69%)

5763.45 hits per line

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

94.64
/modules/shapefile/src/shapefile-loader.ts
1
// loaders.gl
1✔
2
// SPDX-License-Identifier: MIT
1✔
3
// Copyright (c) vis.gl contributors
1✔
4

1✔
5
import type {StrictLoaderOptions, LoaderWithParser} from '@loaders.gl/loader-utils';
1✔
6
import type {Batch, GeoJSONTable} from '@loaders.gl/schema';
1✔
7
import {SHP_MAGIC_NUMBER, SHPLoaderOptions} from './shp-loader';
1✔
8
import {parseShapefile, parseShapefileInBatches} from './lib/parsers/parse-shapefile';
1✔
9
import {DBFLoaderOptions} from './dbf-loader';
1✔
10

1✔
UNCOV
11
// __VERSION__ is injected by babel-plugin-version-inline
×
12
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
1✔
13
const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';
1!
14

1✔
15
export type ShapefileLoaderOptions = StrictLoaderOptions &
1✔
16
  SHPLoaderOptions &
1✔
17
  DBFLoaderOptions & {
1✔
18
    shapefile?: {
1✔
19
      shape?: 'geojson-table' | 'v3';
1✔
20
      /** @deprecated Worker URLs must be specified with .dbf.workerUrl * .shp.workerUrl */
1✔
21
      workerUrl?: never;
1✔
22
    };
1✔
23
    gis?: {
1✔
24
      reproject?: boolean;
1✔
25
      _targetCrs?: string;
1✔
26
    };
1✔
27
  };
1✔
28

1✔
29
/**
1✔
30
 * Shapefile loader
1✔
31
 * @note Shapefile is multifile format and requires providing additional files
1✔
32
 */
1✔
33
export const ShapefileLoader = {
1✔
34
  name: 'Shapefile',
1✔
35
  id: 'shapefile',
1✔
36
  module: 'shapefile',
1✔
37
  version: VERSION,
1✔
38
  category: 'geometry',
1✔
39
  extensions: ['shp'],
1✔
40
  mimeTypes: ['application/octet-stream'],
1✔
41
  tests: [new Uint8Array(SHP_MAGIC_NUMBER).buffer],
1✔
42
  options: {
1✔
43
    shapefile: {
1✔
44
      shape: 'v3'
1✔
45
    },
1✔
46
    shp: {
1✔
47
      _maxDimensions: 4
1✔
48
    }
1✔
49
  },
1✔
50
  // @ts-expect-error
1✔
51
  parse: parseShapefile,
1✔
52
  // @ts-expect-error
1✔
53
  parseInBatches: parseShapefileInBatches
1✔
54
} as const satisfies LoaderWithParser<GeoJSONTable, Batch, ShapefileLoaderOptions>;
1✔
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

© 2026 Coveralls, Inc