geo-polygonize 0.12.1 → 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.
- package/dist/geo_polygonize.wasm +0 -0
- package/dist/geo_polygonize_simd.wasm +0 -0
- package/dist/slim/cjs/index_slim.js +48 -8
- package/dist/slim/es/index_slim.js +48 -8
- package/dist/standard/cjs/index.js +26 -6
- package/dist/standard/es/index.js +26 -6
- package/dist/threads/es/index.js +24 -4
- package/package.json +1 -1
package/dist/threads/es/index.js
CHANGED
|
@@ -448,6 +448,20 @@ class WasmPolygonResult {
|
|
|
448
448
|
const ret = wasm.wasmpolygonresult_ring_offsets_ptr(this.__wbg_ptr);
|
|
449
449
|
return ret >>> 0;
|
|
450
450
|
}
|
|
451
|
+
/**
|
|
452
|
+
* @returns {number}
|
|
453
|
+
*/
|
|
454
|
+
flat_line_ids_len() {
|
|
455
|
+
const ret = wasm.wasmpolygonresult_flat_line_ids_len(this.__wbg_ptr);
|
|
456
|
+
return ret >>> 0;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* @returns {number}
|
|
460
|
+
*/
|
|
461
|
+
flat_line_ids_ptr() {
|
|
462
|
+
const ret = wasm.wasmpolygonresult_flat_line_ids_ptr(this.__wbg_ptr);
|
|
463
|
+
return ret >>> 0;
|
|
464
|
+
}
|
|
451
465
|
/**
|
|
452
466
|
* @returns {number}
|
|
453
467
|
*/
|
|
@@ -558,14 +572,17 @@ function polygonizeWithOptions(geojson_str, options_val) {
|
|
|
558
572
|
* @param {Uint32Array} offsets
|
|
559
573
|
* @param {number} stride
|
|
560
574
|
* @param {any} options_val
|
|
575
|
+
* @param {Uint32Array | null} [line_ids]
|
|
561
576
|
* @returns {WasmPolygonResult}
|
|
562
577
|
*/
|
|
563
|
-
function polygonizeWithOptionsBuffer(coords, offsets, stride, options_val) {
|
|
578
|
+
function polygonizeWithOptionsBuffer(coords, offsets, stride, options_val, line_ids) {
|
|
564
579
|
const ptr0 = passArrayF64ToWasm0(coords, wasm.__wbindgen_malloc);
|
|
565
580
|
const len0 = WASM_VECTOR_LEN;
|
|
566
581
|
const ptr1 = passArray32ToWasm0(offsets, wasm.__wbindgen_malloc);
|
|
567
582
|
const len1 = WASM_VECTOR_LEN;
|
|
568
|
-
|
|
583
|
+
var ptr2 = isLikeNone(line_ids) ? 0 : passArray32ToWasm0(line_ids, wasm.__wbindgen_malloc);
|
|
584
|
+
var len2 = WASM_VECTOR_LEN;
|
|
585
|
+
const ret = wasm.polygonizeWithOptionsBuffer(ptr0, len0, ptr1, len1, stride, options_val, ptr2, len2);
|
|
569
586
|
if (ret[2]) {
|
|
570
587
|
throw takeFromExternrefTable0(ret[1]);
|
|
571
588
|
}
|
|
@@ -578,14 +595,17 @@ function polygonizeWithOptionsBuffer(coords, offsets, stride, options_val) {
|
|
|
578
595
|
* @param {number} stride
|
|
579
596
|
* @param {boolean} node_input
|
|
580
597
|
* @param {number} snap_grid_size
|
|
598
|
+
* @param {Uint32Array | null} [line_ids]
|
|
581
599
|
* @returns {WasmPolygonResult}
|
|
582
600
|
*/
|
|
583
|
-
function polygonize_buffers(coords, offsets, stride, node_input, snap_grid_size) {
|
|
601
|
+
function polygonize_buffers(coords, offsets, stride, node_input, snap_grid_size, line_ids) {
|
|
584
602
|
const ptr0 = passArrayF64ToWasm0(coords, wasm.__wbindgen_malloc);
|
|
585
603
|
const len0 = WASM_VECTOR_LEN;
|
|
586
604
|
const ptr1 = passArray32ToWasm0(offsets, wasm.__wbindgen_malloc);
|
|
587
605
|
const len1 = WASM_VECTOR_LEN;
|
|
588
|
-
|
|
606
|
+
var ptr2 = isLikeNone(line_ids) ? 0 : passArray32ToWasm0(line_ids, wasm.__wbindgen_malloc);
|
|
607
|
+
var len2 = WASM_VECTOR_LEN;
|
|
608
|
+
const ret = wasm.polygonize_buffers(ptr0, len0, ptr1, len1, stride, node_input, snap_grid_size, ptr2, len2);
|
|
589
609
|
if (ret[2]) {
|
|
590
610
|
throw takeFromExternrefTable0(ret[1]);
|
|
591
611
|
}
|