geo-polygonize 0.43.0 → 0.45.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 (56) hide show
  1. package/README.md +37 -14
  2. package/dist/geo_polygonize.wasm +0 -0
  3. package/dist/geo_polygonize_simd.wasm +0 -0
  4. package/dist/slim/cjs/bindings/PolygonizerOptions.d.ts +5 -0
  5. package/dist/slim/cjs/bindings/SnapStrategy.d.ts +1 -1
  6. package/dist/slim/cjs/bindings/ZOptions.d.ts +8 -0
  7. package/dist/slim/cjs/bindings/ZPolicy.d.ts +1 -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 +4 -0
  11. package/dist/slim/cjs/index_threads.d.ts +2 -0
  12. package/dist/slim/es/bindings/PolygonizerOptions.d.ts +5 -0
  13. package/dist/slim/es/bindings/SnapStrategy.d.ts +1 -1
  14. package/dist/slim/es/bindings/ZOptions.d.ts +8 -0
  15. package/dist/slim/es/bindings/ZPolicy.d.ts +1 -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 +4 -0
  19. package/dist/slim/es/index_threads.d.ts +2 -0
  20. package/dist/slim/pkg-wrapper/bindings/PolygonizerOptions.d.ts +5 -0
  21. package/dist/slim/pkg-wrapper/bindings/SnapStrategy.d.ts +1 -1
  22. package/dist/slim/pkg-wrapper/bindings/ZOptions.d.ts +8 -0
  23. package/dist/slim/pkg-wrapper/bindings/ZPolicy.d.ts +1 -0
  24. package/dist/standard/cjs/bindings/PolygonizerOptions.d.ts +5 -0
  25. package/dist/standard/cjs/bindings/SnapStrategy.d.ts +1 -1
  26. package/dist/standard/cjs/bindings/ZOptions.d.ts +8 -0
  27. package/dist/standard/cjs/bindings/ZPolicy.d.ts +1 -0
  28. package/dist/standard/cjs/index.d.ts +2 -0
  29. package/dist/standard/cjs/index.js +6 -2
  30. package/dist/standard/cjs/index_slim.d.ts +2 -0
  31. package/dist/standard/cjs/index_threads.d.ts +2 -0
  32. package/dist/standard/es/bindings/PolygonizerOptions.d.ts +5 -0
  33. package/dist/standard/es/bindings/SnapStrategy.d.ts +1 -1
  34. package/dist/standard/es/bindings/ZOptions.d.ts +8 -0
  35. package/dist/standard/es/bindings/ZPolicy.d.ts +1 -0
  36. package/dist/standard/es/index.d.ts +2 -0
  37. package/dist/standard/es/index.js +6 -2
  38. package/dist/standard/es/index_slim.d.ts +2 -0
  39. package/dist/standard/es/index_threads.d.ts +2 -0
  40. package/dist/standard/pkg-wrapper/bindings/PolygonizerOptions.d.ts +5 -0
  41. package/dist/standard/pkg-wrapper/bindings/SnapStrategy.d.ts +1 -1
  42. package/dist/standard/pkg-wrapper/bindings/ZOptions.d.ts +8 -0
  43. package/dist/standard/pkg-wrapper/bindings/ZPolicy.d.ts +1 -0
  44. package/dist/threads/es/bindings/PolygonizerOptions.d.ts +5 -0
  45. package/dist/threads/es/bindings/SnapStrategy.d.ts +1 -1
  46. package/dist/threads/es/bindings/ZOptions.d.ts +8 -0
  47. package/dist/threads/es/bindings/ZPolicy.d.ts +1 -0
  48. package/dist/threads/es/index.d.ts +2 -0
  49. package/dist/threads/es/index.js +4 -0
  50. package/dist/threads/es/index_slim.d.ts +2 -0
  51. package/dist/threads/es/index_threads.d.ts +2 -0
  52. package/dist/threads/pkg-wrapper/bindings/PolygonizerOptions.d.ts +5 -0
  53. package/dist/threads/pkg-wrapper/bindings/SnapStrategy.d.ts +1 -1
  54. package/dist/threads/pkg-wrapper/bindings/ZOptions.d.ts +8 -0
  55. package/dist/threads/pkg-wrapper/bindings/ZPolicy.d.ts +1 -0
  56. package/package.json +1 -1
@@ -13,5 +13,7 @@ export * from "./bindings/ProvenanceOptions";
13
13
  export * from "./bindings/SnapStrategy";
14
14
  export * from "./bindings/TileOwnershipPolicy";
15
15
  export * from "./bindings/TouchPolicy";
16
+ export * from "./bindings/ZOptions";
17
+ export * from "./bindings/ZPolicy";
16
18
  export * from "./cfb";
17
19
  export declare function initBest(scalarModule: any, simdModule?: any): Promise<typeof scalarExports>;
@@ -13,5 +13,7 @@ export * from "./bindings/ProvenanceOptions";
13
13
  export * from "./bindings/SnapStrategy";
14
14
  export * from "./bindings/TileOwnershipPolicy";
15
15
  export * from "./bindings/TouchPolicy";
16
+ export * from "./bindings/ZOptions";
17
+ export * from "./bindings/ZPolicy";
16
18
  export * from "./cfb";
17
19
  export default init;
@@ -6,6 +6,7 @@ import type { OutputFilterOptions } from "./OutputFilterOptions";
6
6
  import type { PrecisionModel } from "./PrecisionModel";
7
7
  import type { ProvenanceOptions } from "./ProvenanceOptions";
8
8
  import type { SnapStrategy } from "./SnapStrategy";
9
+ import type { ZOptions } from "./ZOptions";
9
10
  /**
10
11
  * The canonical configuration object for the `geo-polygonize` engine.
11
12
  *
@@ -77,6 +78,10 @@ export type PolygonizerOptions = {
77
78
  * Options for mapping final faces back to original input geometry IDs.
78
79
  */
79
80
  provenance: ProvenanceOptions;
81
+ /**
82
+ * Controls Z reconstruction and same-XY conflict handling.
83
+ */
84
+ z: ZOptions;
80
85
  /**
81
86
  * Optional application-level filtering applied after topology is established.
82
87
  */
@@ -2,7 +2,7 @@
2
2
  * Strategy for robust snap noding and output coordinates.
3
3
  *
4
4
  * `Grid` uses the precision grid for both topology and output coordinates.
5
- * `GeosCompat` uses the grid for topology, then restores one deterministic nearest source
5
+ * `GeosCompat` uses the grid for topology, then restores one deterministic nearest source XY
6
6
  * coordinate per snapped node. This targets Shapely-style `snap` followed by full-precision
7
7
  * noding and polygonization; it does not emulate `set_precision` output.
8
8
  *
@@ -0,0 +1,8 @@
1
+ import type { ZPolicy } from "./ZPolicy";
2
+ export type ZOptions = {
3
+ policy: ZPolicy;
4
+ /**
5
+ * Z values at one XY node conflict when their difference exceeds this value.
6
+ */
7
+ conflict_tolerance: number;
8
+ };
@@ -0,0 +1 @@
1
+ export type ZPolicy = "Ignore" | "InterpolateAlongEdge" | "PreferNearestEndpoint" | "ErrorOnConflict";
@@ -6,6 +6,7 @@ import type { OutputFilterOptions } from "./OutputFilterOptions";
6
6
  import type { PrecisionModel } from "./PrecisionModel";
7
7
  import type { ProvenanceOptions } from "./ProvenanceOptions";
8
8
  import type { SnapStrategy } from "./SnapStrategy";
9
+ import type { ZOptions } from "./ZOptions";
9
10
  /**
10
11
  * The canonical configuration object for the `geo-polygonize` engine.
11
12
  *
@@ -77,6 +78,10 @@ export type PolygonizerOptions = {
77
78
  * Options for mapping final faces back to original input geometry IDs.
78
79
  */
79
80
  provenance: ProvenanceOptions;
81
+ /**
82
+ * Controls Z reconstruction and same-XY conflict handling.
83
+ */
84
+ z: ZOptions;
80
85
  /**
81
86
  * Optional application-level filtering applied after topology is established.
82
87
  */
@@ -2,7 +2,7 @@
2
2
  * Strategy for robust snap noding and output coordinates.
3
3
  *
4
4
  * `Grid` uses the precision grid for both topology and output coordinates.
5
- * `GeosCompat` uses the grid for topology, then restores one deterministic nearest source
5
+ * `GeosCompat` uses the grid for topology, then restores one deterministic nearest source XY
6
6
  * coordinate per snapped node. This targets Shapely-style `snap` followed by full-precision
7
7
  * noding and polygonization; it does not emulate `set_precision` output.
8
8
  *
@@ -0,0 +1,8 @@
1
+ import type { ZPolicy } from "./ZPolicy";
2
+ export type ZOptions = {
3
+ policy: ZPolicy;
4
+ /**
5
+ * Z values at one XY node conflict when their difference exceeds this value.
6
+ */
7
+ conflict_tolerance: number;
8
+ };
@@ -0,0 +1 @@
1
+ export type ZPolicy = "Ignore" | "InterpolateAlongEdge" | "PreferNearestEndpoint" | "ErrorOnConflict";
@@ -13,5 +13,7 @@ export * from "./bindings/ProvenanceOptions";
13
13
  export * from "./bindings/SnapStrategy";
14
14
  export * from "./bindings/TileOwnershipPolicy";
15
15
  export * from "./bindings/TouchPolicy";
16
+ export * from "./bindings/ZOptions";
17
+ export * from "./bindings/ZPolicy";
16
18
  export * from "./cfb";
17
19
  export default function init(_input?: any): Promise<typeof exports>;
@@ -1164,6 +1164,10 @@ const cfbRobustOptions = {
1164
1164
  enabled: true,
1165
1165
  include_boundary_line_ids: true,
1166
1166
  },
1167
+ z: {
1168
+ policy: "InterpolateAlongEdge",
1169
+ conflict_tolerance: 0,
1170
+ },
1167
1171
  output_filter: {
1168
1172
  minimum_face_area: undefined,
1169
1173
  },
@@ -13,5 +13,7 @@ export * from "./bindings/ProvenanceOptions";
13
13
  export * from "./bindings/SnapStrategy";
14
14
  export * from "./bindings/TileOwnershipPolicy";
15
15
  export * from "./bindings/TouchPolicy";
16
+ export * from "./bindings/ZOptions";
17
+ export * from "./bindings/ZPolicy";
16
18
  export * from "./cfb";
17
19
  export declare function initBest(scalarModule: any, simdModule?: any): Promise<typeof scalarExports>;
@@ -13,5 +13,7 @@ export * from "./bindings/ProvenanceOptions";
13
13
  export * from "./bindings/SnapStrategy";
14
14
  export * from "./bindings/TileOwnershipPolicy";
15
15
  export * from "./bindings/TouchPolicy";
16
+ export * from "./bindings/ZOptions";
17
+ export * from "./bindings/ZPolicy";
16
18
  export * from "./cfb";
17
19
  export default init;
@@ -6,6 +6,7 @@ import type { OutputFilterOptions } from "./OutputFilterOptions";
6
6
  import type { PrecisionModel } from "./PrecisionModel";
7
7
  import type { ProvenanceOptions } from "./ProvenanceOptions";
8
8
  import type { SnapStrategy } from "./SnapStrategy";
9
+ import type { ZOptions } from "./ZOptions";
9
10
  /**
10
11
  * The canonical configuration object for the `geo-polygonize` engine.
11
12
  *
@@ -77,6 +78,10 @@ export type PolygonizerOptions = {
77
78
  * Options for mapping final faces back to original input geometry IDs.
78
79
  */
79
80
  provenance: ProvenanceOptions;
81
+ /**
82
+ * Controls Z reconstruction and same-XY conflict handling.
83
+ */
84
+ z: ZOptions;
80
85
  /**
81
86
  * Optional application-level filtering applied after topology is established.
82
87
  */
@@ -2,7 +2,7 @@
2
2
  * Strategy for robust snap noding and output coordinates.
3
3
  *
4
4
  * `Grid` uses the precision grid for both topology and output coordinates.
5
- * `GeosCompat` uses the grid for topology, then restores one deterministic nearest source
5
+ * `GeosCompat` uses the grid for topology, then restores one deterministic nearest source XY
6
6
  * coordinate per snapped node. This targets Shapely-style `snap` followed by full-precision
7
7
  * noding and polygonization; it does not emulate `set_precision` output.
8
8
  *
@@ -0,0 +1,8 @@
1
+ import type { ZPolicy } from "./ZPolicy";
2
+ export type ZOptions = {
3
+ policy: ZPolicy;
4
+ /**
5
+ * Z values at one XY node conflict when their difference exceeds this value.
6
+ */
7
+ conflict_tolerance: number;
8
+ };
@@ -0,0 +1 @@
1
+ export type ZPolicy = "Ignore" | "InterpolateAlongEdge" | "PreferNearestEndpoint" | "ErrorOnConflict";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geo-polygonize",
3
- "version": "0.43.0",
3
+ "version": "0.45.0",
4
4
  "description": "A native Rust port of the JTS/GEOS polygonization algorithm (Wasm)",
5
5
  "type": "module",
6
6
  "scripts": {