@loaders.gl/gis 3.1.0-alpha.4 → 3.1.0-alpha.5
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/bundle.d.ts +1 -0
- package/dist/es5/bundle.js +1 -1
- package/dist/es5/bundle.js.map +1 -1
- package/dist/es5/index.js +6 -6
- package/dist/es5/lib/binary-to-geojson.js +93 -139
- package/dist/es5/lib/binary-to-geojson.js.map +1 -1
- package/dist/es5/lib/geojson-to-binary.js +196 -366
- package/dist/es5/lib/geojson-to-binary.js.map +1 -1
- package/dist/es5/lib/transform.js +9 -24
- package/dist/es5/lib/transform.js.map +1 -1
- package/dist/esm/lib/binary-to-geojson.js +2 -2
- package/dist/esm/lib/binary-to-geojson.js.map +1 -1
- package/dist/esm/lib/geojson-to-binary.js +1 -1
- package/dist/esm/lib/geojson-to-binary.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/lib/binary-to-geojson.d.ts +20 -0
- package/dist/lib/geojson-to-binary.d.ts +38 -0
- package/dist/lib/transform.d.ts +18 -0
- package/package.json +8 -5
- package/src/lib/binary-to-geojson.ts +1 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/gis",
|
|
3
3
|
"description": "Helpers for GIS category data",
|
|
4
|
-
"version": "3.1.0-alpha.
|
|
4
|
+
"version": "3.1.0-alpha.5",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"geometry",
|
|
15
15
|
"GeoJSON"
|
|
16
16
|
],
|
|
17
|
-
"types": "
|
|
17
|
+
"types": "dist/index.d.ts",
|
|
18
18
|
"main": "dist/es5/index.js",
|
|
19
19
|
"module": "dist/esm/index.js",
|
|
20
20
|
"sideEffects": false,
|
|
@@ -23,14 +23,17 @@
|
|
|
23
23
|
"dist",
|
|
24
24
|
"README.md"
|
|
25
25
|
],
|
|
26
|
+
"scripts": {
|
|
27
|
+
"post-build": "tsc"
|
|
28
|
+
},
|
|
26
29
|
"dependencies": {
|
|
27
|
-
"@loaders.gl/loader-utils": "3.1.0-alpha.
|
|
28
|
-
"@loaders.gl/schema": "3.1.0-alpha.
|
|
30
|
+
"@loaders.gl/loader-utils": "3.1.0-alpha.5",
|
|
31
|
+
"@loaders.gl/schema": "3.1.0-alpha.5",
|
|
29
32
|
"@mapbox/vector-tile": "^1.3.1",
|
|
30
33
|
"pbf": "^3.2.1"
|
|
31
34
|
},
|
|
32
35
|
"devDependencies": {
|
|
33
36
|
"@math.gl/proj4": "^3.5.1"
|
|
34
37
|
},
|
|
35
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "352241dd910a8c6307a235dadbe154ca915b885b"
|
|
36
39
|
}
|
|
@@ -112,7 +112,7 @@ export function binaryToGeometry(
|
|
|
112
112
|
case 'Polygon':
|
|
113
113
|
return polygonToGeoJson(data, startIndex, endIndex);
|
|
114
114
|
default:
|
|
115
|
-
const unexpectedInput
|
|
115
|
+
const unexpectedInput = data;
|
|
116
116
|
throw new Error(`Unsupported geometry type: ${(unexpectedInput as any)?.type}`);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
@@ -126,8 +126,6 @@ function normalizeInput(data: BinaryFeatures, type?: BinaryGeometryType): Binary
|
|
|
126
126
|
const isHeterogeneousType = Boolean(data.points || data.lines || data.polygons);
|
|
127
127
|
|
|
128
128
|
if (!isHeterogeneousType) {
|
|
129
|
-
// @ts-expect-error This is a legacy check which allowed `data` to be an instance of the values
|
|
130
|
-
// here. Aka the new data.points, data.lines, or data.polygons.
|
|
131
129
|
data.type = type || parseType(data);
|
|
132
130
|
return [data] as BinaryFeaturesArray;
|
|
133
131
|
}
|