geo-polygonize 0.12.1 → 0.14.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
@@ -315,10 +315,17 @@ let WasmPolygonResult$1 = class WasmPolygonResult {
315
315
  /**
316
316
  * @returns {any}
317
317
  */
318
- provenance() {
318
+ get provenance() {
319
319
  const ret = wasm$1.wasmpolygonresult_provenance(this.__wbg_ptr);
320
320
  return ret;
321
321
  }
322
+ /**
323
+ * @returns {any}
324
+ */
325
+ get diagnostics() {
326
+ const ret = wasm$1.wasmpolygonresult_diagnostics(this.__wbg_ptr);
327
+ return ret;
328
+ }
322
329
  /**
323
330
  * @returns {number}
324
331
  */
@@ -333,6 +340,20 @@ let WasmPolygonResult$1 = class WasmPolygonResult {
333
340
  const ret = wasm$1.wasmpolygonresult_ring_offsets_ptr(this.__wbg_ptr);
334
341
  return ret >>> 0;
335
342
  }
343
+ /**
344
+ * @returns {number}
345
+ */
346
+ flat_line_ids_len() {
347
+ const ret = wasm$1.wasmpolygonresult_flat_line_ids_len(this.__wbg_ptr);
348
+ return ret >>> 0;
349
+ }
350
+ /**
351
+ * @returns {number}
352
+ */
353
+ flat_line_ids_ptr() {
354
+ const ret = wasm$1.wasmpolygonresult_flat_line_ids_ptr(this.__wbg_ptr);
355
+ return ret >>> 0;
356
+ }
336
357
  /**
337
358
  * @returns {number}
338
359
  */
@@ -434,14 +455,17 @@ function polygonizeWithOptions$1(geojson_str, options_val) {
434
455
  * @param {Uint32Array} offsets
435
456
  * @param {number} stride
436
457
  * @param {any} options_val
458
+ * @param {Uint32Array | null} [line_ids]
437
459
  * @returns {WasmPolygonResult}
438
460
  */
439
- function polygonizeWithOptionsBuffer$1(coords, offsets, stride, options_val) {
461
+ function polygonizeWithOptionsBuffer$1(coords, offsets, stride, options_val, line_ids) {
440
462
  const ptr0 = passArrayF64ToWasm0$1(coords, wasm$1.__wbindgen_malloc);
441
463
  const len0 = WASM_VECTOR_LEN$1;
442
464
  const ptr1 = passArray32ToWasm0$1(offsets, wasm$1.__wbindgen_malloc);
443
465
  const len1 = WASM_VECTOR_LEN$1;
444
- const ret = wasm$1.polygonizeWithOptionsBuffer(ptr0, len0, ptr1, len1, stride, options_val);
466
+ var ptr2 = isLikeNone$1(line_ids) ? 0 : passArray32ToWasm0$1(line_ids, wasm$1.__wbindgen_malloc);
467
+ var len2 = WASM_VECTOR_LEN$1;
468
+ const ret = wasm$1.polygonizeWithOptionsBuffer(ptr0, len0, ptr1, len1, stride, options_val, ptr2, len2);
445
469
  if (ret[2]) {
446
470
  throw takeFromExternrefTable0$1(ret[1]);
447
471
  }
@@ -454,14 +478,17 @@ function polygonizeWithOptionsBuffer$1(coords, offsets, stride, options_val) {
454
478
  * @param {number} stride
455
479
  * @param {boolean} node_input
456
480
  * @param {number} snap_grid_size
481
+ * @param {Uint32Array | null} [line_ids]
457
482
  * @returns {WasmPolygonResult}
458
483
  */
459
- function polygonize_buffers$1(coords, offsets, stride, node_input, snap_grid_size) {
484
+ function polygonize_buffers$1(coords, offsets, stride, node_input, snap_grid_size, line_ids) {
460
485
  const ptr0 = passArrayF64ToWasm0$1(coords, wasm$1.__wbindgen_malloc);
461
486
  const len0 = WASM_VECTOR_LEN$1;
462
487
  const ptr1 = passArray32ToWasm0$1(offsets, wasm$1.__wbindgen_malloc);
463
488
  const len1 = WASM_VECTOR_LEN$1;
464
- const ret = wasm$1.polygonize_buffers(ptr0, len0, ptr1, len1, stride, node_input, snap_grid_size);
489
+ var ptr2 = isLikeNone$1(line_ids) ? 0 : passArray32ToWasm0$1(line_ids, wasm$1.__wbindgen_malloc);
490
+ var len2 = WASM_VECTOR_LEN$1;
491
+ const ret = wasm$1.polygonize_buffers(ptr0, len0, ptr1, len1, stride, node_input, snap_grid_size, ptr2, len2);
465
492
  if (ret[2]) {
466
493
  throw takeFromExternrefTable0$1(ret[1]);
467
494
  }
@@ -675,6 +702,11 @@ function __wbg_get_imports$1() {
675
702
  const ret = getStringFromWasm0$1(arg0, arg1);
676
703
  return ret;
677
704
  };
705
+ imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
706
+ // Cast intrinsic for `U64 -> Externref`.
707
+ const ret = BigInt.asUintN(64, arg0);
708
+ return ret;
709
+ };
678
710
  imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
679
711
  // Cast intrinsic for `F64 -> Externref`.
680
712
  const ret = arg0;
@@ -1080,10 +1112,17 @@ class WasmPolygonResult {
1080
1112
  /**
1081
1113
  * @returns {any}
1082
1114
  */
1083
- provenance() {
1115
+ get provenance() {
1084
1116
  const ret = wasm.wasmpolygonresult_provenance(this.__wbg_ptr);
1085
1117
  return ret;
1086
1118
  }
1119
+ /**
1120
+ * @returns {any}
1121
+ */
1122
+ get diagnostics() {
1123
+ const ret = wasm.wasmpolygonresult_diagnostics(this.__wbg_ptr);
1124
+ return ret;
1125
+ }
1087
1126
  /**
1088
1127
  * @returns {number}
1089
1128
  */
@@ -1098,6 +1137,20 @@ class WasmPolygonResult {
1098
1137
  const ret = wasm.wasmpolygonresult_ring_offsets_ptr(this.__wbg_ptr);
1099
1138
  return ret >>> 0;
1100
1139
  }
1140
+ /**
1141
+ * @returns {number}
1142
+ */
1143
+ flat_line_ids_len() {
1144
+ const ret = wasm.wasmpolygonresult_flat_line_ids_len(this.__wbg_ptr);
1145
+ return ret >>> 0;
1146
+ }
1147
+ /**
1148
+ * @returns {number}
1149
+ */
1150
+ flat_line_ids_ptr() {
1151
+ const ret = wasm.wasmpolygonresult_flat_line_ids_ptr(this.__wbg_ptr);
1152
+ return ret >>> 0;
1153
+ }
1101
1154
  /**
1102
1155
  * @returns {number}
1103
1156
  */
@@ -1199,14 +1252,17 @@ function polygonizeWithOptions(geojson_str, options_val) {
1199
1252
  * @param {Uint32Array} offsets
1200
1253
  * @param {number} stride
1201
1254
  * @param {any} options_val
1255
+ * @param {Uint32Array | null} [line_ids]
1202
1256
  * @returns {WasmPolygonResult}
1203
1257
  */
1204
- function polygonizeWithOptionsBuffer(coords, offsets, stride, options_val) {
1258
+ function polygonizeWithOptionsBuffer(coords, offsets, stride, options_val, line_ids) {
1205
1259
  const ptr0 = passArrayF64ToWasm0(coords, wasm.__wbindgen_malloc);
1206
1260
  const len0 = WASM_VECTOR_LEN;
1207
1261
  const ptr1 = passArray32ToWasm0(offsets, wasm.__wbindgen_malloc);
1208
1262
  const len1 = WASM_VECTOR_LEN;
1209
- const ret = wasm.polygonizeWithOptionsBuffer(ptr0, len0, ptr1, len1, stride, options_val);
1263
+ var ptr2 = isLikeNone(line_ids) ? 0 : passArray32ToWasm0(line_ids, wasm.__wbindgen_malloc);
1264
+ var len2 = WASM_VECTOR_LEN;
1265
+ const ret = wasm.polygonizeWithOptionsBuffer(ptr0, len0, ptr1, len1, stride, options_val, ptr2, len2);
1210
1266
  if (ret[2]) {
1211
1267
  throw takeFromExternrefTable0(ret[1]);
1212
1268
  }
@@ -1219,14 +1275,17 @@ function polygonizeWithOptionsBuffer(coords, offsets, stride, options_val) {
1219
1275
  * @param {number} stride
1220
1276
  * @param {boolean} node_input
1221
1277
  * @param {number} snap_grid_size
1278
+ * @param {Uint32Array | null} [line_ids]
1222
1279
  * @returns {WasmPolygonResult}
1223
1280
  */
1224
- function polygonize_buffers(coords, offsets, stride, node_input, snap_grid_size) {
1281
+ function polygonize_buffers(coords, offsets, stride, node_input, snap_grid_size, line_ids) {
1225
1282
  const ptr0 = passArrayF64ToWasm0(coords, wasm.__wbindgen_malloc);
1226
1283
  const len0 = WASM_VECTOR_LEN;
1227
1284
  const ptr1 = passArray32ToWasm0(offsets, wasm.__wbindgen_malloc);
1228
1285
  const len1 = WASM_VECTOR_LEN;
1229
- const ret = wasm.polygonize_buffers(ptr0, len0, ptr1, len1, stride, node_input, snap_grid_size);
1286
+ var ptr2 = isLikeNone(line_ids) ? 0 : passArray32ToWasm0(line_ids, wasm.__wbindgen_malloc);
1287
+ var len2 = WASM_VECTOR_LEN;
1288
+ const ret = wasm.polygonize_buffers(ptr0, len0, ptr1, len1, stride, node_input, snap_grid_size, ptr2, len2);
1230
1289
  if (ret[2]) {
1231
1290
  throw takeFromExternrefTable0(ret[1]);
1232
1291
  }
@@ -1440,6 +1499,11 @@ function __wbg_get_imports() {
1440
1499
  const ret = getStringFromWasm0(arg0, arg1);
1441
1500
  return ret;
1442
1501
  };
1502
+ imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
1503
+ // Cast intrinsic for `U64 -> Externref`.
1504
+ const ret = BigInt.asUintN(64, arg0);
1505
+ return ret;
1506
+ };
1443
1507
  imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
1444
1508
  // Cast intrinsic for `F64 -> Externref`.
1445
1509
  const ret = arg0;
@@ -312,10 +312,17 @@ let WasmPolygonResult$1 = class WasmPolygonResult {
312
312
  /**
313
313
  * @returns {any}
314
314
  */
315
- provenance() {
315
+ get provenance() {
316
316
  const ret = wasm$1.wasmpolygonresult_provenance(this.__wbg_ptr);
317
317
  return ret;
318
318
  }
319
+ /**
320
+ * @returns {any}
321
+ */
322
+ get diagnostics() {
323
+ const ret = wasm$1.wasmpolygonresult_diagnostics(this.__wbg_ptr);
324
+ return ret;
325
+ }
319
326
  /**
320
327
  * @returns {number}
321
328
  */
@@ -330,6 +337,20 @@ let WasmPolygonResult$1 = class WasmPolygonResult {
330
337
  const ret = wasm$1.wasmpolygonresult_ring_offsets_ptr(this.__wbg_ptr);
331
338
  return ret >>> 0;
332
339
  }
340
+ /**
341
+ * @returns {number}
342
+ */
343
+ flat_line_ids_len() {
344
+ const ret = wasm$1.wasmpolygonresult_flat_line_ids_len(this.__wbg_ptr);
345
+ return ret >>> 0;
346
+ }
347
+ /**
348
+ * @returns {number}
349
+ */
350
+ flat_line_ids_ptr() {
351
+ const ret = wasm$1.wasmpolygonresult_flat_line_ids_ptr(this.__wbg_ptr);
352
+ return ret >>> 0;
353
+ }
333
354
  /**
334
355
  * @returns {number}
335
356
  */
@@ -431,14 +452,17 @@ function polygonizeWithOptions$1(geojson_str, options_val) {
431
452
  * @param {Uint32Array} offsets
432
453
  * @param {number} stride
433
454
  * @param {any} options_val
455
+ * @param {Uint32Array | null} [line_ids]
434
456
  * @returns {WasmPolygonResult}
435
457
  */
436
- function polygonizeWithOptionsBuffer$1(coords, offsets, stride, options_val) {
458
+ function polygonizeWithOptionsBuffer$1(coords, offsets, stride, options_val, line_ids) {
437
459
  const ptr0 = passArrayF64ToWasm0$1(coords, wasm$1.__wbindgen_malloc);
438
460
  const len0 = WASM_VECTOR_LEN$1;
439
461
  const ptr1 = passArray32ToWasm0$1(offsets, wasm$1.__wbindgen_malloc);
440
462
  const len1 = WASM_VECTOR_LEN$1;
441
- const ret = wasm$1.polygonizeWithOptionsBuffer(ptr0, len0, ptr1, len1, stride, options_val);
463
+ var ptr2 = isLikeNone$1(line_ids) ? 0 : passArray32ToWasm0$1(line_ids, wasm$1.__wbindgen_malloc);
464
+ var len2 = WASM_VECTOR_LEN$1;
465
+ const ret = wasm$1.polygonizeWithOptionsBuffer(ptr0, len0, ptr1, len1, stride, options_val, ptr2, len2);
442
466
  if (ret[2]) {
443
467
  throw takeFromExternrefTable0$1(ret[1]);
444
468
  }
@@ -451,14 +475,17 @@ function polygonizeWithOptionsBuffer$1(coords, offsets, stride, options_val) {
451
475
  * @param {number} stride
452
476
  * @param {boolean} node_input
453
477
  * @param {number} snap_grid_size
478
+ * @param {Uint32Array | null} [line_ids]
454
479
  * @returns {WasmPolygonResult}
455
480
  */
456
- function polygonize_buffers$1(coords, offsets, stride, node_input, snap_grid_size) {
481
+ function polygonize_buffers$1(coords, offsets, stride, node_input, snap_grid_size, line_ids) {
457
482
  const ptr0 = passArrayF64ToWasm0$1(coords, wasm$1.__wbindgen_malloc);
458
483
  const len0 = WASM_VECTOR_LEN$1;
459
484
  const ptr1 = passArray32ToWasm0$1(offsets, wasm$1.__wbindgen_malloc);
460
485
  const len1 = WASM_VECTOR_LEN$1;
461
- const ret = wasm$1.polygonize_buffers(ptr0, len0, ptr1, len1, stride, node_input, snap_grid_size);
486
+ var ptr2 = isLikeNone$1(line_ids) ? 0 : passArray32ToWasm0$1(line_ids, wasm$1.__wbindgen_malloc);
487
+ var len2 = WASM_VECTOR_LEN$1;
488
+ const ret = wasm$1.polygonize_buffers(ptr0, len0, ptr1, len1, stride, node_input, snap_grid_size, ptr2, len2);
462
489
  if (ret[2]) {
463
490
  throw takeFromExternrefTable0$1(ret[1]);
464
491
  }
@@ -672,6 +699,11 @@ function __wbg_get_imports$1() {
672
699
  const ret = getStringFromWasm0$1(arg0, arg1);
673
700
  return ret;
674
701
  };
702
+ imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
703
+ // Cast intrinsic for `U64 -> Externref`.
704
+ const ret = BigInt.asUintN(64, arg0);
705
+ return ret;
706
+ };
675
707
  imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
676
708
  // Cast intrinsic for `F64 -> Externref`.
677
709
  const ret = arg0;
@@ -1077,10 +1109,17 @@ class WasmPolygonResult {
1077
1109
  /**
1078
1110
  * @returns {any}
1079
1111
  */
1080
- provenance() {
1112
+ get provenance() {
1081
1113
  const ret = wasm.wasmpolygonresult_provenance(this.__wbg_ptr);
1082
1114
  return ret;
1083
1115
  }
1116
+ /**
1117
+ * @returns {any}
1118
+ */
1119
+ get diagnostics() {
1120
+ const ret = wasm.wasmpolygonresult_diagnostics(this.__wbg_ptr);
1121
+ return ret;
1122
+ }
1084
1123
  /**
1085
1124
  * @returns {number}
1086
1125
  */
@@ -1095,6 +1134,20 @@ class WasmPolygonResult {
1095
1134
  const ret = wasm.wasmpolygonresult_ring_offsets_ptr(this.__wbg_ptr);
1096
1135
  return ret >>> 0;
1097
1136
  }
1137
+ /**
1138
+ * @returns {number}
1139
+ */
1140
+ flat_line_ids_len() {
1141
+ const ret = wasm.wasmpolygonresult_flat_line_ids_len(this.__wbg_ptr);
1142
+ return ret >>> 0;
1143
+ }
1144
+ /**
1145
+ * @returns {number}
1146
+ */
1147
+ flat_line_ids_ptr() {
1148
+ const ret = wasm.wasmpolygonresult_flat_line_ids_ptr(this.__wbg_ptr);
1149
+ return ret >>> 0;
1150
+ }
1098
1151
  /**
1099
1152
  * @returns {number}
1100
1153
  */
@@ -1196,14 +1249,17 @@ function polygonizeWithOptions(geojson_str, options_val) {
1196
1249
  * @param {Uint32Array} offsets
1197
1250
  * @param {number} stride
1198
1251
  * @param {any} options_val
1252
+ * @param {Uint32Array | null} [line_ids]
1199
1253
  * @returns {WasmPolygonResult}
1200
1254
  */
1201
- function polygonizeWithOptionsBuffer(coords, offsets, stride, options_val) {
1255
+ function polygonizeWithOptionsBuffer(coords, offsets, stride, options_val, line_ids) {
1202
1256
  const ptr0 = passArrayF64ToWasm0(coords, wasm.__wbindgen_malloc);
1203
1257
  const len0 = WASM_VECTOR_LEN;
1204
1258
  const ptr1 = passArray32ToWasm0(offsets, wasm.__wbindgen_malloc);
1205
1259
  const len1 = WASM_VECTOR_LEN;
1206
- const ret = wasm.polygonizeWithOptionsBuffer(ptr0, len0, ptr1, len1, stride, options_val);
1260
+ var ptr2 = isLikeNone(line_ids) ? 0 : passArray32ToWasm0(line_ids, wasm.__wbindgen_malloc);
1261
+ var len2 = WASM_VECTOR_LEN;
1262
+ const ret = wasm.polygonizeWithOptionsBuffer(ptr0, len0, ptr1, len1, stride, options_val, ptr2, len2);
1207
1263
  if (ret[2]) {
1208
1264
  throw takeFromExternrefTable0(ret[1]);
1209
1265
  }
@@ -1216,14 +1272,17 @@ function polygonizeWithOptionsBuffer(coords, offsets, stride, options_val) {
1216
1272
  * @param {number} stride
1217
1273
  * @param {boolean} node_input
1218
1274
  * @param {number} snap_grid_size
1275
+ * @param {Uint32Array | null} [line_ids]
1219
1276
  * @returns {WasmPolygonResult}
1220
1277
  */
1221
- function polygonize_buffers(coords, offsets, stride, node_input, snap_grid_size) {
1278
+ function polygonize_buffers(coords, offsets, stride, node_input, snap_grid_size, line_ids) {
1222
1279
  const ptr0 = passArrayF64ToWasm0(coords, wasm.__wbindgen_malloc);
1223
1280
  const len0 = WASM_VECTOR_LEN;
1224
1281
  const ptr1 = passArray32ToWasm0(offsets, wasm.__wbindgen_malloc);
1225
1282
  const len1 = WASM_VECTOR_LEN;
1226
- const ret = wasm.polygonize_buffers(ptr0, len0, ptr1, len1, stride, node_input, snap_grid_size);
1283
+ var ptr2 = isLikeNone(line_ids) ? 0 : passArray32ToWasm0(line_ids, wasm.__wbindgen_malloc);
1284
+ var len2 = WASM_VECTOR_LEN;
1285
+ const ret = wasm.polygonize_buffers(ptr0, len0, ptr1, len1, stride, node_input, snap_grid_size, ptr2, len2);
1227
1286
  if (ret[2]) {
1228
1287
  throw takeFromExternrefTable0(ret[1]);
1229
1288
  }
@@ -1437,6 +1496,11 @@ function __wbg_get_imports() {
1437
1496
  const ret = getStringFromWasm0(arg0, arg1);
1438
1497
  return ret;
1439
1498
  };
1499
+ imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
1500
+ // Cast intrinsic for `U64 -> Externref`.
1501
+ const ret = BigInt.asUintN(64, arg0);
1502
+ return ret;
1503
+ };
1440
1504
  imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
1441
1505
  // Cast intrinsic for `F64 -> Externref`.
1442
1506
  const ret = arg0;