geo-polygonize 0.40.1 → 0.41.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.
Files changed (62) hide show
  1. package/README.md +14 -8
  2. package/dist/geo_polygonize.wasm +0 -0
  3. package/dist/geo_polygonize_simd.wasm +0 -0
  4. package/dist/slim/cjs/bindings/NodingGuarantee.d.ts +1 -0
  5. package/dist/slim/cjs/bindings/NodingOptions.d.ts +2 -0
  6. package/dist/slim/cjs/bindings/PolygonizerOptions.d.ts +4 -6
  7. package/dist/slim/cjs/bindings/PrecisionModel.d.ts +9 -0
  8. package/dist/slim/cjs/index.d.ts +2 -0
  9. package/dist/slim/cjs/index_slim.d.ts +2 -0
  10. package/dist/slim/cjs/index_slim.js +86 -3
  11. package/dist/slim/cjs/index_threads.d.ts +2 -0
  12. package/dist/slim/es/bindings/NodingGuarantee.d.ts +1 -0
  13. package/dist/slim/es/bindings/NodingOptions.d.ts +2 -0
  14. package/dist/slim/es/bindings/PolygonizerOptions.d.ts +4 -6
  15. package/dist/slim/es/bindings/PrecisionModel.d.ts +9 -0
  16. package/dist/slim/es/index.d.ts +2 -0
  17. package/dist/slim/es/index_slim.d.ts +2 -0
  18. package/dist/slim/es/index_slim.js +86 -3
  19. package/dist/slim/es/index_threads.d.ts +2 -0
  20. package/dist/slim/pkg-scalar/geo_polygonize.d.ts +2 -1
  21. package/dist/slim/pkg-scalar/geo_polygonize_bg.wasm.d.ts +2 -1
  22. package/dist/slim/pkg-wrapper/bindings/NodingGuarantee.d.ts +1 -0
  23. package/dist/slim/pkg-wrapper/bindings/NodingOptions.d.ts +2 -0
  24. package/dist/slim/pkg-wrapper/bindings/PolygonizerOptions.d.ts +4 -6
  25. package/dist/slim/pkg-wrapper/bindings/PrecisionModel.d.ts +9 -0
  26. package/dist/standard/cjs/bindings/NodingGuarantee.d.ts +1 -0
  27. package/dist/standard/cjs/bindings/NodingOptions.d.ts +2 -0
  28. package/dist/standard/cjs/bindings/PolygonizerOptions.d.ts +4 -6
  29. package/dist/standard/cjs/bindings/PrecisionModel.d.ts +9 -0
  30. package/dist/standard/cjs/index.d.ts +2 -0
  31. package/dist/standard/cjs/index.js +88 -5
  32. package/dist/standard/cjs/index_slim.d.ts +2 -0
  33. package/dist/standard/cjs/index_threads.d.ts +2 -0
  34. package/dist/standard/es/bindings/NodingGuarantee.d.ts +1 -0
  35. package/dist/standard/es/bindings/NodingOptions.d.ts +2 -0
  36. package/dist/standard/es/bindings/PolygonizerOptions.d.ts +4 -6
  37. package/dist/standard/es/bindings/PrecisionModel.d.ts +9 -0
  38. package/dist/standard/es/index.d.ts +2 -0
  39. package/dist/standard/es/index.js +88 -5
  40. package/dist/standard/es/index_slim.d.ts +2 -0
  41. package/dist/standard/es/index_threads.d.ts +2 -0
  42. package/dist/standard/pkg-scalar/geo_polygonize.d.ts +2 -1
  43. package/dist/standard/pkg-scalar/geo_polygonize_bg.wasm.d.ts +2 -1
  44. package/dist/standard/pkg-wrapper/bindings/NodingGuarantee.d.ts +1 -0
  45. package/dist/standard/pkg-wrapper/bindings/NodingOptions.d.ts +2 -0
  46. package/dist/standard/pkg-wrapper/bindings/PolygonizerOptions.d.ts +4 -6
  47. package/dist/standard/pkg-wrapper/bindings/PrecisionModel.d.ts +9 -0
  48. package/dist/threads/es/bindings/NodingGuarantee.d.ts +1 -0
  49. package/dist/threads/es/bindings/NodingOptions.d.ts +2 -0
  50. package/dist/threads/es/bindings/PolygonizerOptions.d.ts +4 -6
  51. package/dist/threads/es/bindings/PrecisionModel.d.ts +9 -0
  52. package/dist/threads/es/index.d.ts +2 -0
  53. package/dist/threads/es/index.js +86 -3
  54. package/dist/threads/es/index_slim.d.ts +2 -0
  55. package/dist/threads/es/index_threads.d.ts +2 -0
  56. package/dist/threads/pkg-threads/geo_polygonize.d.ts +2 -1
  57. package/dist/threads/pkg-threads/geo_polygonize_bg.wasm.d.ts +2 -1
  58. package/dist/threads/pkg-wrapper/bindings/NodingGuarantee.d.ts +1 -0
  59. package/dist/threads/pkg-wrapper/bindings/NodingOptions.d.ts +2 -0
  60. package/dist/threads/pkg-wrapper/bindings/PolygonizerOptions.d.ts +4 -6
  61. package/dist/threads/pkg-wrapper/bindings/PrecisionModel.d.ts +9 -0
  62. package/package.json +1 -1
package/README.md CHANGED
@@ -44,21 +44,27 @@ fn main() {
44
44
  }
45
45
  ```
46
46
 
47
- ### Choosing `node_input` and `snap_grid_size`
47
+ ### Choosing noding and precision
48
48
 
49
49
  Polygonization quality is heavily influenced by input noding strategy.
50
50
 
51
51
  - **`node_input = false`** (default): Fastest path. Use this when your input linework is already noded (all intersections are explicit vertices).
52
52
  - **`node_input = true`**: Enables unchecked iterative grid noding. Use this for real-world datasets that may contain slight misalignments, overlaps, or self-intersections, and validate outputs when correctness must be certified.
53
- - **`snap_grid_size`** controls how aggressively coordinates are snapped during robust noding:
54
- - Start with `1e-10` for high-precision projected data.
55
- - Increase to `1e-8` or `1e-6` when near-duplicate vertices prevent clean topology.
56
- - Avoid very large values unless your coordinate units are coarse; oversnapping can collapse narrow features.
53
+ - **`PrecisionModel::Floating`** (default) preserves input coordinates and uses floating-point intersections.
54
+ - **`PrecisionModel::FixedGrid { grid_size }`** rounds topology coordinates to an explicit positive grid, even when input noding is disabled. Choose the grid in the units of your data; oversnapping can collapse narrow features.
57
55
 
58
56
  Practical workflow:
59
57
  1. Run with `node_input = false` first on trusted data.
60
58
  2. If you observe missing polygons, sliver artifacts, or unresolved intersections, enable `node_input`.
61
- 3. Tune `snap_grid_size` upward incrementally until topology stabilizes.
59
+ 3. Use a fixed precision model only when your application has an explicit coordinate grid contract.
60
+
61
+ Canonical options now use `precision_model` instead of `snap_grid_size`.
62
+ Legacy positional Python, Wasm, and C APIs still translate their grid argument
63
+ when noding is enabled and ignore it on the non-noding fast path.
64
+
65
+ Set `options.noding.guarantee` to `NodingGuarantee::Validate` to run an
66
+ independent full-noding check before graph construction. Validation reports the
67
+ first pair with an interior intersection or unnormalized collinear overlap.
62
68
 
63
69
  ### Output semantics
64
70
 
@@ -139,8 +145,8 @@ The default return shape is a stable dictionary with `polygons` as
139
145
  `SimplePolygon` values. Use `return_polygons=True` only when you want Shapely
140
146
  `Polygon` objects.
141
147
 
142
- `SnapStrategy::Grid` keeps topology and output coordinates on the configured
143
- precision grid. The CFB profile uses `GeosCompat`: the grid establishes robust
148
+ `SnapStrategy::Grid` keeps topology and output coordinates on a configured
149
+ fixed precision grid. The CFB profile uses `GeosCompat`: the grid establishes robust
144
150
  topology, then output nodes regain deterministic source coordinates to better
145
151
  match Shapely `snap` plus full-precision noding. It is not `set_precision`
146
152
  emulation, and exact parity is not guaranteed for many-to-one snaps.
Binary file
Binary file
@@ -0,0 +1 @@
1
+ export type NodingGuarantee = "Unchecked" | "Validate";
@@ -1,4 +1,6 @@
1
1
  import type { NodingBackend } from "./NodingBackend";
2
+ import type { NodingGuarantee } from "./NodingGuarantee";
2
3
  export type NodingOptions = {
3
4
  backend: NodingBackend;
5
+ guarantee: NodingGuarantee;
4
6
  };
@@ -3,6 +3,7 @@ import type { DeterminismOptions } from "./DeterminismOptions";
3
3
  import type { DiagnosticsOptions } from "./DiagnosticsOptions";
4
4
  import type { NodingOptions } from "./NodingOptions";
5
5
  import type { OutputFilterOptions } from "./OutputFilterOptions";
6
+ import type { PrecisionModel } from "./PrecisionModel";
6
7
  import type { ProvenanceOptions } from "./ProvenanceOptions";
7
8
  import type { SnapStrategy } from "./SnapStrategy";
8
9
  /**
@@ -23,14 +24,11 @@ export type PolygonizerOptions = {
23
24
  */
24
25
  node_input: boolean;
25
26
  /**
26
- * The snapping grid size used for vertex deduplication and noding operations.
27
+ * Coordinate precision used for topology and noding.
27
28
  *
28
- * Vertices falling within the same grid cell are coalesced. A size of `0.0`
29
- * indicates exact floating-point evaluation without grid snapping.
30
- *
31
- * Default: `1e-10`
29
+ * Default: `PrecisionModel::Floating`
32
30
  */
33
- snap_grid_size: number;
31
+ precision_model: PrecisionModel;
34
32
  /**
35
33
  * Snap input segments to nearby vertices from exact-noded input linework before grid noding.
36
34
  *
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Coordinate precision used by the topology pipeline.
3
+ */
4
+ export type PrecisionModel = {
5
+ "type": "floating";
6
+ } | {
7
+ "type": "fixed_grid";
8
+ grid_size: number;
9
+ };
@@ -5,8 +5,10 @@ export * from "./bindings/ContainmentOptions";
5
5
  export * from "./bindings/DeterminismOptions";
6
6
  export * from "./bindings/DiagnosticsOptions";
7
7
  export * from "./bindings/NodingBackend";
8
+ export * from "./bindings/NodingGuarantee";
8
9
  export * from "./bindings/NodingOptions";
9
10
  export * from "./bindings/OutputFilterOptions";
11
+ export * from "./bindings/PrecisionModel";
10
12
  export * from "./bindings/ProvenanceOptions";
11
13
  export * from "./bindings/SnapStrategy";
12
14
  export * from "./bindings/TileOwnershipPolicy";
@@ -5,8 +5,10 @@ export * from "./bindings/ContainmentOptions";
5
5
  export * from "./bindings/DeterminismOptions";
6
6
  export * from "./bindings/DiagnosticsOptions";
7
7
  export * from "./bindings/NodingBackend";
8
+ export * from "./bindings/NodingGuarantee";
8
9
  export * from "./bindings/NodingOptions";
9
10
  export * from "./bindings/OutputFilterOptions";
11
+ export * from "./bindings/PrecisionModel";
10
12
  export * from "./bindings/ProvenanceOptions";
11
13
  export * from "./bindings/SnapStrategy";
12
14
  export * from "./bindings/TileOwnershipPolicy";
@@ -347,6 +347,12 @@ function __wbg_get_imports() {
347
347
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
348
348
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
349
349
  },
350
+ __wbg___wbindgen_bigint_get_as_i64_447a76b5c6ef7bda: function(arg0, arg1) {
351
+ const v = arg1;
352
+ const ret = typeof(v) === 'bigint' ? v : undefined;
353
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
354
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
355
+ },
350
356
  __wbg___wbindgen_boolean_get_c0f3f60bac5a78d1: function(arg0) {
351
357
  const v = arg0;
352
358
  const ret = typeof(v) === 'boolean' ? v : undefined;
@@ -363,6 +369,14 @@ function __wbg_get_imports() {
363
369
  const ret = arg0 in arg1;
364
370
  return ret;
365
371
  },
372
+ __wbg___wbindgen_is_bigint_e2141d4f045b7eda: function(arg0) {
373
+ const ret = typeof(arg0) === 'bigint';
374
+ return ret;
375
+ },
376
+ __wbg___wbindgen_is_function_3c846841762788c1: function(arg0) {
377
+ const ret = typeof(arg0) === 'function';
378
+ return ret;
379
+ },
366
380
  __wbg___wbindgen_is_object_781bc9f159099513: function(arg0) {
367
381
  const val = arg0;
368
382
  const ret = typeof(val) === 'object' && val !== null;
@@ -376,6 +390,10 @@ function __wbg_get_imports() {
376
390
  const ret = arg0 === undefined;
377
391
  return ret;
378
392
  },
393
+ __wbg___wbindgen_jsval_eq_ee31bfad3e536463: function(arg0, arg1) {
394
+ const ret = arg0 === arg1;
395
+ return ret;
396
+ },
379
397
  __wbg___wbindgen_jsval_loose_eq_5bcc3bed3c69e72b: function(arg0, arg1) {
380
398
  const ret = arg0 == arg1;
381
399
  return ret;
@@ -397,6 +415,14 @@ function __wbg_get_imports() {
397
415
  __wbg___wbindgen_throw_6ddd609b62940d55: function(arg0, arg1) {
398
416
  throw new Error(getStringFromWasm0(arg0, arg1));
399
417
  },
418
+ __wbg_call_e133b57c9155d22c: function() { return handleError(function (arg0, arg1) {
419
+ const ret = arg0.call(arg1);
420
+ return ret;
421
+ }, arguments); },
422
+ __wbg_done_08ce71ee07e3bd17: function(arg0) {
423
+ const ret = arg0.done;
424
+ return ret;
425
+ },
400
426
  __wbg_entries_e8a20ff8c9757101: function(arg0) {
401
427
  const ret = Object.entries(arg0);
402
428
  return ret;
@@ -412,10 +438,18 @@ function __wbg_get_imports() {
412
438
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
413
439
  }
414
440
  },
441
+ __wbg_get_326e41e095fb2575: function() { return handleError(function (arg0, arg1) {
442
+ const ret = Reflect.get(arg0, arg1);
443
+ return ret;
444
+ }, arguments); },
415
445
  __wbg_get_a8ee5c45dabc1b3b: function(arg0, arg1) {
416
446
  const ret = arg0[arg1 >>> 0];
417
447
  return ret;
418
448
  },
449
+ __wbg_get_unchecked_329cfe50afab7352: function(arg0, arg1) {
450
+ const ret = arg0[arg1 >>> 0];
451
+ return ret;
452
+ },
419
453
  __wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
420
454
  const ret = arg0[arg1];
421
455
  return ret;
@@ -430,6 +464,16 @@ function __wbg_get_imports() {
430
464
  const ret = result;
431
465
  return ret;
432
466
  },
467
+ __wbg_instanceof_Map_f194b366846aca0c: function(arg0) {
468
+ let result;
469
+ try {
470
+ result = arg0 instanceof Map;
471
+ } catch (_) {
472
+ result = false;
473
+ }
474
+ const ret = result;
475
+ return ret;
476
+ },
433
477
  __wbg_instanceof_Uint8Array_740438561a5b956d: function(arg0) {
434
478
  let result;
435
479
  try {
@@ -440,6 +484,18 @@ function __wbg_get_imports() {
440
484
  const ret = result;
441
485
  return ret;
442
486
  },
487
+ __wbg_isArray_33b91feb269ff46e: function(arg0) {
488
+ const ret = Array.isArray(arg0);
489
+ return ret;
490
+ },
491
+ __wbg_isSafeInteger_ecd6a7f9c3e053cd: function(arg0) {
492
+ const ret = Number.isSafeInteger(arg0);
493
+ return ret;
494
+ },
495
+ __wbg_iterator_d8f549ec8fb061b1: function() {
496
+ const ret = Symbol.iterator;
497
+ return ret;
498
+ },
443
499
  __wbg_length_b3416cf66a5452c8: function(arg0) {
444
500
  const ret = arg0.length;
445
501
  return ret;
@@ -464,6 +520,14 @@ function __wbg_get_imports() {
464
520
  const ret = new Object();
465
521
  return ret;
466
522
  },
523
+ __wbg_next_11b99ee6237339e3: function() { return handleError(function (arg0) {
524
+ const ret = arg0.next();
525
+ return ret;
526
+ }, arguments); },
527
+ __wbg_next_e01a967809d1aa68: function(arg0) {
528
+ const ret = arg0.next;
529
+ return ret;
530
+ },
467
531
  __wbg_now_16f0c993d5dd6c27: function() {
468
532
  const ret = Date.now();
469
533
  return ret;
@@ -512,17 +576,26 @@ function __wbg_get_imports() {
512
576
  const ret = typeof window === 'undefined' ? null : window;
513
577
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
514
578
  },
579
+ __wbg_value_21fc78aab0322612: function(arg0) {
580
+ const ret = arg0.value;
581
+ return ret;
582
+ },
515
583
  __wbindgen_cast_0000000000000001: function(arg0) {
516
584
  // Cast intrinsic for `F64 -> Externref`.
517
585
  const ret = arg0;
518
586
  return ret;
519
587
  },
520
- __wbindgen_cast_0000000000000002: function(arg0, arg1) {
588
+ __wbindgen_cast_0000000000000002: function(arg0) {
589
+ // Cast intrinsic for `I64 -> Externref`.
590
+ const ret = arg0;
591
+ return ret;
592
+ },
593
+ __wbindgen_cast_0000000000000003: function(arg0, arg1) {
521
594
  // Cast intrinsic for `Ref(String) -> Externref`.
522
595
  const ret = getStringFromWasm0(arg0, arg1);
523
596
  return ret;
524
597
  },
525
- __wbindgen_cast_0000000000000003: function(arg0) {
598
+ __wbindgen_cast_0000000000000004: function(arg0) {
526
599
  // Cast intrinsic for `U64 -> Externref`.
527
600
  const ret = BigInt.asUintN(64, arg0);
528
601
  return ret;
@@ -663,6 +736,15 @@ function getUint8ArrayMemory0() {
663
736
  return cachedUint8ArrayMemory0;
664
737
  }
665
738
 
739
+ function handleError(f, args) {
740
+ try {
741
+ return f.apply(this, args);
742
+ } catch (e) {
743
+ const idx = addToExternrefTable0(e);
744
+ wasm.__wbindgen_exn_store(idx);
745
+ }
746
+ }
747
+
666
748
  function isLikeNone(x) {
667
749
  return x === undefined || x === null;
668
750
  }
@@ -868,12 +950,13 @@ var scalarExports = /*#__PURE__*/Object.freeze({
868
950
 
869
951
  const cfbRobustOptions = {
870
952
  node_input: true,
871
- snap_grid_size: 0.1,
953
+ precision_model: { type: "fixed_grid", grid_size: 0.1 },
872
954
  pre_snap_tolerance: 0.5,
873
955
  extract_only_polygonal: false,
874
956
  snap_strategy: "GeosCompat",
875
957
  noding: {
876
958
  backend: "Snap",
959
+ guarantee: "Unchecked",
877
960
  },
878
961
  containment: {
879
962
  touch_policy: "AllowPointTouchDisallowEdgeShare",
@@ -5,8 +5,10 @@ export * from "./bindings/ContainmentOptions";
5
5
  export * from "./bindings/DeterminismOptions";
6
6
  export * from "./bindings/DiagnosticsOptions";
7
7
  export * from "./bindings/NodingBackend";
8
+ export * from "./bindings/NodingGuarantee";
8
9
  export * from "./bindings/NodingOptions";
9
10
  export * from "./bindings/OutputFilterOptions";
11
+ export * from "./bindings/PrecisionModel";
10
12
  export * from "./bindings/ProvenanceOptions";
11
13
  export * from "./bindings/SnapStrategy";
12
14
  export * from "./bindings/TileOwnershipPolicy";
@@ -0,0 +1 @@
1
+ export type NodingGuarantee = "Unchecked" | "Validate";
@@ -1,4 +1,6 @@
1
1
  import type { NodingBackend } from "./NodingBackend";
2
+ import type { NodingGuarantee } from "./NodingGuarantee";
2
3
  export type NodingOptions = {
3
4
  backend: NodingBackend;
5
+ guarantee: NodingGuarantee;
4
6
  };
@@ -3,6 +3,7 @@ import type { DeterminismOptions } from "./DeterminismOptions";
3
3
  import type { DiagnosticsOptions } from "./DiagnosticsOptions";
4
4
  import type { NodingOptions } from "./NodingOptions";
5
5
  import type { OutputFilterOptions } from "./OutputFilterOptions";
6
+ import type { PrecisionModel } from "./PrecisionModel";
6
7
  import type { ProvenanceOptions } from "./ProvenanceOptions";
7
8
  import type { SnapStrategy } from "./SnapStrategy";
8
9
  /**
@@ -23,14 +24,11 @@ export type PolygonizerOptions = {
23
24
  */
24
25
  node_input: boolean;
25
26
  /**
26
- * The snapping grid size used for vertex deduplication and noding operations.
27
+ * Coordinate precision used for topology and noding.
27
28
  *
28
- * Vertices falling within the same grid cell are coalesced. A size of `0.0`
29
- * indicates exact floating-point evaluation without grid snapping.
30
- *
31
- * Default: `1e-10`
29
+ * Default: `PrecisionModel::Floating`
32
30
  */
33
- snap_grid_size: number;
31
+ precision_model: PrecisionModel;
34
32
  /**
35
33
  * Snap input segments to nearby vertices from exact-noded input linework before grid noding.
36
34
  *
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Coordinate precision used by the topology pipeline.
3
+ */
4
+ export type PrecisionModel = {
5
+ "type": "floating";
6
+ } | {
7
+ "type": "fixed_grid";
8
+ grid_size: number;
9
+ };
@@ -5,8 +5,10 @@ export * from "./bindings/ContainmentOptions";
5
5
  export * from "./bindings/DeterminismOptions";
6
6
  export * from "./bindings/DiagnosticsOptions";
7
7
  export * from "./bindings/NodingBackend";
8
+ export * from "./bindings/NodingGuarantee";
8
9
  export * from "./bindings/NodingOptions";
9
10
  export * from "./bindings/OutputFilterOptions";
11
+ export * from "./bindings/PrecisionModel";
10
12
  export * from "./bindings/ProvenanceOptions";
11
13
  export * from "./bindings/SnapStrategy";
12
14
  export * from "./bindings/TileOwnershipPolicy";
@@ -5,8 +5,10 @@ export * from "./bindings/ContainmentOptions";
5
5
  export * from "./bindings/DeterminismOptions";
6
6
  export * from "./bindings/DiagnosticsOptions";
7
7
  export * from "./bindings/NodingBackend";
8
+ export * from "./bindings/NodingGuarantee";
8
9
  export * from "./bindings/NodingOptions";
9
10
  export * from "./bindings/OutputFilterOptions";
11
+ export * from "./bindings/PrecisionModel";
10
12
  export * from "./bindings/ProvenanceOptions";
11
13
  export * from "./bindings/SnapStrategy";
12
14
  export * from "./bindings/TileOwnershipPolicy";
@@ -344,6 +344,12 @@ function __wbg_get_imports() {
344
344
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
345
345
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
346
346
  },
347
+ __wbg___wbindgen_bigint_get_as_i64_447a76b5c6ef7bda: function(arg0, arg1) {
348
+ const v = arg1;
349
+ const ret = typeof(v) === 'bigint' ? v : undefined;
350
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
351
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
352
+ },
347
353
  __wbg___wbindgen_boolean_get_c0f3f60bac5a78d1: function(arg0) {
348
354
  const v = arg0;
349
355
  const ret = typeof(v) === 'boolean' ? v : undefined;
@@ -360,6 +366,14 @@ function __wbg_get_imports() {
360
366
  const ret = arg0 in arg1;
361
367
  return ret;
362
368
  },
369
+ __wbg___wbindgen_is_bigint_e2141d4f045b7eda: function(arg0) {
370
+ const ret = typeof(arg0) === 'bigint';
371
+ return ret;
372
+ },
373
+ __wbg___wbindgen_is_function_3c846841762788c1: function(arg0) {
374
+ const ret = typeof(arg0) === 'function';
375
+ return ret;
376
+ },
363
377
  __wbg___wbindgen_is_object_781bc9f159099513: function(arg0) {
364
378
  const val = arg0;
365
379
  const ret = typeof(val) === 'object' && val !== null;
@@ -373,6 +387,10 @@ function __wbg_get_imports() {
373
387
  const ret = arg0 === undefined;
374
388
  return ret;
375
389
  },
390
+ __wbg___wbindgen_jsval_eq_ee31bfad3e536463: function(arg0, arg1) {
391
+ const ret = arg0 === arg1;
392
+ return ret;
393
+ },
376
394
  __wbg___wbindgen_jsval_loose_eq_5bcc3bed3c69e72b: function(arg0, arg1) {
377
395
  const ret = arg0 == arg1;
378
396
  return ret;
@@ -394,6 +412,14 @@ function __wbg_get_imports() {
394
412
  __wbg___wbindgen_throw_6ddd609b62940d55: function(arg0, arg1) {
395
413
  throw new Error(getStringFromWasm0(arg0, arg1));
396
414
  },
415
+ __wbg_call_e133b57c9155d22c: function() { return handleError(function (arg0, arg1) {
416
+ const ret = arg0.call(arg1);
417
+ return ret;
418
+ }, arguments); },
419
+ __wbg_done_08ce71ee07e3bd17: function(arg0) {
420
+ const ret = arg0.done;
421
+ return ret;
422
+ },
397
423
  __wbg_entries_e8a20ff8c9757101: function(arg0) {
398
424
  const ret = Object.entries(arg0);
399
425
  return ret;
@@ -409,10 +435,18 @@ function __wbg_get_imports() {
409
435
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
410
436
  }
411
437
  },
438
+ __wbg_get_326e41e095fb2575: function() { return handleError(function (arg0, arg1) {
439
+ const ret = Reflect.get(arg0, arg1);
440
+ return ret;
441
+ }, arguments); },
412
442
  __wbg_get_a8ee5c45dabc1b3b: function(arg0, arg1) {
413
443
  const ret = arg0[arg1 >>> 0];
414
444
  return ret;
415
445
  },
446
+ __wbg_get_unchecked_329cfe50afab7352: function(arg0, arg1) {
447
+ const ret = arg0[arg1 >>> 0];
448
+ return ret;
449
+ },
416
450
  __wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
417
451
  const ret = arg0[arg1];
418
452
  return ret;
@@ -427,6 +461,16 @@ function __wbg_get_imports() {
427
461
  const ret = result;
428
462
  return ret;
429
463
  },
464
+ __wbg_instanceof_Map_f194b366846aca0c: function(arg0) {
465
+ let result;
466
+ try {
467
+ result = arg0 instanceof Map;
468
+ } catch (_) {
469
+ result = false;
470
+ }
471
+ const ret = result;
472
+ return ret;
473
+ },
430
474
  __wbg_instanceof_Uint8Array_740438561a5b956d: function(arg0) {
431
475
  let result;
432
476
  try {
@@ -437,6 +481,18 @@ function __wbg_get_imports() {
437
481
  const ret = result;
438
482
  return ret;
439
483
  },
484
+ __wbg_isArray_33b91feb269ff46e: function(arg0) {
485
+ const ret = Array.isArray(arg0);
486
+ return ret;
487
+ },
488
+ __wbg_isSafeInteger_ecd6a7f9c3e053cd: function(arg0) {
489
+ const ret = Number.isSafeInteger(arg0);
490
+ return ret;
491
+ },
492
+ __wbg_iterator_d8f549ec8fb061b1: function() {
493
+ const ret = Symbol.iterator;
494
+ return ret;
495
+ },
440
496
  __wbg_length_b3416cf66a5452c8: function(arg0) {
441
497
  const ret = arg0.length;
442
498
  return ret;
@@ -461,6 +517,14 @@ function __wbg_get_imports() {
461
517
  const ret = new Object();
462
518
  return ret;
463
519
  },
520
+ __wbg_next_11b99ee6237339e3: function() { return handleError(function (arg0) {
521
+ const ret = arg0.next();
522
+ return ret;
523
+ }, arguments); },
524
+ __wbg_next_e01a967809d1aa68: function(arg0) {
525
+ const ret = arg0.next;
526
+ return ret;
527
+ },
464
528
  __wbg_now_16f0c993d5dd6c27: function() {
465
529
  const ret = Date.now();
466
530
  return ret;
@@ -509,17 +573,26 @@ function __wbg_get_imports() {
509
573
  const ret = typeof window === 'undefined' ? null : window;
510
574
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
511
575
  },
576
+ __wbg_value_21fc78aab0322612: function(arg0) {
577
+ const ret = arg0.value;
578
+ return ret;
579
+ },
512
580
  __wbindgen_cast_0000000000000001: function(arg0) {
513
581
  // Cast intrinsic for `F64 -> Externref`.
514
582
  const ret = arg0;
515
583
  return ret;
516
584
  },
517
- __wbindgen_cast_0000000000000002: function(arg0, arg1) {
585
+ __wbindgen_cast_0000000000000002: function(arg0) {
586
+ // Cast intrinsic for `I64 -> Externref`.
587
+ const ret = arg0;
588
+ return ret;
589
+ },
590
+ __wbindgen_cast_0000000000000003: function(arg0, arg1) {
518
591
  // Cast intrinsic for `Ref(String) -> Externref`.
519
592
  const ret = getStringFromWasm0(arg0, arg1);
520
593
  return ret;
521
594
  },
522
- __wbindgen_cast_0000000000000003: function(arg0) {
595
+ __wbindgen_cast_0000000000000004: function(arg0) {
523
596
  // Cast intrinsic for `U64 -> Externref`.
524
597
  const ret = BigInt.asUintN(64, arg0);
525
598
  return ret;
@@ -660,6 +733,15 @@ function getUint8ArrayMemory0() {
660
733
  return cachedUint8ArrayMemory0;
661
734
  }
662
735
 
736
+ function handleError(f, args) {
737
+ try {
738
+ return f.apply(this, args);
739
+ } catch (e) {
740
+ const idx = addToExternrefTable0(e);
741
+ wasm.__wbindgen_exn_store(idx);
742
+ }
743
+ }
744
+
663
745
  function isLikeNone(x) {
664
746
  return x === undefined || x === null;
665
747
  }
@@ -865,12 +947,13 @@ var scalarExports = /*#__PURE__*/Object.freeze({
865
947
 
866
948
  const cfbRobustOptions = {
867
949
  node_input: true,
868
- snap_grid_size: 0.1,
950
+ precision_model: { type: "fixed_grid", grid_size: 0.1 },
869
951
  pre_snap_tolerance: 0.5,
870
952
  extract_only_polygonal: false,
871
953
  snap_strategy: "GeosCompat",
872
954
  noding: {
873
955
  backend: "Snap",
956
+ guarantee: "Unchecked",
874
957
  },
875
958
  containment: {
876
959
  touch_policy: "AllowPointTouchDisallowEdgeShare",
@@ -5,8 +5,10 @@ export * from "./bindings/ContainmentOptions";
5
5
  export * from "./bindings/DeterminismOptions";
6
6
  export * from "./bindings/DiagnosticsOptions";
7
7
  export * from "./bindings/NodingBackend";
8
+ export * from "./bindings/NodingGuarantee";
8
9
  export * from "./bindings/NodingOptions";
9
10
  export * from "./bindings/OutputFilterOptions";
11
+ export * from "./bindings/PrecisionModel";
10
12
  export * from "./bindings/ProvenanceOptions";
11
13
  export * from "./bindings/SnapStrategy";
12
14
  export * from "./bindings/TileOwnershipPolicy";
@@ -90,9 +90,10 @@ export interface InitOutput {
90
90
  readonly polygonize_result_free: () => void;
91
91
  readonly __wbindgen_malloc: (a: number, b: number) => number;
92
92
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
93
- readonly __wbindgen_free: (a: number, b: number, c: number) => void;
93
+ readonly __wbindgen_exn_store: (a: number) => void;
94
94
  readonly __externref_table_alloc: () => number;
95
95
  readonly __wbindgen_externrefs: WebAssembly.Table;
96
+ readonly __wbindgen_free: (a: number, b: number, c: number) => void;
96
97
  readonly __externref_table_dealloc: (a: number) => void;
97
98
  readonly __wbindgen_start: () => void;
98
99
  }
@@ -31,8 +31,9 @@ export const polygonize_with_options_ffi: (a: number, b: number, c: number, d: n
31
31
  export const polygonize_result_free: () => void;
32
32
  export const __wbindgen_malloc: (a: number, b: number) => number;
33
33
  export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
34
- export const __wbindgen_free: (a: number, b: number, c: number) => void;
34
+ export const __wbindgen_exn_store: (a: number) => void;
35
35
  export const __externref_table_alloc: () => number;
36
36
  export const __wbindgen_externrefs: WebAssembly.Table;
37
+ export const __wbindgen_free: (a: number, b: number, c: number) => void;
37
38
  export const __externref_table_dealloc: (a: number) => void;
38
39
  export const __wbindgen_start: () => void;
@@ -0,0 +1 @@
1
+ export type NodingGuarantee = "Unchecked" | "Validate";
@@ -1,4 +1,6 @@
1
1
  import type { NodingBackend } from "./NodingBackend";
2
+ import type { NodingGuarantee } from "./NodingGuarantee";
2
3
  export type NodingOptions = {
3
4
  backend: NodingBackend;
5
+ guarantee: NodingGuarantee;
4
6
  };
@@ -3,6 +3,7 @@ import type { DeterminismOptions } from "./DeterminismOptions";
3
3
  import type { DiagnosticsOptions } from "./DiagnosticsOptions";
4
4
  import type { NodingOptions } from "./NodingOptions";
5
5
  import type { OutputFilterOptions } from "./OutputFilterOptions";
6
+ import type { PrecisionModel } from "./PrecisionModel";
6
7
  import type { ProvenanceOptions } from "./ProvenanceOptions";
7
8
  import type { SnapStrategy } from "./SnapStrategy";
8
9
  /**
@@ -23,14 +24,11 @@ export type PolygonizerOptions = {
23
24
  */
24
25
  node_input: boolean;
25
26
  /**
26
- * The snapping grid size used for vertex deduplication and noding operations.
27
+ * Coordinate precision used for topology and noding.
27
28
  *
28
- * Vertices falling within the same grid cell are coalesced. A size of `0.0`
29
- * indicates exact floating-point evaluation without grid snapping.
30
- *
31
- * Default: `1e-10`
29
+ * Default: `PrecisionModel::Floating`
32
30
  */
33
- snap_grid_size: number;
31
+ precision_model: PrecisionModel;
34
32
  /**
35
33
  * Snap input segments to nearby vertices from exact-noded input linework before grid noding.
36
34
  *
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Coordinate precision used by the topology pipeline.
3
+ */
4
+ export type PrecisionModel = {
5
+ "type": "floating";
6
+ } | {
7
+ "type": "fixed_grid";
8
+ grid_size: number;
9
+ };
@@ -0,0 +1 @@
1
+ export type NodingGuarantee = "Unchecked" | "Validate";