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.
- package/dist/geo_polygonize.wasm +0 -0
- package/dist/geo_polygonize_simd.wasm +0 -0
- package/dist/slim/cjs/index_slim.js +74 -10
- package/dist/slim/es/index_slim.js +74 -10
- package/dist/standard/cjs/index.js +39 -7
- package/dist/standard/es/index.js +39 -7
- package/dist/threads/es/index.js +37 -5
- package/package.json +1 -1
package/dist/threads/es/index.js
CHANGED
|
@@ -430,10 +430,17 @@ class WasmPolygonResult {
|
|
|
430
430
|
/**
|
|
431
431
|
* @returns {any}
|
|
432
432
|
*/
|
|
433
|
-
provenance() {
|
|
433
|
+
get provenance() {
|
|
434
434
|
const ret = wasm.wasmpolygonresult_provenance(this.__wbg_ptr);
|
|
435
435
|
return ret;
|
|
436
436
|
}
|
|
437
|
+
/**
|
|
438
|
+
* @returns {any}
|
|
439
|
+
*/
|
|
440
|
+
get diagnostics() {
|
|
441
|
+
const ret = wasm.wasmpolygonresult_diagnostics(this.__wbg_ptr);
|
|
442
|
+
return ret;
|
|
443
|
+
}
|
|
437
444
|
/**
|
|
438
445
|
* @returns {number}
|
|
439
446
|
*/
|
|
@@ -448,6 +455,20 @@ class WasmPolygonResult {
|
|
|
448
455
|
const ret = wasm.wasmpolygonresult_ring_offsets_ptr(this.__wbg_ptr);
|
|
449
456
|
return ret >>> 0;
|
|
450
457
|
}
|
|
458
|
+
/**
|
|
459
|
+
* @returns {number}
|
|
460
|
+
*/
|
|
461
|
+
flat_line_ids_len() {
|
|
462
|
+
const ret = wasm.wasmpolygonresult_flat_line_ids_len(this.__wbg_ptr);
|
|
463
|
+
return ret >>> 0;
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* @returns {number}
|
|
467
|
+
*/
|
|
468
|
+
flat_line_ids_ptr() {
|
|
469
|
+
const ret = wasm.wasmpolygonresult_flat_line_ids_ptr(this.__wbg_ptr);
|
|
470
|
+
return ret >>> 0;
|
|
471
|
+
}
|
|
451
472
|
/**
|
|
452
473
|
* @returns {number}
|
|
453
474
|
*/
|
|
@@ -558,14 +579,17 @@ function polygonizeWithOptions(geojson_str, options_val) {
|
|
|
558
579
|
* @param {Uint32Array} offsets
|
|
559
580
|
* @param {number} stride
|
|
560
581
|
* @param {any} options_val
|
|
582
|
+
* @param {Uint32Array | null} [line_ids]
|
|
561
583
|
* @returns {WasmPolygonResult}
|
|
562
584
|
*/
|
|
563
|
-
function polygonizeWithOptionsBuffer(coords, offsets, stride, options_val) {
|
|
585
|
+
function polygonizeWithOptionsBuffer(coords, offsets, stride, options_val, line_ids) {
|
|
564
586
|
const ptr0 = passArrayF64ToWasm0(coords, wasm.__wbindgen_malloc);
|
|
565
587
|
const len0 = WASM_VECTOR_LEN;
|
|
566
588
|
const ptr1 = passArray32ToWasm0(offsets, wasm.__wbindgen_malloc);
|
|
567
589
|
const len1 = WASM_VECTOR_LEN;
|
|
568
|
-
|
|
590
|
+
var ptr2 = isLikeNone(line_ids) ? 0 : passArray32ToWasm0(line_ids, wasm.__wbindgen_malloc);
|
|
591
|
+
var len2 = WASM_VECTOR_LEN;
|
|
592
|
+
const ret = wasm.polygonizeWithOptionsBuffer(ptr0, len0, ptr1, len1, stride, options_val, ptr2, len2);
|
|
569
593
|
if (ret[2]) {
|
|
570
594
|
throw takeFromExternrefTable0(ret[1]);
|
|
571
595
|
}
|
|
@@ -578,14 +602,17 @@ function polygonizeWithOptionsBuffer(coords, offsets, stride, options_val) {
|
|
|
578
602
|
* @param {number} stride
|
|
579
603
|
* @param {boolean} node_input
|
|
580
604
|
* @param {number} snap_grid_size
|
|
605
|
+
* @param {Uint32Array | null} [line_ids]
|
|
581
606
|
* @returns {WasmPolygonResult}
|
|
582
607
|
*/
|
|
583
|
-
function polygonize_buffers(coords, offsets, stride, node_input, snap_grid_size) {
|
|
608
|
+
function polygonize_buffers(coords, offsets, stride, node_input, snap_grid_size, line_ids) {
|
|
584
609
|
const ptr0 = passArrayF64ToWasm0(coords, wasm.__wbindgen_malloc);
|
|
585
610
|
const len0 = WASM_VECTOR_LEN;
|
|
586
611
|
const ptr1 = passArray32ToWasm0(offsets, wasm.__wbindgen_malloc);
|
|
587
612
|
const len1 = WASM_VECTOR_LEN;
|
|
588
|
-
|
|
613
|
+
var ptr2 = isLikeNone(line_ids) ? 0 : passArray32ToWasm0(line_ids, wasm.__wbindgen_malloc);
|
|
614
|
+
var len2 = WASM_VECTOR_LEN;
|
|
615
|
+
const ret = wasm.polygonize_buffers(ptr0, len0, ptr1, len1, stride, node_input, snap_grid_size, ptr2, len2);
|
|
589
616
|
if (ret[2]) {
|
|
590
617
|
throw takeFromExternrefTable0(ret[1]);
|
|
591
618
|
}
|
|
@@ -890,6 +917,11 @@ function __wbg_get_imports() {
|
|
|
890
917
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
891
918
|
return ret;
|
|
892
919
|
};
|
|
920
|
+
imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
921
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
922
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
923
|
+
return ret;
|
|
924
|
+
};
|
|
893
925
|
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
894
926
|
// Cast intrinsic for `F64 -> Externref`.
|
|
895
927
|
const ret = arg0;
|