geo-polygonize 0.12.0 → 0.13.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
@@ -333,6 +333,20 @@ let WasmPolygonResult$1 = class WasmPolygonResult {
333
333
  const ret = wasm$1.wasmpolygonresult_ring_offsets_ptr(this.__wbg_ptr);
334
334
  return ret >>> 0;
335
335
  }
336
+ /**
337
+ * @returns {number}
338
+ */
339
+ flat_line_ids_len() {
340
+ const ret = wasm$1.wasmpolygonresult_flat_line_ids_len(this.__wbg_ptr);
341
+ return ret >>> 0;
342
+ }
343
+ /**
344
+ * @returns {number}
345
+ */
346
+ flat_line_ids_ptr() {
347
+ const ret = wasm$1.wasmpolygonresult_flat_line_ids_ptr(this.__wbg_ptr);
348
+ return ret >>> 0;
349
+ }
336
350
  /**
337
351
  * @returns {number}
338
352
  */
@@ -434,14 +448,17 @@ function polygonizeWithOptions$1(geojson_str, options_val) {
434
448
  * @param {Uint32Array} offsets
435
449
  * @param {number} stride
436
450
  * @param {any} options_val
451
+ * @param {Uint32Array | null} [line_ids]
437
452
  * @returns {WasmPolygonResult}
438
453
  */
439
- function polygonizeWithOptionsBuffer$1(coords, offsets, stride, options_val) {
454
+ function polygonizeWithOptionsBuffer$1(coords, offsets, stride, options_val, line_ids) {
440
455
  const ptr0 = passArrayF64ToWasm0$1(coords, wasm$1.__wbindgen_malloc);
441
456
  const len0 = WASM_VECTOR_LEN$1;
442
457
  const ptr1 = passArray32ToWasm0$1(offsets, wasm$1.__wbindgen_malloc);
443
458
  const len1 = WASM_VECTOR_LEN$1;
444
- const ret = wasm$1.polygonizeWithOptionsBuffer(ptr0, len0, ptr1, len1, stride, options_val);
459
+ var ptr2 = isLikeNone$1(line_ids) ? 0 : passArray32ToWasm0$1(line_ids, wasm$1.__wbindgen_malloc);
460
+ var len2 = WASM_VECTOR_LEN$1;
461
+ const ret = wasm$1.polygonizeWithOptionsBuffer(ptr0, len0, ptr1, len1, stride, options_val, ptr2, len2);
445
462
  if (ret[2]) {
446
463
  throw takeFromExternrefTable0$1(ret[1]);
447
464
  }
@@ -454,14 +471,17 @@ function polygonizeWithOptionsBuffer$1(coords, offsets, stride, options_val) {
454
471
  * @param {number} stride
455
472
  * @param {boolean} node_input
456
473
  * @param {number} snap_grid_size
474
+ * @param {Uint32Array | null} [line_ids]
457
475
  * @returns {WasmPolygonResult}
458
476
  */
459
- function polygonize_buffers$1(coords, offsets, stride, node_input, snap_grid_size) {
477
+ function polygonize_buffers$1(coords, offsets, stride, node_input, snap_grid_size, line_ids) {
460
478
  const ptr0 = passArrayF64ToWasm0$1(coords, wasm$1.__wbindgen_malloc);
461
479
  const len0 = WASM_VECTOR_LEN$1;
462
480
  const ptr1 = passArray32ToWasm0$1(offsets, wasm$1.__wbindgen_malloc);
463
481
  const len1 = WASM_VECTOR_LEN$1;
464
- const ret = wasm$1.polygonize_buffers(ptr0, len0, ptr1, len1, stride, node_input, snap_grid_size);
482
+ var ptr2 = isLikeNone$1(line_ids) ? 0 : passArray32ToWasm0$1(line_ids, wasm$1.__wbindgen_malloc);
483
+ var len2 = WASM_VECTOR_LEN$1;
484
+ const ret = wasm$1.polygonize_buffers(ptr0, len0, ptr1, len1, stride, node_input, snap_grid_size, ptr2, len2);
465
485
  if (ret[2]) {
466
486
  throw takeFromExternrefTable0$1(ret[1]);
467
487
  }
@@ -1098,6 +1118,20 @@ class WasmPolygonResult {
1098
1118
  const ret = wasm.wasmpolygonresult_ring_offsets_ptr(this.__wbg_ptr);
1099
1119
  return ret >>> 0;
1100
1120
  }
1121
+ /**
1122
+ * @returns {number}
1123
+ */
1124
+ flat_line_ids_len() {
1125
+ const ret = wasm.wasmpolygonresult_flat_line_ids_len(this.__wbg_ptr);
1126
+ return ret >>> 0;
1127
+ }
1128
+ /**
1129
+ * @returns {number}
1130
+ */
1131
+ flat_line_ids_ptr() {
1132
+ const ret = wasm.wasmpolygonresult_flat_line_ids_ptr(this.__wbg_ptr);
1133
+ return ret >>> 0;
1134
+ }
1101
1135
  /**
1102
1136
  * @returns {number}
1103
1137
  */
@@ -1199,14 +1233,17 @@ function polygonizeWithOptions(geojson_str, options_val) {
1199
1233
  * @param {Uint32Array} offsets
1200
1234
  * @param {number} stride
1201
1235
  * @param {any} options_val
1236
+ * @param {Uint32Array | null} [line_ids]
1202
1237
  * @returns {WasmPolygonResult}
1203
1238
  */
1204
- function polygonizeWithOptionsBuffer(coords, offsets, stride, options_val) {
1239
+ function polygonizeWithOptionsBuffer(coords, offsets, stride, options_val, line_ids) {
1205
1240
  const ptr0 = passArrayF64ToWasm0(coords, wasm.__wbindgen_malloc);
1206
1241
  const len0 = WASM_VECTOR_LEN;
1207
1242
  const ptr1 = passArray32ToWasm0(offsets, wasm.__wbindgen_malloc);
1208
1243
  const len1 = WASM_VECTOR_LEN;
1209
- const ret = wasm.polygonizeWithOptionsBuffer(ptr0, len0, ptr1, len1, stride, options_val);
1244
+ var ptr2 = isLikeNone(line_ids) ? 0 : passArray32ToWasm0(line_ids, wasm.__wbindgen_malloc);
1245
+ var len2 = WASM_VECTOR_LEN;
1246
+ const ret = wasm.polygonizeWithOptionsBuffer(ptr0, len0, ptr1, len1, stride, options_val, ptr2, len2);
1210
1247
  if (ret[2]) {
1211
1248
  throw takeFromExternrefTable0(ret[1]);
1212
1249
  }
@@ -1219,14 +1256,17 @@ function polygonizeWithOptionsBuffer(coords, offsets, stride, options_val) {
1219
1256
  * @param {number} stride
1220
1257
  * @param {boolean} node_input
1221
1258
  * @param {number} snap_grid_size
1259
+ * @param {Uint32Array | null} [line_ids]
1222
1260
  * @returns {WasmPolygonResult}
1223
1261
  */
1224
- function polygonize_buffers(coords, offsets, stride, node_input, snap_grid_size) {
1262
+ function polygonize_buffers(coords, offsets, stride, node_input, snap_grid_size, line_ids) {
1225
1263
  const ptr0 = passArrayF64ToWasm0(coords, wasm.__wbindgen_malloc);
1226
1264
  const len0 = WASM_VECTOR_LEN;
1227
1265
  const ptr1 = passArray32ToWasm0(offsets, wasm.__wbindgen_malloc);
1228
1266
  const len1 = WASM_VECTOR_LEN;
1229
- const ret = wasm.polygonize_buffers(ptr0, len0, ptr1, len1, stride, node_input, snap_grid_size);
1267
+ var ptr2 = isLikeNone(line_ids) ? 0 : passArray32ToWasm0(line_ids, wasm.__wbindgen_malloc);
1268
+ var len2 = WASM_VECTOR_LEN;
1269
+ const ret = wasm.polygonize_buffers(ptr0, len0, ptr1, len1, stride, node_input, snap_grid_size, ptr2, len2);
1230
1270
  if (ret[2]) {
1231
1271
  throw takeFromExternrefTable0(ret[1]);
1232
1272
  }
@@ -330,6 +330,20 @@ let WasmPolygonResult$1 = class WasmPolygonResult {
330
330
  const ret = wasm$1.wasmpolygonresult_ring_offsets_ptr(this.__wbg_ptr);
331
331
  return ret >>> 0;
332
332
  }
333
+ /**
334
+ * @returns {number}
335
+ */
336
+ flat_line_ids_len() {
337
+ const ret = wasm$1.wasmpolygonresult_flat_line_ids_len(this.__wbg_ptr);
338
+ return ret >>> 0;
339
+ }
340
+ /**
341
+ * @returns {number}
342
+ */
343
+ flat_line_ids_ptr() {
344
+ const ret = wasm$1.wasmpolygonresult_flat_line_ids_ptr(this.__wbg_ptr);
345
+ return ret >>> 0;
346
+ }
333
347
  /**
334
348
  * @returns {number}
335
349
  */
@@ -431,14 +445,17 @@ function polygonizeWithOptions$1(geojson_str, options_val) {
431
445
  * @param {Uint32Array} offsets
432
446
  * @param {number} stride
433
447
  * @param {any} options_val
448
+ * @param {Uint32Array | null} [line_ids]
434
449
  * @returns {WasmPolygonResult}
435
450
  */
436
- function polygonizeWithOptionsBuffer$1(coords, offsets, stride, options_val) {
451
+ function polygonizeWithOptionsBuffer$1(coords, offsets, stride, options_val, line_ids) {
437
452
  const ptr0 = passArrayF64ToWasm0$1(coords, wasm$1.__wbindgen_malloc);
438
453
  const len0 = WASM_VECTOR_LEN$1;
439
454
  const ptr1 = passArray32ToWasm0$1(offsets, wasm$1.__wbindgen_malloc);
440
455
  const len1 = WASM_VECTOR_LEN$1;
441
- const ret = wasm$1.polygonizeWithOptionsBuffer(ptr0, len0, ptr1, len1, stride, options_val);
456
+ var ptr2 = isLikeNone$1(line_ids) ? 0 : passArray32ToWasm0$1(line_ids, wasm$1.__wbindgen_malloc);
457
+ var len2 = WASM_VECTOR_LEN$1;
458
+ const ret = wasm$1.polygonizeWithOptionsBuffer(ptr0, len0, ptr1, len1, stride, options_val, ptr2, len2);
442
459
  if (ret[2]) {
443
460
  throw takeFromExternrefTable0$1(ret[1]);
444
461
  }
@@ -451,14 +468,17 @@ function polygonizeWithOptionsBuffer$1(coords, offsets, stride, options_val) {
451
468
  * @param {number} stride
452
469
  * @param {boolean} node_input
453
470
  * @param {number} snap_grid_size
471
+ * @param {Uint32Array | null} [line_ids]
454
472
  * @returns {WasmPolygonResult}
455
473
  */
456
- function polygonize_buffers$1(coords, offsets, stride, node_input, snap_grid_size) {
474
+ function polygonize_buffers$1(coords, offsets, stride, node_input, snap_grid_size, line_ids) {
457
475
  const ptr0 = passArrayF64ToWasm0$1(coords, wasm$1.__wbindgen_malloc);
458
476
  const len0 = WASM_VECTOR_LEN$1;
459
477
  const ptr1 = passArray32ToWasm0$1(offsets, wasm$1.__wbindgen_malloc);
460
478
  const len1 = WASM_VECTOR_LEN$1;
461
- const ret = wasm$1.polygonize_buffers(ptr0, len0, ptr1, len1, stride, node_input, snap_grid_size);
479
+ var ptr2 = isLikeNone$1(line_ids) ? 0 : passArray32ToWasm0$1(line_ids, wasm$1.__wbindgen_malloc);
480
+ var len2 = WASM_VECTOR_LEN$1;
481
+ const ret = wasm$1.polygonize_buffers(ptr0, len0, ptr1, len1, stride, node_input, snap_grid_size, ptr2, len2);
462
482
  if (ret[2]) {
463
483
  throw takeFromExternrefTable0$1(ret[1]);
464
484
  }
@@ -1095,6 +1115,20 @@ class WasmPolygonResult {
1095
1115
  const ret = wasm.wasmpolygonresult_ring_offsets_ptr(this.__wbg_ptr);
1096
1116
  return ret >>> 0;
1097
1117
  }
1118
+ /**
1119
+ * @returns {number}
1120
+ */
1121
+ flat_line_ids_len() {
1122
+ const ret = wasm.wasmpolygonresult_flat_line_ids_len(this.__wbg_ptr);
1123
+ return ret >>> 0;
1124
+ }
1125
+ /**
1126
+ * @returns {number}
1127
+ */
1128
+ flat_line_ids_ptr() {
1129
+ const ret = wasm.wasmpolygonresult_flat_line_ids_ptr(this.__wbg_ptr);
1130
+ return ret >>> 0;
1131
+ }
1098
1132
  /**
1099
1133
  * @returns {number}
1100
1134
  */
@@ -1196,14 +1230,17 @@ function polygonizeWithOptions(geojson_str, options_val) {
1196
1230
  * @param {Uint32Array} offsets
1197
1231
  * @param {number} stride
1198
1232
  * @param {any} options_val
1233
+ * @param {Uint32Array | null} [line_ids]
1199
1234
  * @returns {WasmPolygonResult}
1200
1235
  */
1201
- function polygonizeWithOptionsBuffer(coords, offsets, stride, options_val) {
1236
+ function polygonizeWithOptionsBuffer(coords, offsets, stride, options_val, line_ids) {
1202
1237
  const ptr0 = passArrayF64ToWasm0(coords, wasm.__wbindgen_malloc);
1203
1238
  const len0 = WASM_VECTOR_LEN;
1204
1239
  const ptr1 = passArray32ToWasm0(offsets, wasm.__wbindgen_malloc);
1205
1240
  const len1 = WASM_VECTOR_LEN;
1206
- const ret = wasm.polygonizeWithOptionsBuffer(ptr0, len0, ptr1, len1, stride, options_val);
1241
+ var ptr2 = isLikeNone(line_ids) ? 0 : passArray32ToWasm0(line_ids, wasm.__wbindgen_malloc);
1242
+ var len2 = WASM_VECTOR_LEN;
1243
+ const ret = wasm.polygonizeWithOptionsBuffer(ptr0, len0, ptr1, len1, stride, options_val, ptr2, len2);
1207
1244
  if (ret[2]) {
1208
1245
  throw takeFromExternrefTable0(ret[1]);
1209
1246
  }
@@ -1216,14 +1253,17 @@ function polygonizeWithOptionsBuffer(coords, offsets, stride, options_val) {
1216
1253
  * @param {number} stride
1217
1254
  * @param {boolean} node_input
1218
1255
  * @param {number} snap_grid_size
1256
+ * @param {Uint32Array | null} [line_ids]
1219
1257
  * @returns {WasmPolygonResult}
1220
1258
  */
1221
- function polygonize_buffers(coords, offsets, stride, node_input, snap_grid_size) {
1259
+ function polygonize_buffers(coords, offsets, stride, node_input, snap_grid_size, line_ids) {
1222
1260
  const ptr0 = passArrayF64ToWasm0(coords, wasm.__wbindgen_malloc);
1223
1261
  const len0 = WASM_VECTOR_LEN;
1224
1262
  const ptr1 = passArray32ToWasm0(offsets, wasm.__wbindgen_malloc);
1225
1263
  const len1 = WASM_VECTOR_LEN;
1226
- const ret = wasm.polygonize_buffers(ptr0, len0, ptr1, len1, stride, node_input, snap_grid_size);
1264
+ var ptr2 = isLikeNone(line_ids) ? 0 : passArray32ToWasm0(line_ids, wasm.__wbindgen_malloc);
1265
+ var len2 = WASM_VECTOR_LEN;
1266
+ const ret = wasm.polygonize_buffers(ptr0, len0, ptr1, len1, stride, node_input, snap_grid_size, ptr2, len2);
1227
1267
  if (ret[2]) {
1228
1268
  throw takeFromExternrefTable0(ret[1]);
1229
1269
  }