geo-polygonize 0.35.2 → 0.36.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.
@@ -30,6 +30,16 @@ export type PolygonizerOptions = {
30
30
  * Default: `1e-10`
31
31
  */
32
32
  snap_grid_size: number;
33
+ /**
34
+ * Snap input segments to nearby vertices from exact-noded input linework before grid noding.
35
+ *
36
+ * A value of `0.0` disables pre-snap. This mirrors the CFB/Shapely
37
+ * `snap(line, unary_union(all_lines), tolerance)` step closely enough to
38
+ * close small CAD gaps before polygonization.
39
+ *
40
+ * Default: `0.0`
41
+ */
42
+ pre_snap_tolerance: number;
33
43
  /**
34
44
  * If `true`, only pure, outermost polygonal shells are returned.
35
45
  *
@@ -30,6 +30,16 @@ export type PolygonizerOptions = {
30
30
  * Default: `1e-10`
31
31
  */
32
32
  snap_grid_size: number;
33
+ /**
34
+ * Snap input segments to nearby vertices from exact-noded input linework before grid noding.
35
+ *
36
+ * A value of `0.0` disables pre-snap. This mirrors the CFB/Shapely
37
+ * `snap(line, unary_union(all_lines), tolerance)` step closely enough to
38
+ * close small CAD gaps before polygonization.
39
+ *
40
+ * Default: `0.0`
41
+ */
42
+ pre_snap_tolerance: number;
33
43
  /**
34
44
  * If `true`, only pure, outermost polygonal shells are returned.
35
45
  *
@@ -1035,7 +1035,8 @@ var geo_polygonize = /*#__PURE__*/Object.freeze({
1035
1035
 
1036
1036
  const cfbRobustOptions = {
1037
1037
  node_input: true,
1038
- snap_grid_size: 0.5,
1038
+ snap_grid_size: 0.1,
1039
+ pre_snap_tolerance: 0.5,
1039
1040
  extract_only_polygonal: false,
1040
1041
  snap_strategy: "GeosCompat",
1041
1042
  noding: {
@@ -30,6 +30,16 @@ export type PolygonizerOptions = {
30
30
  * Default: `1e-10`
31
31
  */
32
32
  snap_grid_size: number;
33
+ /**
34
+ * Snap input segments to nearby vertices from exact-noded input linework before grid noding.
35
+ *
36
+ * A value of `0.0` disables pre-snap. This mirrors the CFB/Shapely
37
+ * `snap(line, unary_union(all_lines), tolerance)` step closely enough to
38
+ * close small CAD gaps before polygonization.
39
+ *
40
+ * Default: `0.0`
41
+ */
42
+ pre_snap_tolerance: number;
33
43
  /**
34
44
  * If `true`, only pure, outermost polygonal shells are returned.
35
45
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geo-polygonize",
3
- "version": "0.35.2",
3
+ "version": "0.36.0",
4
4
  "description": "A native Rust port of the JTS/GEOS polygonization algorithm (Wasm)",
5
5
  "type": "module",
6
6
  "scripts": {