geo-polygonize 0.8.1 → 0.9.0

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.
Binary file
Binary file
@@ -142,10 +142,79 @@ if (!('encodeInto' in cachedTextEncoder$1)) {
142
142
 
143
143
  let WASM_VECTOR_LEN$1 = 0;
144
144
 
145
+ const PolygonizerWasmErrorFinalization$1 = (typeof FinalizationRegistry === 'undefined')
146
+ ? { register: () => {}, unregister: () => {} }
147
+ : new FinalizationRegistry(ptr => wasm$1.__wbg_polygonizerwasmerror_free(ptr >>> 0, 1));
148
+
145
149
  const WasmPolygonResultFinalization$1 = (typeof FinalizationRegistry === 'undefined')
146
150
  ? { register: () => {}, unregister: () => {} }
147
151
  : new FinalizationRegistry(ptr => wasm$1.__wbg_wasmpolygonresult_free(ptr >>> 0, 1));
148
152
 
153
+ let PolygonizerWasmError$1 = class PolygonizerWasmError {
154
+ static __wrap(ptr) {
155
+ ptr = ptr >>> 0;
156
+ const obj = Object.create(PolygonizerWasmError.prototype);
157
+ obj.__wbg_ptr = ptr;
158
+ PolygonizerWasmErrorFinalization$1.register(obj, obj.__wbg_ptr, obj);
159
+ return obj;
160
+ }
161
+ __destroy_into_raw() {
162
+ const ptr = this.__wbg_ptr;
163
+ this.__wbg_ptr = 0;
164
+ PolygonizerWasmErrorFinalization$1.unregister(this);
165
+ return ptr;
166
+ }
167
+ free() {
168
+ const ptr = this.__destroy_into_raw();
169
+ wasm$1.__wbg_polygonizerwasmerror_free(ptr, 0);
170
+ }
171
+ /**
172
+ * @param {string} name
173
+ * @param {string} message
174
+ */
175
+ constructor(name, message) {
176
+ const ptr0 = passStringToWasm0$1(name, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
177
+ const len0 = WASM_VECTOR_LEN$1;
178
+ const ptr1 = passStringToWasm0$1(message, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
179
+ const len1 = WASM_VECTOR_LEN$1;
180
+ const ret = wasm$1.polygonizerwasmerror_new(ptr0, len0, ptr1, len1);
181
+ this.__wbg_ptr = ret >>> 0;
182
+ PolygonizerWasmErrorFinalization$1.register(this, this.__wbg_ptr, this);
183
+ return this;
184
+ }
185
+ /**
186
+ * @returns {string}
187
+ */
188
+ get name() {
189
+ let deferred1_0;
190
+ let deferred1_1;
191
+ try {
192
+ const ret = wasm$1.polygonizerwasmerror_name(this.__wbg_ptr);
193
+ deferred1_0 = ret[0];
194
+ deferred1_1 = ret[1];
195
+ return getStringFromWasm0$1(ret[0], ret[1]);
196
+ } finally {
197
+ wasm$1.__wbindgen_free(deferred1_0, deferred1_1, 1);
198
+ }
199
+ }
200
+ /**
201
+ * @returns {string}
202
+ */
203
+ get message() {
204
+ let deferred1_0;
205
+ let deferred1_1;
206
+ try {
207
+ const ret = wasm$1.polygonizerwasmerror_message(this.__wbg_ptr);
208
+ deferred1_0 = ret[0];
209
+ deferred1_1 = ret[1];
210
+ return getStringFromWasm0$1(ret[0], ret[1]);
211
+ } finally {
212
+ wasm$1.__wbindgen_free(deferred1_0, deferred1_1, 1);
213
+ }
214
+ }
215
+ };
216
+ if (Symbol.dispose) PolygonizerWasmError$1.prototype[Symbol.dispose] = PolygonizerWasmError$1.prototype.free;
217
+
149
218
  let WasmPolygonResult$1 = class WasmPolygonResult {
150
219
  static __wrap(ptr) {
151
220
  ptr = ptr >>> 0;
@@ -221,15 +290,16 @@ if (Symbol.dispose) WasmPolygonResult$1.prototype[Symbol.dispose] = WasmPolygonR
221
290
  * @param {boolean | null} [node_input]
222
291
  * @param {number | null} [snap_grid_size]
223
292
  * @param {boolean | null} [extract_only_polygonal]
293
+ * @param {boolean | null} [report_mode]
224
294
  * @returns {string}
225
295
  */
226
- function polygonize$1(geojson_str, node_input, snap_grid_size, extract_only_polygonal) {
296
+ function polygonize$1(geojson_str, node_input, snap_grid_size, extract_only_polygonal, report_mode) {
227
297
  let deferred3_0;
228
298
  let deferred3_1;
229
299
  try {
230
300
  const ptr0 = passStringToWasm0$1(geojson_str, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
231
301
  const len0 = WASM_VECTOR_LEN$1;
232
- const ret = wasm$1.polygonize(ptr0, len0, isLikeNone$1(node_input) ? 0xFFFFFF : node_input ? 1 : 0, !isLikeNone$1(snap_grid_size), isLikeNone$1(snap_grid_size) ? 0 : snap_grid_size, isLikeNone$1(extract_only_polygonal) ? 0xFFFFFF : extract_only_polygonal ? 1 : 0);
302
+ const ret = wasm$1.polygonize(ptr0, len0, isLikeNone$1(node_input) ? 0xFFFFFF : node_input ? 1 : 0, !isLikeNone$1(snap_grid_size), isLikeNone$1(snap_grid_size) ? 0 : snap_grid_size, isLikeNone$1(extract_only_polygonal) ? 0xFFFFFF : extract_only_polygonal ? 1 : 0, isLikeNone$1(report_mode) ? 0xFFFFFF : report_mode ? 1 : 0);
233
303
  var ptr2 = ret[0];
234
304
  var len2 = ret[1];
235
305
  if (ret[3]) {
@@ -336,6 +406,10 @@ function __wbg_get_imports$1() {
336
406
  const ret = new Error();
337
407
  return ret;
338
408
  };
409
+ imports.wbg.__wbg_polygonizerwasmerror_new = function(arg0) {
410
+ const ret = PolygonizerWasmError$1.__wrap(arg0);
411
+ return ret;
412
+ };
339
413
  imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
340
414
  const ret = arg1.stack;
341
415
  const ptr1 = passStringToWasm0$1(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
@@ -343,11 +417,6 @@ function __wbg_get_imports$1() {
343
417
  getDataViewMemory0$1().setInt32(arg0 + 4 * 1, len1, true);
344
418
  getDataViewMemory0$1().setInt32(arg0 + 4 * 0, ptr1, true);
345
419
  };
346
- imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
347
- // Cast intrinsic for `Ref(String) -> Externref`.
348
- const ret = getStringFromWasm0$1(arg0, arg1);
349
- return ret;
350
- };
351
420
  imports.wbg.__wbindgen_init_externref_table = function() {
352
421
  const table = wasm$1.__wbindgen_externrefs;
353
422
  const offset = table.grow(4);
@@ -422,6 +491,7 @@ async function __wbg_init$1(module_or_path) {
422
491
 
423
492
  var scalarExports = /*#__PURE__*/Object.freeze({
424
493
  __proto__: null,
494
+ PolygonizerWasmError: PolygonizerWasmError$1,
425
495
  WasmPolygonResult: WasmPolygonResult$1,
426
496
  default: __wbg_init$1,
427
497
  initSync: initSync$1,
@@ -571,10 +641,79 @@ if (!('encodeInto' in cachedTextEncoder)) {
571
641
 
572
642
  let WASM_VECTOR_LEN = 0;
573
643
 
644
+ const PolygonizerWasmErrorFinalization = (typeof FinalizationRegistry === 'undefined')
645
+ ? { register: () => {}, unregister: () => {} }
646
+ : new FinalizationRegistry(ptr => wasm.__wbg_polygonizerwasmerror_free(ptr >>> 0, 1));
647
+
574
648
  const WasmPolygonResultFinalization = (typeof FinalizationRegistry === 'undefined')
575
649
  ? { register: () => {}, unregister: () => {} }
576
650
  : new FinalizationRegistry(ptr => wasm.__wbg_wasmpolygonresult_free(ptr >>> 0, 1));
577
651
 
652
+ class PolygonizerWasmError {
653
+ static __wrap(ptr) {
654
+ ptr = ptr >>> 0;
655
+ const obj = Object.create(PolygonizerWasmError.prototype);
656
+ obj.__wbg_ptr = ptr;
657
+ PolygonizerWasmErrorFinalization.register(obj, obj.__wbg_ptr, obj);
658
+ return obj;
659
+ }
660
+ __destroy_into_raw() {
661
+ const ptr = this.__wbg_ptr;
662
+ this.__wbg_ptr = 0;
663
+ PolygonizerWasmErrorFinalization.unregister(this);
664
+ return ptr;
665
+ }
666
+ free() {
667
+ const ptr = this.__destroy_into_raw();
668
+ wasm.__wbg_polygonizerwasmerror_free(ptr, 0);
669
+ }
670
+ /**
671
+ * @param {string} name
672
+ * @param {string} message
673
+ */
674
+ constructor(name, message) {
675
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
676
+ const len0 = WASM_VECTOR_LEN;
677
+ const ptr1 = passStringToWasm0(message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
678
+ const len1 = WASM_VECTOR_LEN;
679
+ const ret = wasm.polygonizerwasmerror_new(ptr0, len0, ptr1, len1);
680
+ this.__wbg_ptr = ret >>> 0;
681
+ PolygonizerWasmErrorFinalization.register(this, this.__wbg_ptr, this);
682
+ return this;
683
+ }
684
+ /**
685
+ * @returns {string}
686
+ */
687
+ get name() {
688
+ let deferred1_0;
689
+ let deferred1_1;
690
+ try {
691
+ const ret = wasm.polygonizerwasmerror_name(this.__wbg_ptr);
692
+ deferred1_0 = ret[0];
693
+ deferred1_1 = ret[1];
694
+ return getStringFromWasm0(ret[0], ret[1]);
695
+ } finally {
696
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
697
+ }
698
+ }
699
+ /**
700
+ * @returns {string}
701
+ */
702
+ get message() {
703
+ let deferred1_0;
704
+ let deferred1_1;
705
+ try {
706
+ const ret = wasm.polygonizerwasmerror_message(this.__wbg_ptr);
707
+ deferred1_0 = ret[0];
708
+ deferred1_1 = ret[1];
709
+ return getStringFromWasm0(ret[0], ret[1]);
710
+ } finally {
711
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
712
+ }
713
+ }
714
+ }
715
+ if (Symbol.dispose) PolygonizerWasmError.prototype[Symbol.dispose] = PolygonizerWasmError.prototype.free;
716
+
578
717
  class WasmPolygonResult {
579
718
  static __wrap(ptr) {
580
719
  ptr = ptr >>> 0;
@@ -650,15 +789,16 @@ if (Symbol.dispose) WasmPolygonResult.prototype[Symbol.dispose] = WasmPolygonRes
650
789
  * @param {boolean | null} [node_input]
651
790
  * @param {number | null} [snap_grid_size]
652
791
  * @param {boolean | null} [extract_only_polygonal]
792
+ * @param {boolean | null} [report_mode]
653
793
  * @returns {string}
654
794
  */
655
- function polygonize(geojson_str, node_input, snap_grid_size, extract_only_polygonal) {
795
+ function polygonize(geojson_str, node_input, snap_grid_size, extract_only_polygonal, report_mode) {
656
796
  let deferred3_0;
657
797
  let deferred3_1;
658
798
  try {
659
799
  const ptr0 = passStringToWasm0(geojson_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
660
800
  const len0 = WASM_VECTOR_LEN;
661
- const ret = wasm.polygonize(ptr0, len0, isLikeNone(node_input) ? 0xFFFFFF : node_input ? 1 : 0, !isLikeNone(snap_grid_size), isLikeNone(snap_grid_size) ? 0 : snap_grid_size, isLikeNone(extract_only_polygonal) ? 0xFFFFFF : extract_only_polygonal ? 1 : 0);
801
+ const ret = wasm.polygonize(ptr0, len0, isLikeNone(node_input) ? 0xFFFFFF : node_input ? 1 : 0, !isLikeNone(snap_grid_size), isLikeNone(snap_grid_size) ? 0 : snap_grid_size, isLikeNone(extract_only_polygonal) ? 0xFFFFFF : extract_only_polygonal ? 1 : 0, isLikeNone(report_mode) ? 0xFFFFFF : report_mode ? 1 : 0);
662
802
  var ptr2 = ret[0];
663
803
  var len2 = ret[1];
664
804
  if (ret[3]) {
@@ -765,6 +905,10 @@ function __wbg_get_imports() {
765
905
  const ret = new Error();
766
906
  return ret;
767
907
  };
908
+ imports.wbg.__wbg_polygonizerwasmerror_new = function(arg0) {
909
+ const ret = PolygonizerWasmError.__wrap(arg0);
910
+ return ret;
911
+ };
768
912
  imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
769
913
  const ret = arg1.stack;
770
914
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -772,11 +916,6 @@ function __wbg_get_imports() {
772
916
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
773
917
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
774
918
  };
775
- imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
776
- // Cast intrinsic for `Ref(String) -> Externref`.
777
- const ret = getStringFromWasm0(arg0, arg1);
778
- return ret;
779
- };
780
919
  imports.wbg.__wbindgen_init_externref_table = function() {
781
920
  const table = wasm.__wbindgen_externrefs;
782
921
  const offset = table.grow(4);
@@ -851,6 +990,7 @@ async function __wbg_init(module_or_path) {
851
990
 
852
991
  var simdExports = /*#__PURE__*/Object.freeze({
853
992
  __proto__: null,
993
+ PolygonizerWasmError: PolygonizerWasmError,
854
994
  WasmPolygonResult: WasmPolygonResult,
855
995
  default: __wbg_init,
856
996
  initSync: initSync,
@@ -881,6 +1021,7 @@ async function initBest(scalarModule, simdModule) {
881
1021
  }
882
1022
  }
883
1023
 
1024
+ exports.PolygonizerWasmError = PolygonizerWasmError$1;
884
1025
  exports.WasmPolygonResult = WasmPolygonResult$1;
885
1026
  exports.initBest = initBest;
886
1027
  exports.initSync = initSync$1;
@@ -139,10 +139,79 @@ if (!('encodeInto' in cachedTextEncoder$1)) {
139
139
 
140
140
  let WASM_VECTOR_LEN$1 = 0;
141
141
 
142
+ const PolygonizerWasmErrorFinalization$1 = (typeof FinalizationRegistry === 'undefined')
143
+ ? { register: () => {}, unregister: () => {} }
144
+ : new FinalizationRegistry(ptr => wasm$1.__wbg_polygonizerwasmerror_free(ptr >>> 0, 1));
145
+
142
146
  const WasmPolygonResultFinalization$1 = (typeof FinalizationRegistry === 'undefined')
143
147
  ? { register: () => {}, unregister: () => {} }
144
148
  : new FinalizationRegistry(ptr => wasm$1.__wbg_wasmpolygonresult_free(ptr >>> 0, 1));
145
149
 
150
+ let PolygonizerWasmError$1 = class PolygonizerWasmError {
151
+ static __wrap(ptr) {
152
+ ptr = ptr >>> 0;
153
+ const obj = Object.create(PolygonizerWasmError.prototype);
154
+ obj.__wbg_ptr = ptr;
155
+ PolygonizerWasmErrorFinalization$1.register(obj, obj.__wbg_ptr, obj);
156
+ return obj;
157
+ }
158
+ __destroy_into_raw() {
159
+ const ptr = this.__wbg_ptr;
160
+ this.__wbg_ptr = 0;
161
+ PolygonizerWasmErrorFinalization$1.unregister(this);
162
+ return ptr;
163
+ }
164
+ free() {
165
+ const ptr = this.__destroy_into_raw();
166
+ wasm$1.__wbg_polygonizerwasmerror_free(ptr, 0);
167
+ }
168
+ /**
169
+ * @param {string} name
170
+ * @param {string} message
171
+ */
172
+ constructor(name, message) {
173
+ const ptr0 = passStringToWasm0$1(name, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
174
+ const len0 = WASM_VECTOR_LEN$1;
175
+ const ptr1 = passStringToWasm0$1(message, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
176
+ const len1 = WASM_VECTOR_LEN$1;
177
+ const ret = wasm$1.polygonizerwasmerror_new(ptr0, len0, ptr1, len1);
178
+ this.__wbg_ptr = ret >>> 0;
179
+ PolygonizerWasmErrorFinalization$1.register(this, this.__wbg_ptr, this);
180
+ return this;
181
+ }
182
+ /**
183
+ * @returns {string}
184
+ */
185
+ get name() {
186
+ let deferred1_0;
187
+ let deferred1_1;
188
+ try {
189
+ const ret = wasm$1.polygonizerwasmerror_name(this.__wbg_ptr);
190
+ deferred1_0 = ret[0];
191
+ deferred1_1 = ret[1];
192
+ return getStringFromWasm0$1(ret[0], ret[1]);
193
+ } finally {
194
+ wasm$1.__wbindgen_free(deferred1_0, deferred1_1, 1);
195
+ }
196
+ }
197
+ /**
198
+ * @returns {string}
199
+ */
200
+ get message() {
201
+ let deferred1_0;
202
+ let deferred1_1;
203
+ try {
204
+ const ret = wasm$1.polygonizerwasmerror_message(this.__wbg_ptr);
205
+ deferred1_0 = ret[0];
206
+ deferred1_1 = ret[1];
207
+ return getStringFromWasm0$1(ret[0], ret[1]);
208
+ } finally {
209
+ wasm$1.__wbindgen_free(deferred1_0, deferred1_1, 1);
210
+ }
211
+ }
212
+ };
213
+ if (Symbol.dispose) PolygonizerWasmError$1.prototype[Symbol.dispose] = PolygonizerWasmError$1.prototype.free;
214
+
146
215
  let WasmPolygonResult$1 = class WasmPolygonResult {
147
216
  static __wrap(ptr) {
148
217
  ptr = ptr >>> 0;
@@ -218,15 +287,16 @@ if (Symbol.dispose) WasmPolygonResult$1.prototype[Symbol.dispose] = WasmPolygonR
218
287
  * @param {boolean | null} [node_input]
219
288
  * @param {number | null} [snap_grid_size]
220
289
  * @param {boolean | null} [extract_only_polygonal]
290
+ * @param {boolean | null} [report_mode]
221
291
  * @returns {string}
222
292
  */
223
- function polygonize$1(geojson_str, node_input, snap_grid_size, extract_only_polygonal) {
293
+ function polygonize$1(geojson_str, node_input, snap_grid_size, extract_only_polygonal, report_mode) {
224
294
  let deferred3_0;
225
295
  let deferred3_1;
226
296
  try {
227
297
  const ptr0 = passStringToWasm0$1(geojson_str, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
228
298
  const len0 = WASM_VECTOR_LEN$1;
229
- const ret = wasm$1.polygonize(ptr0, len0, isLikeNone$1(node_input) ? 0xFFFFFF : node_input ? 1 : 0, !isLikeNone$1(snap_grid_size), isLikeNone$1(snap_grid_size) ? 0 : snap_grid_size, isLikeNone$1(extract_only_polygonal) ? 0xFFFFFF : extract_only_polygonal ? 1 : 0);
299
+ const ret = wasm$1.polygonize(ptr0, len0, isLikeNone$1(node_input) ? 0xFFFFFF : node_input ? 1 : 0, !isLikeNone$1(snap_grid_size), isLikeNone$1(snap_grid_size) ? 0 : snap_grid_size, isLikeNone$1(extract_only_polygonal) ? 0xFFFFFF : extract_only_polygonal ? 1 : 0, isLikeNone$1(report_mode) ? 0xFFFFFF : report_mode ? 1 : 0);
230
300
  var ptr2 = ret[0];
231
301
  var len2 = ret[1];
232
302
  if (ret[3]) {
@@ -333,6 +403,10 @@ function __wbg_get_imports$1() {
333
403
  const ret = new Error();
334
404
  return ret;
335
405
  };
406
+ imports.wbg.__wbg_polygonizerwasmerror_new = function(arg0) {
407
+ const ret = PolygonizerWasmError$1.__wrap(arg0);
408
+ return ret;
409
+ };
336
410
  imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
337
411
  const ret = arg1.stack;
338
412
  const ptr1 = passStringToWasm0$1(ret, wasm$1.__wbindgen_malloc, wasm$1.__wbindgen_realloc);
@@ -340,11 +414,6 @@ function __wbg_get_imports$1() {
340
414
  getDataViewMemory0$1().setInt32(arg0 + 4 * 1, len1, true);
341
415
  getDataViewMemory0$1().setInt32(arg0 + 4 * 0, ptr1, true);
342
416
  };
343
- imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
344
- // Cast intrinsic for `Ref(String) -> Externref`.
345
- const ret = getStringFromWasm0$1(arg0, arg1);
346
- return ret;
347
- };
348
417
  imports.wbg.__wbindgen_init_externref_table = function() {
349
418
  const table = wasm$1.__wbindgen_externrefs;
350
419
  const offset = table.grow(4);
@@ -419,6 +488,7 @@ async function __wbg_init$1(module_or_path) {
419
488
 
420
489
  var scalarExports = /*#__PURE__*/Object.freeze({
421
490
  __proto__: null,
491
+ PolygonizerWasmError: PolygonizerWasmError$1,
422
492
  WasmPolygonResult: WasmPolygonResult$1,
423
493
  default: __wbg_init$1,
424
494
  initSync: initSync$1,
@@ -568,10 +638,79 @@ if (!('encodeInto' in cachedTextEncoder)) {
568
638
 
569
639
  let WASM_VECTOR_LEN = 0;
570
640
 
641
+ const PolygonizerWasmErrorFinalization = (typeof FinalizationRegistry === 'undefined')
642
+ ? { register: () => {}, unregister: () => {} }
643
+ : new FinalizationRegistry(ptr => wasm.__wbg_polygonizerwasmerror_free(ptr >>> 0, 1));
644
+
571
645
  const WasmPolygonResultFinalization = (typeof FinalizationRegistry === 'undefined')
572
646
  ? { register: () => {}, unregister: () => {} }
573
647
  : new FinalizationRegistry(ptr => wasm.__wbg_wasmpolygonresult_free(ptr >>> 0, 1));
574
648
 
649
+ class PolygonizerWasmError {
650
+ static __wrap(ptr) {
651
+ ptr = ptr >>> 0;
652
+ const obj = Object.create(PolygonizerWasmError.prototype);
653
+ obj.__wbg_ptr = ptr;
654
+ PolygonizerWasmErrorFinalization.register(obj, obj.__wbg_ptr, obj);
655
+ return obj;
656
+ }
657
+ __destroy_into_raw() {
658
+ const ptr = this.__wbg_ptr;
659
+ this.__wbg_ptr = 0;
660
+ PolygonizerWasmErrorFinalization.unregister(this);
661
+ return ptr;
662
+ }
663
+ free() {
664
+ const ptr = this.__destroy_into_raw();
665
+ wasm.__wbg_polygonizerwasmerror_free(ptr, 0);
666
+ }
667
+ /**
668
+ * @param {string} name
669
+ * @param {string} message
670
+ */
671
+ constructor(name, message) {
672
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
673
+ const len0 = WASM_VECTOR_LEN;
674
+ const ptr1 = passStringToWasm0(message, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
675
+ const len1 = WASM_VECTOR_LEN;
676
+ const ret = wasm.polygonizerwasmerror_new(ptr0, len0, ptr1, len1);
677
+ this.__wbg_ptr = ret >>> 0;
678
+ PolygonizerWasmErrorFinalization.register(this, this.__wbg_ptr, this);
679
+ return this;
680
+ }
681
+ /**
682
+ * @returns {string}
683
+ */
684
+ get name() {
685
+ let deferred1_0;
686
+ let deferred1_1;
687
+ try {
688
+ const ret = wasm.polygonizerwasmerror_name(this.__wbg_ptr);
689
+ deferred1_0 = ret[0];
690
+ deferred1_1 = ret[1];
691
+ return getStringFromWasm0(ret[0], ret[1]);
692
+ } finally {
693
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
694
+ }
695
+ }
696
+ /**
697
+ * @returns {string}
698
+ */
699
+ get message() {
700
+ let deferred1_0;
701
+ let deferred1_1;
702
+ try {
703
+ const ret = wasm.polygonizerwasmerror_message(this.__wbg_ptr);
704
+ deferred1_0 = ret[0];
705
+ deferred1_1 = ret[1];
706
+ return getStringFromWasm0(ret[0], ret[1]);
707
+ } finally {
708
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
709
+ }
710
+ }
711
+ }
712
+ if (Symbol.dispose) PolygonizerWasmError.prototype[Symbol.dispose] = PolygonizerWasmError.prototype.free;
713
+
575
714
  class WasmPolygonResult {
576
715
  static __wrap(ptr) {
577
716
  ptr = ptr >>> 0;
@@ -647,15 +786,16 @@ if (Symbol.dispose) WasmPolygonResult.prototype[Symbol.dispose] = WasmPolygonRes
647
786
  * @param {boolean | null} [node_input]
648
787
  * @param {number | null} [snap_grid_size]
649
788
  * @param {boolean | null} [extract_only_polygonal]
789
+ * @param {boolean | null} [report_mode]
650
790
  * @returns {string}
651
791
  */
652
- function polygonize(geojson_str, node_input, snap_grid_size, extract_only_polygonal) {
792
+ function polygonize(geojson_str, node_input, snap_grid_size, extract_only_polygonal, report_mode) {
653
793
  let deferred3_0;
654
794
  let deferred3_1;
655
795
  try {
656
796
  const ptr0 = passStringToWasm0(geojson_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
657
797
  const len0 = WASM_VECTOR_LEN;
658
- const ret = wasm.polygonize(ptr0, len0, isLikeNone(node_input) ? 0xFFFFFF : node_input ? 1 : 0, !isLikeNone(snap_grid_size), isLikeNone(snap_grid_size) ? 0 : snap_grid_size, isLikeNone(extract_only_polygonal) ? 0xFFFFFF : extract_only_polygonal ? 1 : 0);
798
+ const ret = wasm.polygonize(ptr0, len0, isLikeNone(node_input) ? 0xFFFFFF : node_input ? 1 : 0, !isLikeNone(snap_grid_size), isLikeNone(snap_grid_size) ? 0 : snap_grid_size, isLikeNone(extract_only_polygonal) ? 0xFFFFFF : extract_only_polygonal ? 1 : 0, isLikeNone(report_mode) ? 0xFFFFFF : report_mode ? 1 : 0);
659
799
  var ptr2 = ret[0];
660
800
  var len2 = ret[1];
661
801
  if (ret[3]) {
@@ -762,6 +902,10 @@ function __wbg_get_imports() {
762
902
  const ret = new Error();
763
903
  return ret;
764
904
  };
905
+ imports.wbg.__wbg_polygonizerwasmerror_new = function(arg0) {
906
+ const ret = PolygonizerWasmError.__wrap(arg0);
907
+ return ret;
908
+ };
765
909
  imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
766
910
  const ret = arg1.stack;
767
911
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -769,11 +913,6 @@ function __wbg_get_imports() {
769
913
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
770
914
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
771
915
  };
772
- imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
773
- // Cast intrinsic for `Ref(String) -> Externref`.
774
- const ret = getStringFromWasm0(arg0, arg1);
775
- return ret;
776
- };
777
916
  imports.wbg.__wbindgen_init_externref_table = function() {
778
917
  const table = wasm.__wbindgen_externrefs;
779
918
  const offset = table.grow(4);
@@ -848,6 +987,7 @@ async function __wbg_init(module_or_path) {
848
987
 
849
988
  var simdExports = /*#__PURE__*/Object.freeze({
850
989
  __proto__: null,
990
+ PolygonizerWasmError: PolygonizerWasmError,
851
991
  WasmPolygonResult: WasmPolygonResult,
852
992
  default: __wbg_init,
853
993
  initSync: initSync,
@@ -878,4 +1018,4 @@ async function initBest(scalarModule, simdModule) {
878
1018
  }
879
1019
  }
880
1020
 
881
- export { WasmPolygonResult$1 as WasmPolygonResult, initBest, initSync$1 as initSync, polygonize$1 as polygonize, polygonize_buffers$1 as polygonize_buffers, polygonize_geoarrow$1 as polygonize_geoarrow };
1021
+ export { PolygonizerWasmError$1 as PolygonizerWasmError, WasmPolygonResult$1 as WasmPolygonResult, initBest, initSync$1 as initSync, polygonize$1 as polygonize, polygonize_buffers$1 as polygonize_buffers, polygonize_geoarrow$1 as polygonize_geoarrow };