@maplibre/mlt-wasm 0.1.0 → 0.1.27
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/LICENSE.txt +231 -0
- package/dist/vectorTile.d.ts +95 -1
- package/dist/vectorTile.d.ts.map +1 -1
- package/dist/vectorTile.js +80 -62
- package/dist/vectorTile.js.map +1 -1
- package/package.json +49 -49
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
===== MIT License =====
|
|
2
|
+
MIT License
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2024 MapLibre contributors
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any
|
|
7
|
+
person obtaining a copy of this software and associated
|
|
8
|
+
documentation files (the "Software"), to deal in the
|
|
9
|
+
Software without restriction, including without
|
|
10
|
+
limitation the rights to use, copy, modify, merge,
|
|
11
|
+
publish, distribute, sublicense, and/or sell copies of
|
|
12
|
+
the Software, and to permit persons to whom the Software
|
|
13
|
+
is furnished to do so, subject to the following
|
|
14
|
+
conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice
|
|
17
|
+
shall be included in all copies or substantial portions
|
|
18
|
+
of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
|
21
|
+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
|
22
|
+
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
23
|
+
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
|
24
|
+
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
25
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
26
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
|
27
|
+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
28
|
+
DEALINGS IN THE SOFTWARE.
|
|
29
|
+
|
|
30
|
+
===== Apache License 2.0 =====
|
|
31
|
+
Apache License
|
|
32
|
+
Version 2.0, January 2004
|
|
33
|
+
http://www.apache.org/licenses/
|
|
34
|
+
|
|
35
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
36
|
+
|
|
37
|
+
1. Definitions.
|
|
38
|
+
|
|
39
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
40
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
41
|
+
|
|
42
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
43
|
+
the copyright owner that is granting the License.
|
|
44
|
+
|
|
45
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
46
|
+
other entities that control, are controlled by, or are under common
|
|
47
|
+
control with that entity. For the purposes of this definition,
|
|
48
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
49
|
+
direction or management of such entity, whether by contract or
|
|
50
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
51
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
52
|
+
|
|
53
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
54
|
+
exercising permissions granted by this License.
|
|
55
|
+
|
|
56
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
57
|
+
including but not limited to software source code, documentation
|
|
58
|
+
source, and configuration files.
|
|
59
|
+
|
|
60
|
+
"Object" form shall mean any form resulting from mechanical
|
|
61
|
+
transformation or translation of a Source form, including but
|
|
62
|
+
not limited to compiled object code, generated documentation,
|
|
63
|
+
and conversions to other media types.
|
|
64
|
+
|
|
65
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
66
|
+
Object form, made available under the License, as indicated by a
|
|
67
|
+
copyright notice that is included in or attached to the work
|
|
68
|
+
(an example is provided in the Appendix below).
|
|
69
|
+
|
|
70
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
71
|
+
form, that is based on (or derived from) the Work and for which the
|
|
72
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
73
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
74
|
+
of this License, Derivative Works shall not include works that remain
|
|
75
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
76
|
+
the Work and Derivative Works thereof.
|
|
77
|
+
|
|
78
|
+
"Contribution" shall mean any work of authorship, including
|
|
79
|
+
the original version of the Work and any modifications or additions
|
|
80
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
81
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
82
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
83
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
84
|
+
means any form of electronic, verbal, or written communication sent
|
|
85
|
+
to the Licensor or its representatives, including but not limited to
|
|
86
|
+
communication on electronic mailing lists, source code control systems,
|
|
87
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
88
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
89
|
+
excluding communication that is conspicuously marked or otherwise
|
|
90
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
91
|
+
|
|
92
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
93
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
94
|
+
subsequently incorporated within the Work.
|
|
95
|
+
|
|
96
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
97
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
98
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
99
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
100
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
101
|
+
Work and such Derivative Works in Source or Object form.
|
|
102
|
+
|
|
103
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
104
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
105
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
106
|
+
(except as stated in this section) patent license to make, have made,
|
|
107
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
108
|
+
where such license applies only to those patent claims licensable
|
|
109
|
+
by such Contributor that are necessarily infringed by their
|
|
110
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
111
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
112
|
+
institute patent litigation against any entity (including a
|
|
113
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
114
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
115
|
+
or contributory patent infringement, then any patent licenses
|
|
116
|
+
granted to You under this License for that Work shall terminate
|
|
117
|
+
as of the date such litigation is filed.
|
|
118
|
+
|
|
119
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
120
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
121
|
+
modifications, and in Source or Object form, provided that You
|
|
122
|
+
meet the following conditions:
|
|
123
|
+
|
|
124
|
+
(a) You must give any other recipients of the Work or
|
|
125
|
+
Derivative Works a copy of this License; and
|
|
126
|
+
|
|
127
|
+
(b) You must cause any modified files to carry prominent notices
|
|
128
|
+
stating that You changed the files; and
|
|
129
|
+
|
|
130
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
131
|
+
that You distribute, all copyright, patent, trademark, and
|
|
132
|
+
attribution notices from the Source form of the Work,
|
|
133
|
+
excluding those notices that do not pertain to any part of
|
|
134
|
+
the Derivative Works; and
|
|
135
|
+
|
|
136
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
137
|
+
distribution, then any Derivative Works that You distribute must
|
|
138
|
+
include a readable copy of the attribution notices contained
|
|
139
|
+
within such NOTICE file, excluding those notices that do not
|
|
140
|
+
pertain to any part of the Derivative Works, in at least one
|
|
141
|
+
of the following places: within a NOTICE text file distributed
|
|
142
|
+
as part of the Derivative Works; within the Source form or
|
|
143
|
+
documentation, if provided along with the Derivative Works; or,
|
|
144
|
+
within a display generated by the Derivative Works, if and
|
|
145
|
+
wherever such third-party notices normally appear. The contents
|
|
146
|
+
of the NOTICE file are for informational purposes only and
|
|
147
|
+
do not modify the License. You may add Your own attribution
|
|
148
|
+
notices within Derivative Works that You distribute, alongside
|
|
149
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
150
|
+
that such additional attribution notices cannot be construed
|
|
151
|
+
as modifying the License.
|
|
152
|
+
|
|
153
|
+
You may add Your own copyright statement to Your modifications and
|
|
154
|
+
may provide additional or different license terms and conditions
|
|
155
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
156
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
157
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
158
|
+
the conditions stated in this License.
|
|
159
|
+
|
|
160
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
161
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
162
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
163
|
+
this License, without any additional terms or conditions.
|
|
164
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
165
|
+
the terms of any separate license agreement you may have executed
|
|
166
|
+
with Licensor regarding such Contributions.
|
|
167
|
+
|
|
168
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
169
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
170
|
+
except as required for reasonable and customary use in describing the
|
|
171
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
172
|
+
|
|
173
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
174
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
175
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
176
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
177
|
+
implied, including, without limitation, any warranties or conditions
|
|
178
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
179
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
180
|
+
appropriateness of using or redistributing the Work and assume any
|
|
181
|
+
risks associated with Your exercise of permissions under this License.
|
|
182
|
+
|
|
183
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
184
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
185
|
+
unless required by applicable law (such as deliberate and grossly
|
|
186
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
187
|
+
liable to You for damages, including any direct, indirect, special,
|
|
188
|
+
incidental, or consequential damages of any character arising as a
|
|
189
|
+
result of this License or out of the use or inability to use the
|
|
190
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
191
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
192
|
+
other commercial damages or losses), even if such Contributor
|
|
193
|
+
has been advised of the possibility of such damages.
|
|
194
|
+
|
|
195
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
196
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
197
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
198
|
+
or other liability obligations and/or rights consistent with this
|
|
199
|
+
License. However, in accepting such obligations, You may act only
|
|
200
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
201
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
202
|
+
defend, and hold each Contributor harmless for any liability
|
|
203
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
204
|
+
of your accepting any such warranty or additional liability.
|
|
205
|
+
|
|
206
|
+
END OF TERMS AND CONDITIONS
|
|
207
|
+
|
|
208
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
209
|
+
|
|
210
|
+
To apply the Apache License to your work, attach the following
|
|
211
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
212
|
+
replaced with your own identifying information. (Don't include
|
|
213
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
214
|
+
comment syntax for the file format. We also recommend that a
|
|
215
|
+
file or class name and description of purpose be included on the
|
|
216
|
+
same "printed page" as the copyright notice for easier
|
|
217
|
+
identification within third-party archives.
|
|
218
|
+
|
|
219
|
+
Copyright 2024 MapLibre contributors
|
|
220
|
+
|
|
221
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
222
|
+
you may not use this file except in compliance with the License.
|
|
223
|
+
You may obtain a copy of the License at
|
|
224
|
+
|
|
225
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
226
|
+
|
|
227
|
+
Unless required by applicable law or agreed to in writing, software
|
|
228
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
229
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
230
|
+
See the License for the specific language governing permissions and
|
|
231
|
+
limitations under the License.
|
package/dist/vectorTile.d.ts
CHANGED
|
@@ -1,3 +1,97 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Point from "@mapbox/point-geometry";
|
|
2
|
+
import type { VectorTileFeatureLike, VectorTileLayerLike, VectorTileLike } from "@maplibre/vt-pbf";
|
|
3
|
+
interface LayerGeometry {
|
|
4
|
+
/** Cumulative offsets into part_offsets (multi-geometry types only). Zero-length otherwise. */
|
|
5
|
+
geometry_offsets(): Uint32Array;
|
|
6
|
+
/** Cumulative offsets into ring_offsets or directly into vertices. Zero-length for pure Point layers. */
|
|
7
|
+
part_offsets(): Uint32Array;
|
|
8
|
+
/** Cumulative vertex-count offsets. Zero-length when no ring-level indirection is needed. */
|
|
9
|
+
ring_offsets(): Uint32Array;
|
|
10
|
+
/** Flat [x0, y0, x1, y1, …] vertex buffer in tile coordinates. */
|
|
11
|
+
vertices(): Int32Array;
|
|
12
|
+
}
|
|
13
|
+
interface WasmMltTile {
|
|
14
|
+
layer_count(): number;
|
|
15
|
+
layer_name(layer_idx: number): string;
|
|
16
|
+
layer_extent(layer_idx: number): number;
|
|
17
|
+
feature_count(layer_idx: number): number;
|
|
18
|
+
/** Bulk MVT geometry types for the whole layer as a Uint8Array (one byte per feature: 1/2/3). */
|
|
19
|
+
layer_types(layer_idx: number): Uint8Array;
|
|
20
|
+
/** Original MLT geometry types (0=Point, 1=LineString, 2=Polygon, 3=MultiPoint, 4=MultiLineString, 5=MultiPolygon). */
|
|
21
|
+
layer_mlt_types(layer_idx: number): Uint8Array;
|
|
22
|
+
/**
|
|
23
|
+
* Bulk IDs for the whole layer as a Float64Array (one f64 per feature).
|
|
24
|
+
* NaN when the feature has no ID.
|
|
25
|
+
*/
|
|
26
|
+
layer_ids(layer_idx: number): Float64Array;
|
|
27
|
+
/**
|
|
28
|
+
* All decoded geometry arrays for the layer in one call.
|
|
29
|
+
* JS walks these directly - zero WASM calls per feature for geometry.
|
|
30
|
+
*/
|
|
31
|
+
layer_geometry(layer_idx: number): LayerGeometry;
|
|
32
|
+
/** Column names for the layer, parallel to layer_properties(). */
|
|
33
|
+
layer_property_keys(layer_idx: number): string[];
|
|
34
|
+
/**
|
|
35
|
+
* All property values as an array of columns, parallel to layer_property_keys().
|
|
36
|
+
* Each column is a typed array (numeric) or plain Array (bool/string) of
|
|
37
|
+
* length feature_count. Index i gives the value for feature i; absent values
|
|
38
|
+
* are NaN (numeric) or undefined (bool/string).
|
|
39
|
+
*/
|
|
40
|
+
layer_properties(layer_idx: number): Array<Int8Array | Uint8Array | Int32Array | Uint32Array | Float32Array | Float64Array | Array<boolean | string | undefined>>;
|
|
41
|
+
feature_properties(layer_idx: number, feature_idx: number): Record<string, number | string | boolean>;
|
|
42
|
+
free(): void;
|
|
43
|
+
}
|
|
44
|
+
/** Mirrors `GeometryType` in mlt-core - preserves the single vs multi distinction that MVT collapses. */
|
|
45
|
+
export declare enum MltGeometryType {
|
|
46
|
+
Point = 0,
|
|
47
|
+
LineString = 1,
|
|
48
|
+
Polygon = 2,
|
|
49
|
+
MultiPoint = 3,
|
|
50
|
+
MultiLineString = 4,
|
|
51
|
+
MultiPolygon = 5
|
|
52
|
+
}
|
|
53
|
+
export declare class MltFeature implements VectorTileFeatureLike {
|
|
54
|
+
private readonly _featureIdx;
|
|
55
|
+
private readonly _types;
|
|
56
|
+
private readonly _mltTypes;
|
|
57
|
+
private readonly _ids;
|
|
58
|
+
private readonly _geomOffsets;
|
|
59
|
+
private readonly _partOffsets;
|
|
60
|
+
private readonly _ringOffsets;
|
|
61
|
+
private readonly _verts;
|
|
62
|
+
private readonly propertyKeys;
|
|
63
|
+
private readonly propertyColumns;
|
|
64
|
+
readonly extent: number;
|
|
65
|
+
private _type;
|
|
66
|
+
private _id;
|
|
67
|
+
constructor(_featureIdx: number, extent: number, _types: Uint8Array, _mltTypes: Uint8Array, _ids: Float64Array, _geomOffsets: Uint32Array, _partOffsets: Uint32Array, _ringOffsets: Uint32Array, _verts: Int32Array, propertyKeys: string[], propertyColumns: Array<Int8Array | Uint8Array | Int32Array | Uint32Array | Float32Array | Float64Array | Array<boolean | string | undefined>>);
|
|
68
|
+
get mltType(): MltGeometryType;
|
|
69
|
+
get type(): 0 | 1 | 2 | 3;
|
|
70
|
+
get id(): number | undefined;
|
|
71
|
+
get properties(): Record<string, number | string | boolean>;
|
|
72
|
+
loadGeometry(): Point[][];
|
|
73
|
+
/** Returns rings grouped by polygon - avoids the lossy winding-order heuristic in MVT's classifyRings. */
|
|
74
|
+
loadPolygons(): Point[][][];
|
|
75
|
+
}
|
|
76
|
+
export declare class MltLayer implements VectorTileLayerLike {
|
|
77
|
+
readonly _tile: WasmMltTile;
|
|
78
|
+
readonly _layerIdx: number;
|
|
79
|
+
readonly version: 1;
|
|
80
|
+
readonly name: string;
|
|
81
|
+
readonly extent: number;
|
|
82
|
+
readonly length: number;
|
|
83
|
+
private readonly _types;
|
|
84
|
+
private readonly _mltTypes;
|
|
85
|
+
private readonly _ids;
|
|
86
|
+
private readonly _geomOffsets;
|
|
87
|
+
private readonly _partOffsets;
|
|
88
|
+
private readonly _ringOffsets;
|
|
89
|
+
private readonly _verts;
|
|
90
|
+
readonly propertyKeys: string[];
|
|
91
|
+
readonly propertyColumns: Array<Int8Array | Uint8Array | Int32Array | Uint32Array | Float32Array | Float64Array | Array<boolean | string | undefined>>;
|
|
92
|
+
constructor(_tile: WasmMltTile, _layerIdx: number, name: string);
|
|
93
|
+
feature(i: number): MltFeature;
|
|
94
|
+
}
|
|
2
95
|
export declare function decodeTile(data: Uint8Array): VectorTileLike;
|
|
96
|
+
export {};
|
|
3
97
|
//# sourceMappingURL=vectorTile.d.ts.map
|
package/dist/vectorTile.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vectorTile.d.ts","sourceRoot":"","sources":["../js/vectorTile.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vectorTile.d.ts","sourceRoot":"","sources":["../js/vectorTile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,wBAAwB,CAAC;AAC3C,OAAO,KAAK,EACV,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,EACf,MAAM,kBAAkB,CAAC;AAO1B,UAAU,aAAa;IACrB,+FAA+F;IAC/F,gBAAgB,IAAI,WAAW,CAAC;IAChC,yGAAyG;IACzG,YAAY,IAAI,WAAW,CAAC;IAC5B,6FAA6F;IAC7F,YAAY,IAAI,WAAW,CAAC;IAC5B,kEAAkE;IAClE,QAAQ,IAAI,UAAU,CAAC;CACxB;AAED,UAAU,WAAW;IACnB,WAAW,IAAI,MAAM,CAAC;IACtB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IACtC,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IACxC,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IACzC,iGAAiG;IACjG,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU,CAAC;IAC3C,uHAAuH;IACvH,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU,CAAC;IAC/C;;;OAGG;IACH,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,CAAC;IAC3C;;;OAGG;IACH,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,CAAC;IACjD,kEAAkE;IAClE,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACjD;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3B,SAAS,GACT,UAAU,GACV,UAAU,GACV,WAAW,GACX,YAAY,GACZ,YAAY,GACZ,KAAK,CAAC,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC,CACtC,CAAC;gBAGS,KAAK,EAAE,WAAW,EAClB,SAAS,EAAE,MAAM,EAC1B,IAAI,EAAE,MAAM;IAiBd,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,UAAU;CAe/B;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,cAAc,CAQ3D"}
|
package/dist/vectorTile.js
CHANGED
|
@@ -1,44 +1,39 @@
|
|
|
1
1
|
import Point from "@mapbox/point-geometry";
|
|
2
2
|
import { decode_tile as wasmDecodeTile } from "../pkg/mlt_wasm.js";
|
|
3
3
|
// ---------------------------------------------------------------------------
|
|
4
|
-
// Geometry
|
|
4
|
+
// Geometry type enums
|
|
5
5
|
// ---------------------------------------------------------------------------
|
|
6
|
+
// MVT geometry types (VectorTileFeatureLike.type)
|
|
6
7
|
const POINT = 1;
|
|
7
8
|
const LINESTRING = 2;
|
|
8
9
|
const POLYGON = 3;
|
|
10
|
+
/** Mirrors `GeometryType` in mlt-core - preserves the single vs multi distinction that MVT collapses. */
|
|
11
|
+
export var MltGeometryType;
|
|
12
|
+
(function (MltGeometryType) {
|
|
13
|
+
MltGeometryType[MltGeometryType["Point"] = 0] = "Point";
|
|
14
|
+
MltGeometryType[MltGeometryType["LineString"] = 1] = "LineString";
|
|
15
|
+
MltGeometryType[MltGeometryType["Polygon"] = 2] = "Polygon";
|
|
16
|
+
MltGeometryType[MltGeometryType["MultiPoint"] = 3] = "MultiPoint";
|
|
17
|
+
MltGeometryType[MltGeometryType["MultiLineString"] = 4] = "MultiLineString";
|
|
18
|
+
MltGeometryType[MltGeometryType["MultiPolygon"] = 5] = "MultiPolygon";
|
|
19
|
+
})(MltGeometryType || (MltGeometryType = {}));
|
|
9
20
|
// ---------------------------------------------------------------------------
|
|
10
|
-
// loadGeometry
|
|
11
|
-
//
|
|
12
|
-
// Faithfully replicates DecodedGeometry::to_mvt_rings from geotype.rs.
|
|
13
|
-
//
|
|
14
|
-
// Offset arrays are cumulative vertex-count arrays (not byte offsets).
|
|
15
|
-
// Vertex n lives at vertices[n*2], vertices[n*2+1].
|
|
16
|
-
// All returned rings are open (no repeated closing vertex).
|
|
21
|
+
// loadGeometry - JS equivalent of DecodedGeometry::to_mvt_rings
|
|
17
22
|
// ---------------------------------------------------------------------------
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
*
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
* dispatch on both the type byte and the presence of offset arrays.
|
|
26
|
-
*/
|
|
23
|
+
function openRing(verts, start, end) {
|
|
24
|
+
const ring = new Array(end - start);
|
|
25
|
+
for (let i = start; i < end; i++) {
|
|
26
|
+
ring[i - start] = new Point(verts[i * 2], verts[i * 2 + 1]);
|
|
27
|
+
}
|
|
28
|
+
return ring;
|
|
29
|
+
}
|
|
27
30
|
function loadGeometry(mvtType, featureIdx, geomOffsets, partOffsets, ringOffsets, verts) {
|
|
28
31
|
const hasGeomOffsets = geomOffsets.length > 0;
|
|
29
32
|
const hasPartOffsets = partOffsets.length > 0;
|
|
30
33
|
const hasRingOffsets = ringOffsets.length > 0;
|
|
31
|
-
const openRing = (start, end) => {
|
|
32
|
-
const ring = new Array(end - start);
|
|
33
|
-
for (let i = start; i < end; i++) {
|
|
34
|
-
ring[i - start] = new Point(verts[i * 2], verts[i * 2 + 1]);
|
|
35
|
-
}
|
|
36
|
-
return ring;
|
|
37
|
-
};
|
|
38
34
|
if (mvtType === POINT) {
|
|
39
35
|
if (!hasGeomOffsets) {
|
|
40
|
-
//
|
|
41
|
-
// May have part/ring indirection if this is a mixed-type layer.
|
|
36
|
+
// Mixed-type layers may have part/ring indirection even for points.
|
|
42
37
|
let idx = featureIdx;
|
|
43
38
|
if (hasPartOffsets)
|
|
44
39
|
idx = partOffsets[idx];
|
|
@@ -47,8 +42,6 @@ function loadGeometry(mvtType, featureIdx, geomOffsets, partOffsets, ringOffsets
|
|
|
47
42
|
return [[new Point(verts[idx * 2], verts[idx * 2 + 1])]];
|
|
48
43
|
}
|
|
49
44
|
else {
|
|
50
|
-
// MultiPoint: geometry_offsets[i..i+1] gives a range of point indices.
|
|
51
|
-
// Each point may be further indirected through part/ring offsets.
|
|
52
45
|
const gStart = geomOffsets[featureIdx];
|
|
53
46
|
const gEnd = geomOffsets[featureIdx + 1];
|
|
54
47
|
const rings = new Array(gEnd - gStart);
|
|
@@ -65,7 +58,6 @@ function loadGeometry(mvtType, featureIdx, geomOffsets, partOffsets, ringOffsets
|
|
|
65
58
|
}
|
|
66
59
|
if (mvtType === LINESTRING) {
|
|
67
60
|
if (!hasGeomOffsets) {
|
|
68
|
-
// Single LineString.
|
|
69
61
|
let start;
|
|
70
62
|
let end;
|
|
71
63
|
if (hasRingOffsets) {
|
|
@@ -77,10 +69,9 @@ function loadGeometry(mvtType, featureIdx, geomOffsets, partOffsets, ringOffsets
|
|
|
77
69
|
start = partOffsets[featureIdx];
|
|
78
70
|
end = partOffsets[featureIdx + 1];
|
|
79
71
|
}
|
|
80
|
-
return [openRing(start, end)];
|
|
72
|
+
return [openRing(verts, start, end)];
|
|
81
73
|
}
|
|
82
74
|
else {
|
|
83
|
-
// MultiLineString: geometry_offsets[i..i+1] is a range of part indices.
|
|
84
75
|
const gStart = geomOffsets[featureIdx];
|
|
85
76
|
const gEnd = geomOffsets[featureIdx + 1];
|
|
86
77
|
const result = new Array(gEnd - gStart);
|
|
@@ -96,26 +87,23 @@ function loadGeometry(mvtType, featureIdx, geomOffsets, partOffsets, ringOffsets
|
|
|
96
87
|
start = partOffsets[g];
|
|
97
88
|
end = partOffsets[g + 1];
|
|
98
89
|
}
|
|
99
|
-
result[g - gStart] = openRing(start, end);
|
|
90
|
+
result[g - gStart] = openRing(verts, start, end);
|
|
100
91
|
}
|
|
101
92
|
return result;
|
|
102
93
|
}
|
|
103
94
|
}
|
|
104
95
|
if (mvtType === POLYGON) {
|
|
105
96
|
if (!hasGeomOffsets) {
|
|
106
|
-
// Single Polygon: part_offsets[i..i+1] iterates its ring indices.
|
|
107
97
|
const partStart = partOffsets[featureIdx];
|
|
108
98
|
const partEnd = partOffsets[featureIdx + 1];
|
|
109
99
|
const rings = new Array(partEnd - partStart);
|
|
110
100
|
for (let r = partStart; r < partEnd; r++) {
|
|
111
|
-
rings[r - partStart] = openRing(ringOffsets[r], ringOffsets[r + 1]);
|
|
101
|
+
rings[r - partStart] = openRing(verts, ringOffsets[r], ringOffsets[r + 1]);
|
|
112
102
|
}
|
|
113
103
|
return rings;
|
|
114
104
|
}
|
|
115
105
|
else {
|
|
116
|
-
//
|
|
117
|
-
// each polygon's part_offsets range iterates its ring indices.
|
|
118
|
-
// All rings are returned flat, matching to_mvt_rings behaviour.
|
|
106
|
+
// Flat ring list matching MVT convention - use loadPolygons() for grouped output.
|
|
119
107
|
const gStart = geomOffsets[featureIdx];
|
|
120
108
|
const gEnd = geomOffsets[featureIdx + 1];
|
|
121
109
|
const result = [];
|
|
@@ -123,7 +111,7 @@ function loadGeometry(mvtType, featureIdx, geomOffsets, partOffsets, ringOffsets
|
|
|
123
111
|
const partStart = partOffsets[g];
|
|
124
112
|
const partEnd = partOffsets[g + 1];
|
|
125
113
|
for (let r = partStart; r < partEnd; r++) {
|
|
126
|
-
result.push(openRing(ringOffsets[r], ringOffsets[r + 1]));
|
|
114
|
+
result.push(openRing(verts, ringOffsets[r], ringOffsets[r + 1]));
|
|
127
115
|
}
|
|
128
116
|
}
|
|
129
117
|
return result;
|
|
@@ -131,38 +119,65 @@ function loadGeometry(mvtType, featureIdx, geomOffsets, partOffsets, ringOffsets
|
|
|
131
119
|
}
|
|
132
120
|
return [];
|
|
133
121
|
}
|
|
122
|
+
/** Returns rings grouped by polygon using offset arrays instead of winding-order heuristics. */
|
|
123
|
+
function loadPolygons(featureIdx, geomOffsets, partOffsets, ringOffsets, verts) {
|
|
124
|
+
if (geomOffsets.length === 0) {
|
|
125
|
+
const partStart = partOffsets[featureIdx];
|
|
126
|
+
const partEnd = partOffsets[featureIdx + 1];
|
|
127
|
+
const rings = new Array(partEnd - partStart);
|
|
128
|
+
for (let r = partStart; r < partEnd; r++) {
|
|
129
|
+
rings[r - partStart] = openRing(verts, ringOffsets[r], ringOffsets[r + 1]);
|
|
130
|
+
}
|
|
131
|
+
return [rings];
|
|
132
|
+
}
|
|
133
|
+
const gStart = geomOffsets[featureIdx];
|
|
134
|
+
const gEnd = geomOffsets[featureIdx + 1];
|
|
135
|
+
const polygons = new Array(gEnd - gStart);
|
|
136
|
+
for (let g = gStart; g < gEnd; g++) {
|
|
137
|
+
const partStart = partOffsets[g];
|
|
138
|
+
const partEnd = partOffsets[g + 1];
|
|
139
|
+
const rings = new Array(partEnd - partStart);
|
|
140
|
+
for (let r = partStart; r < partEnd; r++) {
|
|
141
|
+
rings[r - partStart] = openRing(verts, ringOffsets[r], ringOffsets[r + 1]);
|
|
142
|
+
}
|
|
143
|
+
polygons[g - gStart] = rings;
|
|
144
|
+
}
|
|
145
|
+
return polygons;
|
|
146
|
+
}
|
|
134
147
|
// ---------------------------------------------------------------------------
|
|
135
148
|
// MltFeature
|
|
136
149
|
// ---------------------------------------------------------------------------
|
|
137
|
-
class MltFeature {
|
|
150
|
+
export class MltFeature {
|
|
138
151
|
_featureIdx;
|
|
139
152
|
_types;
|
|
153
|
+
_mltTypes;
|
|
140
154
|
_ids;
|
|
141
155
|
_geomOffsets;
|
|
142
156
|
_partOffsets;
|
|
143
157
|
_ringOffsets;
|
|
144
158
|
_verts;
|
|
145
|
-
|
|
146
|
-
|
|
159
|
+
propertyKeys;
|
|
160
|
+
propertyColumns;
|
|
147
161
|
extent;
|
|
148
|
-
// Lazily populated from the bulk arrays owned by MltLayer.
|
|
149
|
-
// _type: undefined = not yet read.
|
|
150
|
-
// _id: null = sentinel "not yet read"; undefined = feature has no id.
|
|
151
162
|
_type;
|
|
152
163
|
_id;
|
|
153
|
-
constructor(_featureIdx, extent, _types, _ids, _geomOffsets, _partOffsets, _ringOffsets, _verts,
|
|
164
|
+
constructor(_featureIdx, extent, _types, _mltTypes, _ids, _geomOffsets, _partOffsets, _ringOffsets, _verts, propertyKeys, propertyColumns) {
|
|
154
165
|
this._featureIdx = _featureIdx;
|
|
155
166
|
this._types = _types;
|
|
167
|
+
this._mltTypes = _mltTypes;
|
|
156
168
|
this._ids = _ids;
|
|
157
169
|
this._geomOffsets = _geomOffsets;
|
|
158
170
|
this._partOffsets = _partOffsets;
|
|
159
171
|
this._ringOffsets = _ringOffsets;
|
|
160
172
|
this._verts = _verts;
|
|
161
|
-
this.
|
|
162
|
-
this.
|
|
173
|
+
this.propertyKeys = propertyKeys;
|
|
174
|
+
this.propertyColumns = propertyColumns;
|
|
163
175
|
this.extent = extent;
|
|
164
176
|
this._id = null;
|
|
165
177
|
}
|
|
178
|
+
get mltType() {
|
|
179
|
+
return this._mltTypes[this._featureIdx];
|
|
180
|
+
}
|
|
166
181
|
get type() {
|
|
167
182
|
if (this._type === undefined) {
|
|
168
183
|
this._type = this._types[this._featureIdx];
|
|
@@ -178,15 +193,11 @@ class MltFeature {
|
|
|
178
193
|
}
|
|
179
194
|
get properties() {
|
|
180
195
|
const result = {};
|
|
181
|
-
for (let k = 0; k < this.
|
|
182
|
-
const col = this.
|
|
196
|
+
for (let k = 0; k < this.propertyKeys.length; k++) {
|
|
197
|
+
const col = this.propertyColumns[k];
|
|
183
198
|
const val = col[this._featureIdx];
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
// those are always included — acceptable for the rendering fast path.
|
|
187
|
-
if (val !== undefined &&
|
|
188
|
-
!(typeof val === "number" && Number.isNaN(val))) {
|
|
189
|
-
result[this._propKeys[k]] = val;
|
|
199
|
+
if (val !== undefined) {
|
|
200
|
+
result[this.propertyKeys[k]] = val;
|
|
190
201
|
}
|
|
191
202
|
}
|
|
192
203
|
return result;
|
|
@@ -194,26 +205,32 @@ class MltFeature {
|
|
|
194
205
|
loadGeometry() {
|
|
195
206
|
return loadGeometry(this.type, this._featureIdx, this._geomOffsets, this._partOffsets, this._ringOffsets, this._verts);
|
|
196
207
|
}
|
|
208
|
+
/** Returns rings grouped by polygon - avoids the lossy winding-order heuristic in MVT's classifyRings. */
|
|
209
|
+
loadPolygons() {
|
|
210
|
+
if (this.type !== POLYGON)
|
|
211
|
+
return [this.loadGeometry()];
|
|
212
|
+
return loadPolygons(this._featureIdx, this._geomOffsets, this._partOffsets, this._ringOffsets, this._verts);
|
|
213
|
+
}
|
|
197
214
|
}
|
|
198
215
|
// ---------------------------------------------------------------------------
|
|
199
216
|
// MltLayer
|
|
200
217
|
// ---------------------------------------------------------------------------
|
|
201
|
-
class MltLayer {
|
|
218
|
+
export class MltLayer {
|
|
202
219
|
_tile;
|
|
203
220
|
_layerIdx;
|
|
204
221
|
version = 1;
|
|
205
222
|
name;
|
|
206
223
|
extent;
|
|
207
224
|
length;
|
|
208
|
-
// All fetched once per layer — O(1) WASM calls regardless of feature count.
|
|
209
225
|
_types;
|
|
226
|
+
_mltTypes;
|
|
210
227
|
_ids;
|
|
211
228
|
_geomOffsets;
|
|
212
229
|
_partOffsets;
|
|
213
230
|
_ringOffsets;
|
|
214
231
|
_verts;
|
|
215
|
-
|
|
216
|
-
|
|
232
|
+
propertyKeys;
|
|
233
|
+
propertyColumns;
|
|
217
234
|
constructor(_tile, _layerIdx, name) {
|
|
218
235
|
this._tile = _tile;
|
|
219
236
|
this._layerIdx = _layerIdx;
|
|
@@ -221,17 +238,18 @@ class MltLayer {
|
|
|
221
238
|
this.extent = _tile.layer_extent(_layerIdx);
|
|
222
239
|
this.length = _tile.feature_count(_layerIdx);
|
|
223
240
|
this._types = _tile.layer_types(_layerIdx);
|
|
241
|
+
this._mltTypes = _tile.layer_mlt_types(_layerIdx);
|
|
224
242
|
this._ids = _tile.layer_ids(_layerIdx);
|
|
225
243
|
const geom = _tile.layer_geometry(_layerIdx);
|
|
226
244
|
this._geomOffsets = geom.geometry_offsets();
|
|
227
245
|
this._partOffsets = geom.part_offsets();
|
|
228
246
|
this._ringOffsets = geom.ring_offsets();
|
|
229
247
|
this._verts = geom.vertices();
|
|
230
|
-
this.
|
|
231
|
-
this.
|
|
248
|
+
this.propertyKeys = _tile.layer_property_keys(_layerIdx);
|
|
249
|
+
this.propertyColumns = _tile.layer_properties(_layerIdx);
|
|
232
250
|
}
|
|
233
251
|
feature(i) {
|
|
234
|
-
return new MltFeature(i, this.extent, this._types, this._ids, this._geomOffsets, this._partOffsets, this._ringOffsets, this._verts, this.
|
|
252
|
+
return new MltFeature(i, this.extent, this._types, this._mltTypes, this._ids, this._geomOffsets, this._partOffsets, this._ringOffsets, this._verts, this.propertyKeys, this.propertyColumns);
|
|
235
253
|
}
|
|
236
254
|
}
|
|
237
255
|
export function decodeTile(data) {
|
package/dist/vectorTile.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vectorTile.js","sourceRoot":"","sources":["../js/vectorTile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,wBAAwB,CAAC;AAM3C,OAAO,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"vectorTile.js","sourceRoot":"","sources":["../js/vectorTile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,wBAAwB,CAAC;AAM3C,OAAO,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,oBAAoB,CAAC;AA8DnE,8EAA8E;AAC9E,sBAAsB;AACtB,8EAA8E;AAE9E,kDAAkD;AAClD,MAAM,KAAK,GAAG,CAAC,CAAC;AAChB,MAAM,UAAU,GAAG,CAAC,CAAC;AACrB,MAAM,OAAO,GAAG,CAAC,CAAC;AAElB,yGAAyG;AACzG,MAAM,CAAN,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,uDAAS,CAAA;IACT,iEAAc,CAAA;IACd,2DAAW,CAAA;IACX,iEAAc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|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
2
|
+
"name": "@maplibre/mlt-wasm",
|
|
3
|
+
"version": "0.1.27",
|
|
4
|
+
"description": "WebAssembly-backed MapLibre Tile (MLT) decoder",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"/dist",
|
|
10
|
+
"/pkg"
|
|
11
|
+
],
|
|
12
|
+
"license": "(MIT OR Apache-2.0)",
|
|
13
|
+
"homepage": "https://github.com/maplibre/maplibre-tile-spec/#readme",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/maplibre/maplibre-tile-spec"
|
|
17
|
+
},
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/maplibre/maplibre-tile-spec/issues"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"maplibre",
|
|
23
|
+
"mlt",
|
|
24
|
+
"vector-tile",
|
|
25
|
+
"wasm",
|
|
26
|
+
"webassembly",
|
|
27
|
+
"gis"
|
|
28
|
+
],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build:wasm": "RUSTFLAGS=\"-Zunstable-options -Cpanic=immediate-abort -Ctarget-feature=+simd128\" CARGO_UNSTABLE_BUILD_STD=std,panic_abort RUSTUP_TOOLCHAIN=nightly wasm-pack build --target bundler --weak-refs --out-dir pkg",
|
|
31
|
+
"build:wasm-gz": "gzip --best --no-name pkg/mlt_wasm_bg.wasm --keep --force && du -sh pkg/*.wasm*",
|
|
32
|
+
"build:ts": "tsc",
|
|
33
|
+
"build": "npm run build:wasm && npm run build:ts && npm run build:wasm-gz",
|
|
34
|
+
"test": "vitest --coverage --coverage.reportOnFailure --run",
|
|
35
|
+
"test:watch": "vitest --coverage --coverage.reportOnFailure --ui",
|
|
36
|
+
"bench": "node --expose-gc --no-liftoff --no-wasm-tier-up node_modules/.bin/vitest bench"
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@mapbox/point-geometry": "1.1.0"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@maplibre/vt-pbf": "4.3.0",
|
|
43
|
+
"@types/node": "^24.10.2",
|
|
44
|
+
"@vitest/coverage-v8": "^4.0.1",
|
|
45
|
+
"@vitest/ui": "^4.0.18",
|
|
46
|
+
"typescript": "^5.9.3",
|
|
47
|
+
"vite-plugin-top-level-await": "^1.6.0",
|
|
48
|
+
"vite-plugin-wasm": "^3.5.0",
|
|
49
|
+
"vitest": "^4.0.1"
|
|
50
|
+
}
|
|
51
51
|
}
|