@loaders.gl/las 4.2.0-alpha.4 → 4.2.0-alpha.6

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.
@@ -1,316 +1,400 @@
1
1
  import getModule from "./libs/laz-perf.js";
2
2
  let Module = null;
3
3
  const POINT_FORMAT_READERS = {
4
- 0: dv => {
5
- return {
6
- position: [dv.getInt32(0, true), dv.getInt32(4, true), dv.getInt32(8, true)],
7
- intensity: dv.getUint16(12, true),
8
- classification: dv.getUint8(15)
9
- };
10
- },
11
- 1: dv => {
12
- return {
13
- position: [dv.getInt32(0, true), dv.getInt32(4, true), dv.getInt32(8, true)],
14
- intensity: dv.getUint16(12, true),
15
- classification: dv.getUint8(15)
16
- };
17
- },
18
- 2: dv => {
19
- return {
20
- position: [dv.getInt32(0, true), dv.getInt32(4, true), dv.getInt32(8, true)],
21
- intensity: dv.getUint16(12, true),
22
- classification: dv.getUint8(15),
23
- color: [dv.getUint16(20, true), dv.getUint16(22, true), dv.getUint16(24, true)]
24
- };
25
- },
26
- 3: dv => {
27
- return {
28
- position: [dv.getInt32(0, true), dv.getInt32(4, true), dv.getInt32(8, true)],
29
- intensity: dv.getUint16(12, true),
30
- classification: dv.getUint8(15),
31
- color: [dv.getUint16(28, true), dv.getUint16(30, true), dv.getUint16(32, true)]
32
- };
33
- }
4
+ 0: (dv) => {
5
+ return {
6
+ position: [dv.getInt32(0, true), dv.getInt32(4, true), dv.getInt32(8, true)],
7
+ intensity: dv.getUint16(12, true),
8
+ classification: dv.getUint8(15)
9
+ };
10
+ },
11
+ 1: (dv) => {
12
+ return {
13
+ position: [dv.getInt32(0, true), dv.getInt32(4, true), dv.getInt32(8, true)],
14
+ intensity: dv.getUint16(12, true),
15
+ classification: dv.getUint8(15)
16
+ };
17
+ },
18
+ 2: (dv) => {
19
+ return {
20
+ position: [dv.getInt32(0, true), dv.getInt32(4, true), dv.getInt32(8, true)],
21
+ intensity: dv.getUint16(12, true),
22
+ classification: dv.getUint8(15),
23
+ color: [dv.getUint16(20, true), dv.getUint16(22, true), dv.getUint16(24, true)]
24
+ };
25
+ },
26
+ 3: (dv) => {
27
+ return {
28
+ position: [dv.getInt32(0, true), dv.getInt32(4, true), dv.getInt32(8, true)],
29
+ intensity: dv.getUint16(12, true),
30
+ classification: dv.getUint8(15),
31
+ color: [dv.getUint16(28, true), dv.getUint16(30, true), dv.getUint16(32, true)]
32
+ };
33
+ }
34
34
  };
35
- function readAs(buf) {
36
- let Type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
37
- let offset = arguments.length > 2 ? arguments[2] : undefined;
38
- let count = arguments.length > 3 ? arguments[3] : undefined;
39
- count = count === undefined || count === 0 ? 1 : count;
40
- const sub = buf.slice(offset, offset + Type.BYTES_PER_ELEMENT * count);
41
- const r = new Type(sub);
42
- if (count === 1) {
43
- return r[0];
44
- }
45
- const ret = [];
46
- for (let i = 0; i < count; i++) {
47
- ret.push(r[i]);
48
- }
49
- return ret;
35
+ /**
36
+ * Reads incoming binary data depends on the Type parameter
37
+ * @param buf
38
+ * @param Type
39
+ * @param offset
40
+ * @param count
41
+ * @returns number | number[] from incoming binary data
42
+ */
43
+ function readAs(buf, Type = {}, offset, count) {
44
+ count = count === undefined || count === 0 ? 1 : count;
45
+ const sub = buf.slice(offset, offset + Type.BYTES_PER_ELEMENT * count);
46
+ const r = new Type(sub);
47
+ if (count === 1) {
48
+ return r[0];
49
+ }
50
+ const ret = [];
51
+ for (let i = 0; i < count; i++) {
52
+ ret.push(r[i]);
53
+ }
54
+ return ret;
50
55
  }
56
+ /**
57
+ * Parsing of header's attributes
58
+ * @param arraybuffer
59
+ * @returns header as LASHeader
60
+ */
51
61
  function parseLASHeader(arraybuffer) {
52
- let start = 32 * 3 + 35;
53
- const o = {
54
- pointsOffset: readAs(arraybuffer, Uint32Array, 32 * 3),
55
- pointsFormatId: readAs(arraybuffer, Uint8Array, 32 * 3 + 8),
56
- pointsStructSize: readAs(arraybuffer, Uint16Array, 32 * 3 + 8 + 1),
57
- pointsCount: readAs(arraybuffer, Uint32Array, 32 * 3 + 11),
58
- scale: readAs(arraybuffer, Float64Array, start, 3)
59
- };
60
- start += 24;
61
- o.offset = readAs(arraybuffer, Float64Array, start, 3);
62
- start += 24;
63
- const bounds = readAs(arraybuffer, Float64Array, start, 6);
64
- start += 48;
65
- o.maxs = [bounds[0], bounds[2], bounds[4]];
66
- o.mins = [bounds[1], bounds[3], bounds[5]];
67
- return o;
62
+ let start = 32 * 3 + 35;
63
+ const o = {
64
+ pointsOffset: readAs(arraybuffer, Uint32Array, 32 * 3),
65
+ pointsFormatId: readAs(arraybuffer, Uint8Array, 32 * 3 + 8),
66
+ pointsStructSize: readAs(arraybuffer, Uint16Array, 32 * 3 + 8 + 1),
67
+ pointsCount: readAs(arraybuffer, Uint32Array, 32 * 3 + 11),
68
+ scale: readAs(arraybuffer, Float64Array, start, 3)
69
+ };
70
+ start += 24; // 8*3
71
+ o.offset = readAs(arraybuffer, Float64Array, start, 3);
72
+ start += 24;
73
+ const bounds = readAs(arraybuffer, Float64Array, start, 6);
74
+ start += 48; // 8*6;
75
+ o.maxs = [bounds[0], bounds[2], bounds[4]];
76
+ o.mins = [bounds[1], bounds[3], bounds[5]];
77
+ return o;
68
78
  }
79
+ // LAS Loader
80
+ // Loads uncompressed files
81
+ //
69
82
  class LASLoader {
70
- constructor(arraybuffer) {
71
- this.arraybuffer = void 0;
72
- this.readOffset = 0;
73
- this.header = {
74
- pointsOffset: 0,
75
- pointsFormatId: 0,
76
- pointsStructSize: 0,
77
- pointsCount: 0,
78
- scale: [0, 0, 0],
79
- offset: [0, 0, 0],
80
- maxs: [0],
81
- mins: [0],
82
- totalToRead: 0,
83
- totalRead: 0,
84
- versionAsString: '',
85
- isCompressed: true
83
+ arraybuffer;
84
+ readOffset = 0;
85
+ header = {
86
+ pointsOffset: 0,
87
+ pointsFormatId: 0,
88
+ pointsStructSize: 0,
89
+ pointsCount: 0,
90
+ scale: [0, 0, 0],
91
+ offset: [0, 0, 0],
92
+ maxs: [0],
93
+ mins: [0],
94
+ totalToRead: 0,
95
+ totalRead: 0,
96
+ versionAsString: '',
97
+ isCompressed: true
86
98
  };
87
- this.arraybuffer = arraybuffer;
88
- }
89
- open() {
90
- return true;
91
- }
92
- getHeader() {
93
- this.header = parseLASHeader(this.arraybuffer);
94
- return this.header;
95
- }
96
- readData(count, skip) {
97
- const {
98
- header,
99
- arraybuffer
100
- } = this;
101
- if (!header) {
102
- throw new Error('Cannot start reading data till a header request is issued');
99
+ constructor(arraybuffer) {
100
+ this.arraybuffer = arraybuffer;
103
101
  }
104
- let {
105
- readOffset
106
- } = this;
107
- let start;
108
- if (skip <= 1) {
109
- count = Math.min(count, header.pointsCount - readOffset);
110
- start = header.pointsOffset + readOffset * header.pointsStructSize;
111
- const end = start + count * header.pointsStructSize;
112
- readOffset += count;
113
- this.readOffset = readOffset;
114
- return {
115
- buffer: arraybuffer.slice(start, end),
116
- count,
117
- hasMoreData: readOffset < header.pointsCount
118
- };
102
+ /**
103
+ * @returns boolean
104
+ */
105
+ open() {
106
+ // Nothing needs to be done to open this
107
+ return true;
119
108
  }
120
- const pointsToRead = Math.min(count * skip, header.pointsCount - readOffset);
121
- const bufferSize = Math.ceil(pointsToRead / skip);
122
- let pointsRead = 0;
123
- const buf = new Uint8Array(bufferSize * header.pointsStructSize);
124
- for (let i = 0; i < pointsToRead; i++) {
125
- if (i % skip === 0) {
126
- start = header.pointsOffset + readOffset * header.pointsStructSize;
127
- const src = new Uint8Array(arraybuffer, start, header.pointsStructSize);
128
- buf.set(src, pointsRead * header.pointsStructSize);
129
- pointsRead++;
130
- }
131
- readOffset++;
109
+ /**
110
+ * Parsing of incoming binary
111
+ * @returns LASHeader
112
+ */
113
+ getHeader() {
114
+ this.header = parseLASHeader(this.arraybuffer);
115
+ return this.header;
132
116
  }
133
- this.readOffset = readOffset;
134
- return {
135
- buffer: buf.buffer,
136
- count: pointsRead,
137
- hasMoreData: readOffset < header.pointsCount
138
- };
139
- }
140
- close() {
141
- this.arraybuffer = null;
142
- return true;
143
- }
144
- }
145
- class LAZLoader {
146
- constructor(arraybuffer) {
147
- this.arraybuffer = void 0;
148
- this.instance = null;
149
- this.header = null;
150
- this.arraybuffer = arraybuffer;
151
- if (!Module) {
152
- Module = getModule();
153
- }
154
- }
155
- open() {
156
- try {
157
- const {
158
- arraybuffer
159
- } = this;
160
- this.instance = new Module.LASZip();
161
- const abInt = new Uint8Array(arraybuffer);
162
- const buf = Module._malloc(arraybuffer.byteLength);
163
- this.instance.arraybuffer = arraybuffer;
164
- this.instance.buf = buf;
165
- Module.HEAPU8.set(abInt, buf);
166
- this.instance.open(buf, arraybuffer.byteLength);
167
- this.instance.readOffset = 0;
168
- return true;
169
- } catch (error) {
170
- throw new Error(`Failed to open file: ${error.message}`);
117
+ /**
118
+ * Reading data
119
+ * @param count
120
+ * @param skip
121
+ * @returns new ArrayBuffer, count, hasMoreData
122
+ */
123
+ readData(count, skip) {
124
+ const { header, arraybuffer } = this;
125
+ if (!header) {
126
+ throw new Error('Cannot start reading data till a header request is issued');
127
+ }
128
+ let { readOffset } = this;
129
+ let start;
130
+ if (skip <= 1) {
131
+ count = Math.min(count, header.pointsCount - readOffset);
132
+ start = header.pointsOffset + readOffset * header.pointsStructSize;
133
+ const end = start + count * header.pointsStructSize;
134
+ readOffset += count;
135
+ this.readOffset = readOffset;
136
+ return {
137
+ buffer: arraybuffer.slice(start, end),
138
+ count,
139
+ hasMoreData: readOffset < header.pointsCount
140
+ };
141
+ }
142
+ const pointsToRead = Math.min(count * skip, header.pointsCount - readOffset);
143
+ const bufferSize = Math.ceil(pointsToRead / skip);
144
+ let pointsRead = 0;
145
+ const buf = new Uint8Array(bufferSize * header.pointsStructSize);
146
+ for (let i = 0; i < pointsToRead; i++) {
147
+ if (i % skip === 0) {
148
+ start = header.pointsOffset + readOffset * header.pointsStructSize;
149
+ const src = new Uint8Array(arraybuffer, start, header.pointsStructSize);
150
+ buf.set(src, pointsRead * header.pointsStructSize);
151
+ pointsRead++;
152
+ }
153
+ readOffset++;
154
+ }
155
+ this.readOffset = readOffset;
156
+ return {
157
+ buffer: buf.buffer,
158
+ count: pointsRead,
159
+ hasMoreData: readOffset < header.pointsCount
160
+ };
171
161
  }
172
- }
173
- getHeader() {
174
- if (!this.instance) {
175
- throw new Error('You need to open the file before trying to read header');
162
+ /**
163
+ * Method which brings data to null to close the file
164
+ * @returns
165
+ */
166
+ close() {
167
+ // @ts-ignore Possibly null
168
+ this.arraybuffer = null;
169
+ return true;
176
170
  }
177
- try {
178
- const header = parseLASHeader(this.instance.arraybuffer);
179
- header.pointsFormatId &= 0x3f;
180
- this.header = header;
181
- return header;
182
- } catch (error) {
183
- throw new Error(`Failed to get header: ${error.message}`);
171
+ }
172
+ /**
173
+ * LAZ Loader
174
+ * Uses NaCL module to load LAZ files
175
+ */
176
+ class LAZLoader {
177
+ arraybuffer;
178
+ instance = null; // LASZip instance
179
+ header = null;
180
+ constructor(arraybuffer) {
181
+ this.arraybuffer = arraybuffer;
182
+ if (!Module) {
183
+ // Avoid executing laz-perf on import
184
+ Module = getModule();
185
+ }
184
186
  }
185
- }
186
- readData(count, offset, skip) {
187
- if (!this.instance) {
188
- throw new Error('You need to open the file before trying to read stuff');
187
+ /**
188
+ * Opens the file
189
+ * @returns boolean
190
+ */
191
+ open() {
192
+ try {
193
+ const { arraybuffer } = this;
194
+ this.instance = new Module.LASZip();
195
+ const abInt = new Uint8Array(arraybuffer);
196
+ const buf = Module._malloc(arraybuffer.byteLength);
197
+ this.instance.arraybuffer = arraybuffer;
198
+ this.instance.buf = buf;
199
+ Module.HEAPU8.set(abInt, buf);
200
+ this.instance.open(buf, arraybuffer.byteLength);
201
+ this.instance.readOffset = 0;
202
+ return true;
203
+ }
204
+ catch (error) {
205
+ throw new Error(`Failed to open file: ${error.message}`);
206
+ }
189
207
  }
190
- const {
191
- header,
192
- instance
193
- } = this;
194
- if (!header) {
195
- throw new Error('You need to query header before reading, I maintain state that way, sorry :(');
208
+ getHeader() {
209
+ if (!this.instance) {
210
+ throw new Error('You need to open the file before trying to read header');
211
+ }
212
+ try {
213
+ const header = parseLASHeader(this.instance.arraybuffer);
214
+ header.pointsFormatId &= 0x3f;
215
+ this.header = header;
216
+ return header;
217
+ }
218
+ catch (error) {
219
+ throw new Error(`Failed to get header: ${error.message}`);
220
+ }
196
221
  }
197
- try {
198
- const pointsToRead = Math.min(count * skip, header.pointsCount - instance.readOffset);
199
- const bufferSize = Math.ceil(pointsToRead / skip);
200
- let pointsRead = 0;
201
- const thisBuf = new Uint8Array(bufferSize * header.pointsStructSize);
202
- const bufRead = Module._malloc(header.pointsStructSize);
203
- for (let i = 0; i < pointsToRead; i++) {
204
- instance.getPoint(bufRead);
205
- if (i % skip === 0) {
206
- const a = new Uint8Array(Module.HEAPU8.buffer, bufRead, header.pointsStructSize);
207
- thisBuf.set(a, pointsRead * header.pointsStructSize);
208
- pointsRead++;
222
+ /**
223
+ * @param count
224
+ * @param offset
225
+ * @param skip
226
+ * @returns Data
227
+ */
228
+ readData(count, offset, skip) {
229
+ if (!this.instance) {
230
+ throw new Error('You need to open the file before trying to read stuff');
231
+ }
232
+ const { header, instance } = this;
233
+ if (!header) {
234
+ throw new Error('You need to query header before reading, I maintain state that way, sorry :(');
235
+ }
236
+ try {
237
+ const pointsToRead = Math.min(count * skip, header.pointsCount - instance.readOffset);
238
+ const bufferSize = Math.ceil(pointsToRead / skip);
239
+ let pointsRead = 0;
240
+ const thisBuf = new Uint8Array(bufferSize * header.pointsStructSize);
241
+ const bufRead = Module._malloc(header.pointsStructSize);
242
+ for (let i = 0; i < pointsToRead; i++) {
243
+ instance.getPoint(bufRead);
244
+ if (i % skip === 0) {
245
+ const a = new Uint8Array(Module.HEAPU8.buffer, bufRead, header.pointsStructSize);
246
+ thisBuf.set(a, pointsRead * header.pointsStructSize);
247
+ pointsRead++;
248
+ }
249
+ instance.readOffset++;
250
+ }
251
+ return {
252
+ buffer: thisBuf.buffer,
253
+ count: pointsRead,
254
+ hasMoreData: instance.readOffset < header.pointsCount
255
+ };
256
+ }
257
+ catch (error) {
258
+ throw new Error(`Failed to read data: ${error.message}`);
209
259
  }
210
- instance.readOffset++;
211
- }
212
- return {
213
- buffer: thisBuf.buffer,
214
- count: pointsRead,
215
- hasMoreData: instance.readOffset < header.pointsCount
216
- };
217
- } catch (error) {
218
- throw new Error(`Failed to read data: ${error.message}`);
219
260
  }
220
- }
221
- close() {
222
- try {
223
- if (this.instance !== null) {
224
- this.instance.delete();
225
- this.instance = null;
226
- }
227
- return true;
228
- } catch (error) {
229
- throw new Error(`Failed to close file: ${error.message}`);
261
+ /**
262
+ * Deletes the instance
263
+ * @returns boolean
264
+ */
265
+ close() {
266
+ try {
267
+ if (this.instance !== null) {
268
+ this.instance.delete();
269
+ this.instance = null;
270
+ }
271
+ return true;
272
+ }
273
+ catch (error) {
274
+ throw new Error(`Failed to close file: ${error.message}`);
275
+ }
230
276
  }
231
- }
232
277
  }
278
+ /**
279
+ * Helper class: Decodes LAS records into points
280
+ */
233
281
  class LASDecoder {
234
- constructor(buffer, len, header) {
235
- this.arrayb = void 0;
236
- this.decoder = void 0;
237
- this.pointsCount = void 0;
238
- this.pointSize = void 0;
239
- this.scale = void 0;
240
- this.offset = void 0;
241
- this.mins = void 0;
242
- this.maxs = void 0;
243
- this.arrayb = buffer;
244
- this.decoder = POINT_FORMAT_READERS[header.pointsFormatId];
245
- this.pointsCount = len;
246
- this.pointSize = header.pointsStructSize;
247
- this.scale = header.scale;
248
- this.offset = header.offset;
249
- this.mins = header.mins;
250
- this.maxs = header.maxs;
251
- }
252
- getPoint(index) {
253
- if (index < 0 || index >= this.pointsCount) {
254
- throw new Error('Point index out of range');
282
+ arrayb;
283
+ decoder;
284
+ pointsCount;
285
+ pointSize;
286
+ scale;
287
+ offset;
288
+ mins;
289
+ maxs;
290
+ constructor(buffer, len, header) {
291
+ this.arrayb = buffer;
292
+ this.decoder = POINT_FORMAT_READERS[header.pointsFormatId];
293
+ this.pointsCount = len;
294
+ this.pointSize = header.pointsStructSize;
295
+ this.scale = header.scale;
296
+ this.offset = header.offset;
297
+ this.mins = header.mins;
298
+ this.maxs = header.maxs;
299
+ }
300
+ /**
301
+ * Decodes data depends on this point size
302
+ * @param index
303
+ * @returns New object
304
+ */
305
+ getPoint(index) {
306
+ if (index < 0 || index >= this.pointsCount) {
307
+ throw new Error('Point index out of range');
308
+ }
309
+ const dv = new DataView(this.arrayb, index * this.pointSize, this.pointSize);
310
+ return this.decoder(dv);
255
311
  }
256
- const dv = new DataView(this.arrayb, index * this.pointSize, this.pointSize);
257
- return this.decoder(dv);
258
- }
259
312
  }
313
+ /**
314
+ * A single consistent interface for loading LAS/LAZ files
315
+ */
260
316
  export class LASFile {
261
- constructor(arraybuffer) {
262
- this.arraybuffer = void 0;
263
- this.formatId = 0;
264
- this.loader = void 0;
265
- this.isCompressed = true;
266
- this.isOpen = false;
267
- this.version = 0;
268
- this.versionAsString = '';
269
- this.arraybuffer = arraybuffer;
270
- if (this.determineVersion() > 13) {
271
- throw new Error('Only file versions <= 1.3 are supported at this time');
317
+ arraybuffer;
318
+ formatId = 0;
319
+ loader;
320
+ isCompressed = true;
321
+ isOpen = false;
322
+ version = 0;
323
+ versionAsString = '';
324
+ constructor(arraybuffer) {
325
+ this.arraybuffer = arraybuffer;
326
+ if (this.determineVersion() > 13) {
327
+ throw new Error('Only file versions <= 1.3 are supported at this time');
328
+ }
329
+ this.determineFormat();
330
+ if (POINT_FORMAT_READERS[this.formatId] === undefined) {
331
+ throw new Error('The point format ID is not supported');
332
+ }
333
+ this.loader = this.isCompressed
334
+ ? new LAZLoader(this.arraybuffer)
335
+ : new LASLoader(this.arraybuffer);
272
336
  }
273
- this.determineFormat();
274
- if (POINT_FORMAT_READERS[this.formatId] === undefined) {
275
- throw new Error('The point format ID is not supported');
337
+ /**
338
+ * Determines format in parameters of LASHeaer
339
+ */
340
+ determineFormat() {
341
+ const formatId = readAs(this.arraybuffer, Uint8Array, 32 * 3 + 8);
342
+ const bit7 = (formatId & 0x80) >> 7;
343
+ const bit6 = (formatId & 0x40) >> 6;
344
+ if (bit7 === 1 && bit6 === 1) {
345
+ throw new Error('Old style compression not supported');
346
+ }
347
+ this.formatId = formatId & 0x3f;
348
+ this.isCompressed = bit7 === 1 || bit6 === 1;
276
349
  }
277
- this.loader = this.isCompressed ? new LAZLoader(this.arraybuffer) : new LASLoader(this.arraybuffer);
278
- }
279
- determineFormat() {
280
- const formatId = readAs(this.arraybuffer, Uint8Array, 32 * 3 + 8);
281
- const bit7 = (formatId & 0x80) >> 7;
282
- const bit6 = (formatId & 0x40) >> 6;
283
- if (bit7 === 1 && bit6 === 1) {
284
- throw new Error('Old style compression not supported');
350
+ /**
351
+ * Determines version
352
+ * @returns version
353
+ */
354
+ determineVersion() {
355
+ const ver = new Int8Array(this.arraybuffer, 24, 2);
356
+ this.version = ver[0] * 10 + ver[1];
357
+ this.versionAsString = `${ver[0]}.${ver[1]}`;
358
+ return this.version;
285
359
  }
286
- this.formatId = formatId & 0x3f;
287
- this.isCompressed = bit7 === 1 || bit6 === 1;
288
- }
289
- determineVersion() {
290
- const ver = new Int8Array(this.arraybuffer, 24, 2);
291
- this.version = ver[0] * 10 + ver[1];
292
- this.versionAsString = `${ver[0]}.${ver[1]}`;
293
- return this.version;
294
- }
295
- open() {
296
- if (this.loader.open()) {
297
- this.isOpen = true;
360
+ /**
361
+ * Reads if the file is open
362
+ * @returns boolean
363
+ */
364
+ open() {
365
+ if (this.loader.open()) {
366
+ this.isOpen = true;
367
+ }
368
+ }
369
+ /**
370
+ * Gets the header
371
+ * @returns Header
372
+ */
373
+ getHeader() {
374
+ return this.loader.getHeader();
375
+ }
376
+ /**
377
+ * @param count
378
+ * @param start
379
+ * @param skip
380
+ * @returns Data
381
+ */
382
+ readData(count, start, skip) {
383
+ return this.loader.readData(count, start, skip);
384
+ }
385
+ /**
386
+ * Closes the file
387
+ */
388
+ close() {
389
+ if (this.loader.close()) {
390
+ this.isOpen = false;
391
+ }
298
392
  }
299
- }
300
- getHeader() {
301
- return this.loader.getHeader();
302
- }
303
- readData(count, start, skip) {
304
- return this.loader.readData(count, start, skip);
305
- }
306
- close() {
307
- if (this.loader.close()) {
308
- this.isOpen = false;
393
+ /**
394
+ */
395
+ getUnpacker() {
396
+ return LASDecoder;
309
397
  }
310
- }
311
- getUnpacker() {
312
- return LASDecoder;
313
- }
314
398
  }
315
399
  export const LASModuleWasLoaded = false;
316
- //# sourceMappingURL=laslaz-decoder.js.map
400
+ /* eslint no-use-before-define: 2 */