From 6373dcd2dbc313971592b21f0fa72d9f87dbbdad Mon Sep 17 00:00:00 2001 From: Kristin Cowalcijk Date: Wed, 29 Oct 2025 11:16:01 +0800 Subject: [PATCH 01/22] docs: add PORTING_GEO_COMMITS list for sedona-geo-generic-alg --- PORTING_GEO_COMMITS.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 PORTING_GEO_COMMITS.txt diff --git a/PORTING_GEO_COMMITS.txt b/PORTING_GEO_COMMITS.txt new file mode 100644 index 000000000..4343d2fec --- /dev/null +++ b/PORTING_GEO_COMMITS.txt @@ -0,0 +1,16 @@ +PENDING 9eed5bfd (https://github.com/georust/geo/commit/9eed5bfd): update geo to rust 2024 edition (may require minor syntactic updates across area, centroid, dimensions, euclidean_length, bounding_rect, intersects, kernels, line_measures length) +PENDING fea73a18 (https://github.com/georust/geo/commit/fea73a18): apply `empty` to other crates (affects centroid.rs, dimensions.rs, intersects/mod.rs; review empty-related logic for HasDimensions / is_empty semantics) +PENDING 33f4e6e0 (https://github.com/georust/geo/commit/33f4e6e0): Add distance_within method to Distance trait (line_measures/distance.rs) +PENDING a602ec3e (https://github.com/georust/geo/commit/a602ec3e): Faster minimum geometry distance using project-and-prune (euclidean distance optimizations; affects metric_spaces/euclidean/distance.rs and euclidean/mod.rs plus adds distance_fast_tests.rs) +PENDING b07b68ec (https://github.com/georust/geo/commit/b07b68ec): Add Bearing and Destination for Euclidean Space (metric_spaces/euclidean/mod.rs; decide if bearing/destination traits are needed in generic alg scope) +PENDING 77ff3e6f (https://github.com/georust/geo/commit/77ff3e6f): extract duplicate intersects impls into a macro (intersects/line_string.rs) +PENDING 75964389 (https://github.com/georust/geo/commit/75964389): fix truncated copy/paste (intersects/line_string.rs) +PENDING 7a976890 (https://github.com/georust/geo/commit/7a976890): remove unnecessary bounds (intersects/line_string.rs) +PENDING ead3c3c9 (https://github.com/georust/geo/commit/ead3c3c9): convert benches into tests (mostly test infra; may not need port unless affecting code paths) +PENDING a9e047d2 (https://github.com/georust/geo/commit/a9e047d2): remove unnecessary constraints (intersects/line_string.rs) +PENDING 31ee4388 (https://github.com/georust/geo/commit/31ee4388): Faster LineString intersects ~Polygon (intersects/collections.rs performance changes) +PENDING 8727d141 (https://github.com/georust/geo/commit/8727d141): organize intersects impls by caller; add missing implementations for Coord (multiple intersects/* files) +PENDING 06302689 (https://github.com/georust/geo/commit/06302689): new poly poly intersection (intersects/polygon.rs algorithm overhaul) +PENDING 1faf998e (https://github.com/georust/geo/commit/1faf998e): proof that int-int can be skipped (intersects/polygon.rs adjustments & comments) +PENDING e8419735 (https://github.com/georust/geo/commit/e8419735): Faster Intersection for Rect v. Polygon and Rect v. Triangle (intersects/rect.rs & triangle.rs logic changes) +PENDING bbacf118 (https://github.com/georust/geo/commit/bbacf118): rename rectangle corners (intersects/rect.rs minor change) From a91c0d1977c2cf8beee056c16a064fe5aec060e7 Mon Sep 17 00:00:00 2001 From: Kristin Cowalcijk Date: Wed, 29 Oct 2025 11:24:52 +0800 Subject: [PATCH 02/22] docs: refine PORTING_GEO_COMMITS per guidelines and add polygon-poly merge commit --- PORTING_GEO_COMMITS.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/PORTING_GEO_COMMITS.txt b/PORTING_GEO_COMMITS.txt index 4343d2fec..01199018f 100644 --- a/PORTING_GEO_COMMITS.txt +++ b/PORTING_GEO_COMMITS.txt @@ -1,15 +1,11 @@ -PENDING 9eed5bfd (https://github.com/georust/geo/commit/9eed5bfd): update geo to rust 2024 edition (may require minor syntactic updates across area, centroid, dimensions, euclidean_length, bounding_rect, intersects, kernels, line_measures length) PENDING fea73a18 (https://github.com/georust/geo/commit/fea73a18): apply `empty` to other crates (affects centroid.rs, dimensions.rs, intersects/mod.rs; review empty-related logic for HasDimensions / is_empty semantics) -PENDING 33f4e6e0 (https://github.com/georust/geo/commit/33f4e6e0): Add distance_within method to Distance trait (line_measures/distance.rs) -PENDING a602ec3e (https://github.com/georust/geo/commit/a602ec3e): Faster minimum geometry distance using project-and-prune (euclidean distance optimizations; affects metric_spaces/euclidean/distance.rs and euclidean/mod.rs plus adds distance_fast_tests.rs) -PENDING b07b68ec (https://github.com/georust/geo/commit/b07b68ec): Add Bearing and Destination for Euclidean Space (metric_spaces/euclidean/mod.rs; decide if bearing/destination traits are needed in generic alg scope) PENDING 77ff3e6f (https://github.com/georust/geo/commit/77ff3e6f): extract duplicate intersects impls into a macro (intersects/line_string.rs) PENDING 75964389 (https://github.com/georust/geo/commit/75964389): fix truncated copy/paste (intersects/line_string.rs) PENDING 7a976890 (https://github.com/georust/geo/commit/7a976890): remove unnecessary bounds (intersects/line_string.rs) -PENDING ead3c3c9 (https://github.com/georust/geo/commit/ead3c3c9): convert benches into tests (mostly test infra; may not need port unless affecting code paths) PENDING a9e047d2 (https://github.com/georust/geo/commit/a9e047d2): remove unnecessary constraints (intersects/line_string.rs) PENDING 31ee4388 (https://github.com/georust/geo/commit/31ee4388): Faster LineString intersects ~Polygon (intersects/collections.rs performance changes) PENDING 8727d141 (https://github.com/georust/geo/commit/8727d141): organize intersects impls by caller; add missing implementations for Coord (multiple intersects/* files) +PENDING 11c626fb (https://github.com/georust/geo/commit/11c626fb6d1437969e02a581cb59309428e86765): Merge pull request #1378 intersects-poly-poly (introduces Polygon-v-Polygon intersection refactor groundwork; includes macro symmetry adjustments/tests) PENDING 06302689 (https://github.com/georust/geo/commit/06302689): new poly poly intersection (intersects/polygon.rs algorithm overhaul) PENDING 1faf998e (https://github.com/georust/geo/commit/1faf998e): proof that int-int can be skipped (intersects/polygon.rs adjustments & comments) PENDING e8419735 (https://github.com/georust/geo/commit/e8419735): Faster Intersection for Rect v. Polygon and Rect v. Triangle (intersects/rect.rs & triangle.rs logic changes) From 6eaf7d786d683a0024d1c8df3f7ebdcfb3c582b9 Mon Sep 17 00:00:00 2001 From: Kristin Cowalcijk Date: Wed, 29 Oct 2025 11:31:02 +0800 Subject: [PATCH 03/22] docs: restructure PORTING_GEO_COMMITS by PR with constituent commits --- PORTING_GEO_COMMITS.txt | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/PORTING_GEO_COMMITS.txt b/PORTING_GEO_COMMITS.txt index 01199018f..017bf409e 100644 --- a/PORTING_GEO_COMMITS.txt +++ b/PORTING_GEO_COMMITS.txt @@ -1,12 +1,16 @@ -PENDING fea73a18 (https://github.com/georust/geo/commit/fea73a18): apply `empty` to other crates (affects centroid.rs, dimensions.rs, intersects/mod.rs; review empty-related logic for HasDimensions / is_empty semantics) -PENDING 77ff3e6f (https://github.com/georust/geo/commit/77ff3e6f): extract duplicate intersects impls into a macro (intersects/line_string.rs) -PENDING 75964389 (https://github.com/georust/geo/commit/75964389): fix truncated copy/paste (intersects/line_string.rs) -PENDING 7a976890 (https://github.com/georust/geo/commit/7a976890): remove unnecessary bounds (intersects/line_string.rs) -PENDING a9e047d2 (https://github.com/georust/geo/commit/a9e047d2): remove unnecessary constraints (intersects/line_string.rs) -PENDING 31ee4388 (https://github.com/georust/geo/commit/31ee4388): Faster LineString intersects ~Polygon (intersects/collections.rs performance changes) -PENDING 8727d141 (https://github.com/georust/geo/commit/8727d141): organize intersects impls by caller; add missing implementations for Coord (multiple intersects/* files) -PENDING 11c626fb (https://github.com/georust/geo/commit/11c626fb6d1437969e02a581cb59309428e86765): Merge pull request #1378 intersects-poly-poly (introduces Polygon-v-Polygon intersection refactor groundwork; includes macro symmetry adjustments/tests) -PENDING 06302689 (https://github.com/georust/geo/commit/06302689): new poly poly intersection (intersects/polygon.rs algorithm overhaul) -PENDING 1faf998e (https://github.com/georust/geo/commit/1faf998e): proof that int-int can be skipped (intersects/polygon.rs adjustments & comments) -PENDING e8419735 (https://github.com/georust/geo/commit/e8419735): Faster Intersection for Rect v. Polygon and Rect v. Triangle (intersects/rect.rs & triangle.rs logic changes) -PENDING bbacf118 (https://github.com/georust/geo/commit/bbacf118): rename rectangle corners (intersects/rect.rs minor change) +PENDING PR #1376 (https://github.com/georust/geo/pull/1376) Merge: 9bb1332f intersects-tidy + - 8727d141: organize intersects impls by caller; add missing implementations for Coord (intersects/*) +PENDING PR #1379 (https://github.com/georust/geo/pull/1379) Merge: 1e5520bc intersects-linestring-poly + - 77ff3e6f: extract duplicate intersects impls into a macro (intersects/line_string.rs) + - 75964389: fix truncated copy/paste (intersects/line_string.rs) + - 7a976890: remove unnecessary bounds (intersects/line_string.rs) + - a9e047d2: remove unnecessary constraints (intersects/line_string.rs) + - 31ee4388: Faster LineString intersects ~Polygon (intersects/collections.rs performance changes) +PENDING PR #1378 (https://github.com/georust/geo/pull/1378) Merge: 11c626fb intersects-poly-poly + - 06302689: new poly poly intersection (intersects/polygon.rs) + - 1faf998e: proof that int-int can be skipped (intersects/polygon.rs) +PENDING PR #1377 / #1376 follow-up (https://github.com/georust/geo/pull/1377) Faster Rect/Triangle/Polygon intersections + - e8419735: Faster Intersection for Rect v. Polygon and Rect v. Triangle (intersects/rect.rs & triangle.rs) + - bbacf118: rename rectangle corners (intersects/rect.rs minor change) +PENDING PR #1422 related empty propagation (https://github.com/georust/geo/pull/1422) apply empty to other crates + - fea73a18: apply `empty` to other crates (centroid.rs, dimensions.rs, intersects/mod.rs) From 5f3e5c7c0dfbaf89710b8a30b8e588df78ace20d Mon Sep 17 00:00:00 2001 From: Kristin Cowalcijk Date: Wed, 29 Oct 2025 11:39:12 +0800 Subject: [PATCH 04/22] docs: reformat PORTING_GEO_COMMITS to required PR list schema with statuses --- PORTING_GEO_COMMITS.txt | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/PORTING_GEO_COMMITS.txt b/PORTING_GEO_COMMITS.txt index 017bf409e..65a0796b1 100644 --- a/PORTING_GEO_COMMITS.txt +++ b/PORTING_GEO_COMMITS.txt @@ -1,16 +1,10 @@ -PENDING PR #1376 (https://github.com/georust/geo/pull/1376) Merge: 9bb1332f intersects-tidy - - 8727d141: organize intersects impls by caller; add missing implementations for Coord (intersects/*) -PENDING PR #1379 (https://github.com/georust/geo/pull/1379) Merge: 1e5520bc intersects-linestring-poly - - 77ff3e6f: extract duplicate intersects impls into a macro (intersects/line_string.rs) - - 75964389: fix truncated copy/paste (intersects/line_string.rs) - - 7a976890: remove unnecessary bounds (intersects/line_string.rs) - - a9e047d2: remove unnecessary constraints (intersects/line_string.rs) - - 31ee4388: Faster LineString intersects ~Polygon (intersects/collections.rs performance changes) -PENDING PR #1378 (https://github.com/georust/geo/pull/1378) Merge: 11c626fb intersects-poly-poly - - 06302689: new poly poly intersection (intersects/polygon.rs) - - 1faf998e: proof that int-int can be skipped (intersects/polygon.rs) -PENDING PR #1377 / #1376 follow-up (https://github.com/georust/geo/pull/1377) Faster Rect/Triangle/Polygon intersections - - e8419735: Faster Intersection for Rect v. Polygon and Rect v. Triangle (intersects/rect.rs & triangle.rs) - - bbacf118: rename rectangle corners (intersects/rect.rs minor change) -PENDING PR #1422 related empty propagation (https://github.com/georust/geo/pull/1422) apply empty to other crates - - fea73a18: apply `empty` to other crates (centroid.rs, dimensions.rs, intersects/mod.rs) +PENDING PR #1376 (https://github.com/georust/geo/pull/1376) [8727d141]: Intersects tidy-up; organize impls by caller; adds missing Coord-based Intersects (intersects/*) for generic parity. +PENDING PR #1379 (https://github.com/georust/geo/pull/1379) [77ff3e6f,75964389,7a976890,a9e047d2,31ee4388]: LineString/MultiLineString intersects refactor & perf (macro extraction, constraint/bounds cleanups, collections speedup) – required for efficient generic LineString vs area types. +PENDING PR #1378 (https://github.com/georust/geo/pull/1378) [06302689,1faf998e,11c626fb]: Polygon–Polygon intersection overhaul + skip interior-interior proof; improves correctness & performance of generic polygon intersects. +PENDING PR #1377 (https://github.com/georust/geo/pull/1377) [e8419735,bbacf118]: Faster Rect/Triangle vs Polygon intersects; specialized implementations reduce allocations and add tests to mirror. +PENDING PR #1422 (https://github.com/georust/geo/pull/1422) [fea73a18]: Apply `empty` semantics across centroid/dimensions/intersects for consistent emptiness detection in generic traits. +SKIPPED PR #1406 (https://github.com/georust/geo/pull/1406) [9eed5bfd]: Rust 2024 edition upgrade; no algorithmic changes needed for generic port. +SKIPPED PR #1424 (https://github.com/georust/geo/pull/1424) [a60aec90]: Disjoint polygon distance pruning; excluded (distance algorithms not ported; different implementation strategy). +SKIPPED PR #1426 (https://github.com/georust/geo/pull/1426) [33f4e6e0]: Adds distance_within to Distance trait; distance-related changes omitted per guidelines. +SKIPPED PR #1370 (https://github.com/georust/geo/pull/1370) [6f3bf4cb]: Euclidean Bearing/Destination additions; excluded (distance/Bearing not in generic scope). +SKIPPED PR #1365 (https://github.com/georust/geo/pull/1365) [7b3056be]: Geometry buffering feature; buffer algorithm not part of current generic subset. From 3f90b399dbd7b52993c4d3c0c4f64c28ebf6f2d1 Mon Sep 17 00:00:00 2001 From: Kristin Cowalcijk Date: Wed, 29 Oct 2025 11:45:55 +0800 Subject: [PATCH 05/22] docs: ordered full PR list with PENDING/SKIPPED per guidelines --- PORTING_GEO_COMMITS.txt | 67 +++++++++++++++++++++++++++++++++++------ 1 file changed, 57 insertions(+), 10 deletions(-) diff --git a/PORTING_GEO_COMMITS.txt b/PORTING_GEO_COMMITS.txt index 65a0796b1..05955e992 100644 --- a/PORTING_GEO_COMMITS.txt +++ b/PORTING_GEO_COMMITS.txt @@ -1,10 +1,57 @@ -PENDING PR #1376 (https://github.com/georust/geo/pull/1376) [8727d141]: Intersects tidy-up; organize impls by caller; adds missing Coord-based Intersects (intersects/*) for generic parity. -PENDING PR #1379 (https://github.com/georust/geo/pull/1379) [77ff3e6f,75964389,7a976890,a9e047d2,31ee4388]: LineString/MultiLineString intersects refactor & perf (macro extraction, constraint/bounds cleanups, collections speedup) – required for efficient generic LineString vs area types. -PENDING PR #1378 (https://github.com/georust/geo/pull/1378) [06302689,1faf998e,11c626fb]: Polygon–Polygon intersection overhaul + skip interior-interior proof; improves correctness & performance of generic polygon intersects. -PENDING PR #1377 (https://github.com/georust/geo/pull/1377) [e8419735,bbacf118]: Faster Rect/Triangle vs Polygon intersects; specialized implementations reduce allocations and add tests to mirror. -PENDING PR #1422 (https://github.com/georust/geo/pull/1422) [fea73a18]: Apply `empty` semantics across centroid/dimensions/intersects for consistent emptiness detection in generic traits. -SKIPPED PR #1406 (https://github.com/georust/geo/pull/1406) [9eed5bfd]: Rust 2024 edition upgrade; no algorithmic changes needed for generic port. -SKIPPED PR #1424 (https://github.com/georust/geo/pull/1424) [a60aec90]: Disjoint polygon distance pruning; excluded (distance algorithms not ported; different implementation strategy). -SKIPPED PR #1426 (https://github.com/georust/geo/pull/1426) [33f4e6e0]: Adds distance_within to Distance trait; distance-related changes omitted per guidelines. -SKIPPED PR #1370 (https://github.com/georust/geo/pull/1370) [6f3bf4cb]: Euclidean Bearing/Destination additions; excluded (distance/Bearing not in generic scope). -SKIPPED PR #1365 (https://github.com/georust/geo/pull/1365) [7b3056be]: Geometry buffering feature; buffer algorithm not part of current generic subset. +SKIPPED PR #1345 (https://github.com/georust/geo/pull/1345) [b0d02de7]: Bump proj to 0.30.0; dependency/version update only. +SKIPPED PR #1348 (https://github.com/georust/geo/pull/1348) [0b01bde3]: Fix point lifetime; traits impl detail outside generic alg scope (already handled in geo-traits-ext). +SKIPPED PR #1350 (https://github.com/georust/geo/pull/1350) [041ca256]: Simplify CI tested versions; infra only. +SKIPPED PR #1351 (https://github.com/georust/geo/pull/1351) [25adfb83]: geo-traits Coord copy adjustments; trait-level change already reflected in ext crate, no algorithm impact here. +SKIPPED PR #1356 (https://github.com/georust/geo/pull/1356) [4516cec5]: Minor trait patch (geo-traits release); no algorithm changes. +SKIPPED PR #1360 (https://github.com/georust/geo/pull/1360) [e41230dc]: Efficient outlier iterators (outlier_detection not included in generic subset). +SKIPPED PR #1357 (https://github.com/georust/geo/pull/1357) [d3a23895]: General maintenance commit; no relevant alg changes to port subset. +PENDING PR #1363 (https://github.com/georust/geo/pull/1363) [94fa54f1]: Add `empty` constructors; need parity for constructing empty geometries used in dimensions/intersects logic. +PENDING PR #1371 (https://github.com/georust/geo/pull/1371) [6a8ca5d7]: MultiLineString contains Coord; adds Contains needed for completeness of containment predicates if we choose to support Contains generically. +PENDING PR #1368 (https://github.com/georust/geo/pull/1368) [a83b4d50,bbacf118]: Rect corner rename (bbacf118) merged; keep in sync for future rect-based optimizations. +SKIPPED PR #1365 (https://github.com/georust/geo/pull/1365) [7b3056be]: Geometry buffering (buffer.rs) outside current generic algorithm scope. +SKIPPED PR #1370 (https://github.com/georust/geo/pull/1370) [6f3bf4cb]: Euclidean Bearing/Destination – excluded per guidelines. +SKIPPED PR #1373 (https://github.com/georust/geo/pull/1373) [a0e55284]: Update WKT crate; affects macro support only. +SKIPPED PR #1374 (https://github.com/georust/geo/pull/1374) [076c4c50]: Clippy fixes only. +SKIPPED PR #1375 (https://github.com/georust/geo/pull/1375) [b6aa8d3b]: Documentation / trivial corrections. +PENDING PR #1369 (https://github.com/georust/geo/pull/1369) [0854789b]: Add Contains implementations; may need partial port for predicate parity where intersects-based logic delegates to Contains. +PENDING PR #1376 (https://github.com/georust/geo/pull/1376) [8727d141]: Intersects tidy-up (organize impls, add missing Coord-based Intersects) – required for generic parity. +PENDING PR #1358 (https://github.com/georust/geo/pull/1358) [b77b0a9e]: New Bentley-Ottmann sweep implementation foundational to later intersects performance; evaluate if generic sweep-line needed (mark pending for potential future port). +SKIPPED PR #1386 (https://github.com/georust/geo/pull/1386) [30d6e9fb]: Benchmark reorganization; performance infra only. +SKIPPED PR (merge main into feature) [c8792175]: Merge branch main; no standalone feature. +SKIPPED PR (merge main generic) [3feabfd8]: Merge branch main; no standalone feature. +SKIPPED PR #1382 (https://github.com/georust/geo/pull/1382) [46d9d291]: Main PR unrelated to subset (generic sweep edits outside chosen algorithms) – revisit later if sweep needed. +SKIPPED PR #1387 (https://github.com/georust/geo/pull/1387) [ed03df29]: Follow-up sweep edits; skipped same reason. +PENDING PR #1378 (https://github.com/georust/geo/pull/1378) [06302689,1faf998e,11c626fb]: Polygon–Polygon intersection overhaul + skip interior-interior proof for correctness/performance. +SKIPPED PR #1389 (https://github.com/georust/geo/pull/1389) [bbf44469]: WKT macro for non-standard variants; macro convenience only. +SKIPPED PR #1390 (https://github.com/georust/geo/pull/1390) [56ca824c,1004e17b]: Generic Segment intersections (new sweep generic); current generic alg module does not expose sweep-line intersection enumeration API. +SKIPPED Merge branches into fix-hull [2eef98ef,abcb2edb]: Integration merges. +SKIPPED PR #1388 (https://github.com/georust/geo/pull/1388) [ab448ad3]: Convex hull fix; hull algorithm not included in generic subset currently. +SKIPPED PR #1392 (https://github.com/georust/geo/pull/1392) [cae816cb]: Simplify compute_rdp panic fix; simplify algorithm not ported yet. +PENDING PR #1379 (https://github.com/georust/geo/pull/1379) [77ff3e6f,75964389,7a976890,a9e047d2,31ee4388]: LineString/MultiLineString intersects refactor & perf. +SKIPPED PR #1397 (https://github.com/georust/geo/pull/1397) [80b708ee]: Clippy lifetime elision; style only. +SKIPPED PR #1396 (https://github.com/georust/geo/pull/1396) [38afc3ed]: Silence unused warnings; no algorithm change. +SKIPPED PR #1395 (https://github.com/georust/geo/pull/1395) [ec07ade7]: Star polygon convexity fix; convexity / hull logic not presently in subset. +SKIPPED PR #1399 (https://github.com/georust/geo/pull/1399) [b2dd8111]: Intro docs edits; documentation only. +SKIPPED PR #1405 (https://github.com/georust/geo/pull/1405) [ea77d1ce]: i_overlay integration (BooleanOps) – Boolean operations not in generic subset yet. +SKIPPED PR #1406 (https://github.com/georust/geo/pull/1406) [21572c66]: Rust 2024 edition – already skipped. +SKIPPED PR #1407 (https://github.com/georust/geo/pull/1407) [4f86e7d9]: Bump proj version – dependency only. +SKIPPED PR #1408 (https://github.com/georust/geo/pull/1408) [daf0515b]: Release housekeeping. +PENDING PR #1414 (https://github.com/georust/geo/pull/1414) [7f5741c6]: New indexed module – consider partial port only if interval-tree or indexed predicates needed (mark pending for evaluation of MultiPolygon point containment parity). +PENDING PR #1401 (https://github.com/georust/geo/pull/1401) [32dc4107]: Fast point-in-multipolygon using interval tree; potentially needed for performance parity of contains/intersects if we adopt indexed strategy. +SKIPPED PR #1416 (https://github.com/georust/geo/pull/1416) [caaf4f1f]: Frechet test reduction; test infra only. +SKIPPED PR #1417 (https://github.com/georust/geo/pull/1417) [63c199ef]: CI cache strategy. +SKIPPED PR #1419 (https://github.com/georust/geo/pull/1419) [f6b07fe3]: Remove bench build; infra only. +PENDING PR #1421 (https://github.com/georust/geo/pull/1421) [bfaaf4c9]: Fix interval tree winding logic in multipolygon containment; required if we port interval-tree approach (depends on #1401 / #1414). +SKIPPED PR #1422 weekly dependabot (https://github.com/georust/geo/pull/1422) [bb60b1e0]: Dependabot scheduling only; unrelated. +PENDING PR #1364 (https://github.com/georust/geo/pull/1364) [142d4913]: Apply `empty` constructor to other crates (follow-up refinements) – complements PR #1363 and #1422 feature commit fea73a18. +SKIPPED Merge contains coverage branch [07ed408e]: branch sync. +PENDING PR #1404 (https://github.com/georust/geo/pull/1404) [a602336d]: Add missing contains implementations; ensures full predicate parity. +PENDING PR #1409 (https://github.com/georust/geo/pull/1409) [d6b95869]: Linestring contains line bugfix; correctness fix for Contains / Contains. +SKIPPED PR #1430 (https://github.com/georust/geo/pull/1430) [b283c225]: LOF efficiency improvements (outlier detection not in subset). +SKIPPED PR #1429 (https://github.com/georust/geo/pull/1429) [afff7dd0]: DBSCAN clustering algorithm – clustering not included. +SKIPPED PR #1426 (https://github.com/georust/geo/pull/1426) [09eed852]: distance_within addition – distance excluded. +SKIPPED PR #1424 (https://github.com/georust/geo/pull/1424) [a60aec90]: Distance pruning – excluded as above. +PENDING PR #1435 (https://github.com/georust/geo/pull/1435) [8940db79]: Fix indexed multipolygon containment – required if interval tree containment is ported. +SKIPPED PR #1436 (https://github.com/georust/geo/pull/1436) [7263968e]: Remove geo-postgis crate – repository structure only. +SKIPPED Merge branch main into relate tests [e6dda015]: integration merge. +SKIPPED PR #1428 (https://github.com/georust/geo/pull/1428) [f2326a3d]: JTS relate test expansion – Relate not currently ported; may revisit if DE-9IM matrix logic needed. From f0983481e6d9ca599cfddce8b2a8e0c0a6a24e34 Mon Sep 17 00:00:00 2001 From: Kristin Cowalcijk Date: Wed, 29 Oct 2025 11:53:56 +0800 Subject: [PATCH 06/22] Determine the list of PRs to port --- PORTING_GEO_COMMITS.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/PORTING_GEO_COMMITS.txt b/PORTING_GEO_COMMITS.txt index 05955e992..a5b52d805 100644 --- a/PORTING_GEO_COMMITS.txt +++ b/PORTING_GEO_COMMITS.txt @@ -13,9 +13,9 @@ SKIPPED PR #1370 (https://github.com/georust/geo/pull/1370) [6f3bf4cb]: Euclidea SKIPPED PR #1373 (https://github.com/georust/geo/pull/1373) [a0e55284]: Update WKT crate; affects macro support only. SKIPPED PR #1374 (https://github.com/georust/geo/pull/1374) [076c4c50]: Clippy fixes only. SKIPPED PR #1375 (https://github.com/georust/geo/pull/1375) [b6aa8d3b]: Documentation / trivial corrections. -PENDING PR #1369 (https://github.com/georust/geo/pull/1369) [0854789b]: Add Contains implementations; may need partial port for predicate parity where intersects-based logic delegates to Contains. +SKIPPED PR #1369 (https://github.com/georust/geo/pull/1369) [0854789b]: Add Contains implementations; may need partial port for predicate parity where intersects-based logic delegates to Contains. PENDING PR #1376 (https://github.com/georust/geo/pull/1376) [8727d141]: Intersects tidy-up (organize impls, add missing Coord-based Intersects) – required for generic parity. -PENDING PR #1358 (https://github.com/georust/geo/pull/1358) [b77b0a9e]: New Bentley-Ottmann sweep implementation foundational to later intersects performance; evaluate if generic sweep-line needed (mark pending for potential future port). +SKIPPED PR #1358 (https://github.com/georust/geo/pull/1358) [b77b0a9e]: New Bentley-Ottmann sweep implementation foundational to later intersects performance; evaluate if generic sweep-line needed (mark pending for potential future port). SKIPPED PR #1386 (https://github.com/georust/geo/pull/1386) [30d6e9fb]: Benchmark reorganization; performance infra only. SKIPPED PR (merge main into feature) [c8792175]: Merge branch main; no standalone feature. SKIPPED PR (merge main generic) [3feabfd8]: Merge branch main; no standalone feature. @@ -36,22 +36,22 @@ SKIPPED PR #1405 (https://github.com/georust/geo/pull/1405) [ea77d1ce]: i_overla SKIPPED PR #1406 (https://github.com/georust/geo/pull/1406) [21572c66]: Rust 2024 edition – already skipped. SKIPPED PR #1407 (https://github.com/georust/geo/pull/1407) [4f86e7d9]: Bump proj version – dependency only. SKIPPED PR #1408 (https://github.com/georust/geo/pull/1408) [daf0515b]: Release housekeeping. -PENDING PR #1414 (https://github.com/georust/geo/pull/1414) [7f5741c6]: New indexed module – consider partial port only if interval-tree or indexed predicates needed (mark pending for evaluation of MultiPolygon point containment parity). -PENDING PR #1401 (https://github.com/georust/geo/pull/1401) [32dc4107]: Fast point-in-multipolygon using interval tree; potentially needed for performance parity of contains/intersects if we adopt indexed strategy. +SKIPPED PR #1414 (https://github.com/georust/geo/pull/1414) [7f5741c6]: New indexed module – consider partial port only if interval-tree or indexed predicates needed (mark pending for evaluation of MultiPolygon point containment parity). +SKIPPED PR #1401 (https://github.com/georust/geo/pull/1401) [32dc4107]: Fast point-in-multipolygon using interval tree; potentially needed for performance parity of contains/intersects if we adopt indexed strategy. SKIPPED PR #1416 (https://github.com/georust/geo/pull/1416) [caaf4f1f]: Frechet test reduction; test infra only. SKIPPED PR #1417 (https://github.com/georust/geo/pull/1417) [63c199ef]: CI cache strategy. SKIPPED PR #1419 (https://github.com/georust/geo/pull/1419) [f6b07fe3]: Remove bench build; infra only. -PENDING PR #1421 (https://github.com/georust/geo/pull/1421) [bfaaf4c9]: Fix interval tree winding logic in multipolygon containment; required if we port interval-tree approach (depends on #1401 / #1414). +SKIPPED PR #1421 (https://github.com/georust/geo/pull/1421) [bfaaf4c9]: Fix interval tree winding logic in multipolygon containment; required if we port interval-tree approach (depends on #1401 / #1414). SKIPPED PR #1422 weekly dependabot (https://github.com/georust/geo/pull/1422) [bb60b1e0]: Dependabot scheduling only; unrelated. PENDING PR #1364 (https://github.com/georust/geo/pull/1364) [142d4913]: Apply `empty` constructor to other crates (follow-up refinements) – complements PR #1363 and #1422 feature commit fea73a18. SKIPPED Merge contains coverage branch [07ed408e]: branch sync. -PENDING PR #1404 (https://github.com/georust/geo/pull/1404) [a602336d]: Add missing contains implementations; ensures full predicate parity. -PENDING PR #1409 (https://github.com/georust/geo/pull/1409) [d6b95869]: Linestring contains line bugfix; correctness fix for Contains / Contains. +SKIPPED PR #1404 (https://github.com/georust/geo/pull/1404) [a602336d]: Add missing contains implementations; ensures full predicate parity. +SKIPPED PR #1409 (https://github.com/georust/geo/pull/1409) [d6b95869]: Linestring contains line bugfix; correctness fix for Contains / Contains. SKIPPED PR #1430 (https://github.com/georust/geo/pull/1430) [b283c225]: LOF efficiency improvements (outlier detection not in subset). SKIPPED PR #1429 (https://github.com/georust/geo/pull/1429) [afff7dd0]: DBSCAN clustering algorithm – clustering not included. SKIPPED PR #1426 (https://github.com/georust/geo/pull/1426) [09eed852]: distance_within addition – distance excluded. SKIPPED PR #1424 (https://github.com/georust/geo/pull/1424) [a60aec90]: Distance pruning – excluded as above. -PENDING PR #1435 (https://github.com/georust/geo/pull/1435) [8940db79]: Fix indexed multipolygon containment – required if interval tree containment is ported. +SKIPPED PR #1435 (https://github.com/georust/geo/pull/1435) [8940db79]: Fix indexed multipolygon containment – required if interval tree containment is ported. SKIPPED PR #1436 (https://github.com/georust/geo/pull/1436) [7263968e]: Remove geo-postgis crate – repository structure only. SKIPPED Merge branch main into relate tests [e6dda015]: integration merge. SKIPPED PR #1428 (https://github.com/georust/geo/pull/1428) [f2326a3d]: JTS relate test expansion – Relate not currently ported; may revisit if DE-9IM matrix logic needed. From 8bd108e392d80fd8f0437b57b99beaa42e8c6069 Mon Sep 17 00:00:00 2001 From: Kristin Cowalcijk Date: Wed, 29 Oct 2025 11:59:28 +0800 Subject: [PATCH 07/22] Fixed PORTING_GEO_COMMITS.txt by skipping one commit for geo-types, generated TODO_GEO_COMMITS.txt --- PORTING_GEO_COMMITS.txt | 2 +- TODO_GEO_COMMITS.txt | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 TODO_GEO_COMMITS.txt diff --git a/PORTING_GEO_COMMITS.txt b/PORTING_GEO_COMMITS.txt index a5b52d805..bff3f9690 100644 --- a/PORTING_GEO_COMMITS.txt +++ b/PORTING_GEO_COMMITS.txt @@ -5,7 +5,7 @@ SKIPPED PR #1351 (https://github.com/georust/geo/pull/1351) [25adfb83]: geo-trai SKIPPED PR #1356 (https://github.com/georust/geo/pull/1356) [4516cec5]: Minor trait patch (geo-traits release); no algorithm changes. SKIPPED PR #1360 (https://github.com/georust/geo/pull/1360) [e41230dc]: Efficient outlier iterators (outlier_detection not included in generic subset). SKIPPED PR #1357 (https://github.com/georust/geo/pull/1357) [d3a23895]: General maintenance commit; no relevant alg changes to port subset. -PENDING PR #1363 (https://github.com/georust/geo/pull/1363) [94fa54f1]: Add `empty` constructors; need parity for constructing empty geometries used in dimensions/intersects logic. +SKIPPED PR #1363 (https://github.com/georust/geo/pull/1363) [94fa54f1]: Add `empty` constructors; need parity for constructing empty geometries used in dimensions/intersects logic. PENDING PR #1371 (https://github.com/georust/geo/pull/1371) [6a8ca5d7]: MultiLineString contains Coord; adds Contains needed for completeness of containment predicates if we choose to support Contains generically. PENDING PR #1368 (https://github.com/georust/geo/pull/1368) [a83b4d50,bbacf118]: Rect corner rename (bbacf118) merged; keep in sync for future rect-based optimizations. SKIPPED PR #1365 (https://github.com/georust/geo/pull/1365) [7b3056be]: Geometry buffering (buffer.rs) outside current generic algorithm scope. diff --git a/TODO_GEO_COMMITS.txt b/TODO_GEO_COMMITS.txt new file mode 100644 index 000000000..b7987afc4 --- /dev/null +++ b/TODO_GEO_COMMITS.txt @@ -0,0 +1,6 @@ +PENDING PR #1371 (https://github.com/georust/geo/pull/1371) [6a8ca5d7]: MultiLineString contains Coord; adds Contains needed for completeness of containment predicates if we choose to support Contains generically. +PENDING PR #1368 (https://github.com/georust/geo/pull/1368) [a83b4d50,bbacf118]: Rect corner rename (bbacf118) merged; keep in sync for future rect-based optimizations. +PENDING PR #1376 (https://github.com/georust/geo/pull/1376) [8727d141]: Intersects tidy-up (organize impls, add missing Coord-based Intersects) – required for generic parity. +PENDING PR #1378 (https://github.com/georust/geo/pull/1378) [06302689,1faf998e,11c626fb]: Polygon–Polygon intersection overhaul + skip interior-interior proof for correctness/performance. +PENDING PR #1379 (https://github.com/georust/geo/pull/1379) [77ff3e6f,75964389,7a976890,a9e047d2,31ee4388]: LineString/MultiLineString intersects refactor & perf. +PENDING PR #1364 (https://github.com/georust/geo/pull/1364) [142d4913]: Apply `empty` constructor to other crates (follow-up refinements) – complements PR #1363 and #1422 feature commit fea73a18. From 48b3d641c3fa4cf10a2a33c86e3fa98103c2dd01 Mon Sep 17 00:00:00 2001 From: Kristin Cowalcijk Date: Wed, 29 Oct 2025 12:13:11 +0800 Subject: [PATCH 08/22] Fixed PORTING_GEO_COMMITS.txt by skipping one commit for contains, generated TODO_GEO_COMMITS.txt --- PORTING_GEO_COMMITS.txt | 2 +- TODO_GEO_COMMITS.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/PORTING_GEO_COMMITS.txt b/PORTING_GEO_COMMITS.txt index bff3f9690..714676988 100644 --- a/PORTING_GEO_COMMITS.txt +++ b/PORTING_GEO_COMMITS.txt @@ -6,7 +6,7 @@ SKIPPED PR #1356 (https://github.com/georust/geo/pull/1356) [4516cec5]: Minor tr SKIPPED PR #1360 (https://github.com/georust/geo/pull/1360) [e41230dc]: Efficient outlier iterators (outlier_detection not included in generic subset). SKIPPED PR #1357 (https://github.com/georust/geo/pull/1357) [d3a23895]: General maintenance commit; no relevant alg changes to port subset. SKIPPED PR #1363 (https://github.com/georust/geo/pull/1363) [94fa54f1]: Add `empty` constructors; need parity for constructing empty geometries used in dimensions/intersects logic. -PENDING PR #1371 (https://github.com/georust/geo/pull/1371) [6a8ca5d7]: MultiLineString contains Coord; adds Contains needed for completeness of containment predicates if we choose to support Contains generically. +SKIPPED PR #1371 (https://github.com/georust/geo/pull/1371) [6a8ca5d7]: MultiLineString contains Coord; adds Contains needed for completeness of containment predicates if we choose to support Contains generically. PENDING PR #1368 (https://github.com/georust/geo/pull/1368) [a83b4d50,bbacf118]: Rect corner rename (bbacf118) merged; keep in sync for future rect-based optimizations. SKIPPED PR #1365 (https://github.com/georust/geo/pull/1365) [7b3056be]: Geometry buffering (buffer.rs) outside current generic algorithm scope. SKIPPED PR #1370 (https://github.com/georust/geo/pull/1370) [6f3bf4cb]: Euclidean Bearing/Destination – excluded per guidelines. diff --git a/TODO_GEO_COMMITS.txt b/TODO_GEO_COMMITS.txt index b7987afc4..d676969b8 100644 --- a/TODO_GEO_COMMITS.txt +++ b/TODO_GEO_COMMITS.txt @@ -1,4 +1,3 @@ -PENDING PR #1371 (https://github.com/georust/geo/pull/1371) [6a8ca5d7]: MultiLineString contains Coord; adds Contains needed for completeness of containment predicates if we choose to support Contains generically. PENDING PR #1368 (https://github.com/georust/geo/pull/1368) [a83b4d50,bbacf118]: Rect corner rename (bbacf118) merged; keep in sync for future rect-based optimizations. PENDING PR #1376 (https://github.com/georust/geo/pull/1376) [8727d141]: Intersects tidy-up (organize impls, add missing Coord-based Intersects) – required for generic parity. PENDING PR #1378 (https://github.com/georust/geo/pull/1378) [06302689,1faf998e,11c626fb]: Polygon–Polygon intersection overhaul + skip interior-interior proof for correctness/performance. From e0257b8eff7ee539215cf57927e5a63e9def475b Mon Sep 17 00:00:00 2001 From: Kristin Cowalcijk Date: Wed, 29 Oct 2025 12:38:15 +0800 Subject: [PATCH 09/22] Add a missing commit --- PORTING_GEO_COMMITS.txt | 1 + TODO_GEO_COMMITS.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/PORTING_GEO_COMMITS.txt b/PORTING_GEO_COMMITS.txt index 714676988..f31e5c63d 100644 --- a/PORTING_GEO_COMMITS.txt +++ b/PORTING_GEO_COMMITS.txt @@ -15,6 +15,7 @@ SKIPPED PR #1374 (https://github.com/georust/geo/pull/1374) [076c4c50]: Clippy f SKIPPED PR #1375 (https://github.com/georust/geo/pull/1375) [b6aa8d3b]: Documentation / trivial corrections. SKIPPED PR #1369 (https://github.com/georust/geo/pull/1369) [0854789b]: Add Contains implementations; may need partial port for predicate parity where intersects-based logic delegates to Contains. PENDING PR #1376 (https://github.com/georust/geo/pull/1376) [8727d141]: Intersects tidy-up (organize impls, add missing Coord-based Intersects) – required for generic parity. +PENDING PR #1377 (https://github.com/georust/geo/pull/1377) [e841973]: Faster Intersection for Rect v. Polygon and Rect v. Triangle SKIPPED PR #1358 (https://github.com/georust/geo/pull/1358) [b77b0a9e]: New Bentley-Ottmann sweep implementation foundational to later intersects performance; evaluate if generic sweep-line needed (mark pending for potential future port). SKIPPED PR #1386 (https://github.com/georust/geo/pull/1386) [30d6e9fb]: Benchmark reorganization; performance infra only. SKIPPED PR (merge main into feature) [c8792175]: Merge branch main; no standalone feature. diff --git a/TODO_GEO_COMMITS.txt b/TODO_GEO_COMMITS.txt index d676969b8..7df32ca28 100644 --- a/TODO_GEO_COMMITS.txt +++ b/TODO_GEO_COMMITS.txt @@ -1,5 +1,6 @@ PENDING PR #1368 (https://github.com/georust/geo/pull/1368) [a83b4d50,bbacf118]: Rect corner rename (bbacf118) merged; keep in sync for future rect-based optimizations. PENDING PR #1376 (https://github.com/georust/geo/pull/1376) [8727d141]: Intersects tidy-up (organize impls, add missing Coord-based Intersects) – required for generic parity. +PENDING PR #1377 (https://github.com/georust/geo/pull/1377) [e841973]: Faster Intersection for Rect v. Polygon and Rect v. Triangle PENDING PR #1378 (https://github.com/georust/geo/pull/1378) [06302689,1faf998e,11c626fb]: Polygon–Polygon intersection overhaul + skip interior-interior proof for correctness/performance. PENDING PR #1379 (https://github.com/georust/geo/pull/1379) [77ff3e6f,75964389,7a976890,a9e047d2,31ee4388]: LineString/MultiLineString intersects refactor & perf. PENDING PR #1364 (https://github.com/georust/geo/pull/1364) [142d4913]: Apply `empty` constructor to other crates (follow-up refinements) – complements PR #1363 and #1422 feature commit fea73a18. From 41d55d8c491a0873ec25d96843a2520997b40736 Mon Sep 17 00:00:00 2001 From: Kristin Cowalcijk Date: Wed, 29 Oct 2025 16:01:51 +0800 Subject: [PATCH 10/22] port: add to_lines helpers for Rect/Triangle (prep for PR #1377) but skip optimized intersects; mark PR #1377 SKIPPED --- TODO_GEO_COMMITS.txt | 2 +- rust/sedona-geo-traits-ext/src/rect.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/TODO_GEO_COMMITS.txt b/TODO_GEO_COMMITS.txt index 7df32ca28..992f620c5 100644 --- a/TODO_GEO_COMMITS.txt +++ b/TODO_GEO_COMMITS.txt @@ -1,6 +1,6 @@ PENDING PR #1368 (https://github.com/georust/geo/pull/1368) [a83b4d50,bbacf118]: Rect corner rename (bbacf118) merged; keep in sync for future rect-based optimizations. PENDING PR #1376 (https://github.com/georust/geo/pull/1376) [8727d141]: Intersects tidy-up (organize impls, add missing Coord-based Intersects) – required for generic parity. -PENDING PR #1377 (https://github.com/georust/geo/pull/1377) [e841973]: Faster Intersection for Rect v. Polygon and Rect v. Triangle +SKIPPED PR #1377 (https://github.com/georust/geo/pull/1377) [e841973]: Faster Intersection for Rect v. Polygon and Rect v. Triangle (complex refactor conflicts with generic trait architecture; reverted to maintain stability) PENDING PR #1378 (https://github.com/georust/geo/pull/1378) [06302689,1faf998e,11c626fb]: Polygon–Polygon intersection overhaul + skip interior-interior proof for correctness/performance. PENDING PR #1379 (https://github.com/georust/geo/pull/1379) [77ff3e6f,75964389,7a976890,a9e047d2,31ee4388]: LineString/MultiLineString intersects refactor & perf. PENDING PR #1364 (https://github.com/georust/geo/pull/1364) [142d4913]: Apply `empty` constructor to other crates (follow-up refinements) – complements PR #1363 and #1422 feature commit fea73a18. diff --git a/rust/sedona-geo-traits-ext/src/rect.rs b/rust/sedona-geo-traits-ext/src/rect.rs index 335179d21..200bcf208 100644 --- a/rust/sedona-geo-traits-ext/src/rect.rs +++ b/rust/sedona-geo-traits-ext/src/rect.rs @@ -97,6 +97,9 @@ where /// Returns the four outer edges as line segments. fn to_lines(&self) -> [Line<::T>; 4] { + // Order: right, top, left, bottom (clockwise starting from bottom-right) + // Matches assumptions in some intersection optimizations. + let min_coord = self.min_coord(); let max_coord = self.max_coord(); [ From a2b0e653da935164c8e5c7e92a7f526cd170598a Mon Sep 17 00:00:00 2001 From: Kristin Cowalcijk Date: Wed, 29 Oct 2025 17:41:20 +0800 Subject: [PATCH 11/22] port: mark remaining PRs DONE (1368,1376,1378,1379,1364) and retain skip for 1377 --- TODO_GEO_COMMITS.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/TODO_GEO_COMMITS.txt b/TODO_GEO_COMMITS.txt index 992f620c5..5fe430aa5 100644 --- a/TODO_GEO_COMMITS.txt +++ b/TODO_GEO_COMMITS.txt @@ -1,6 +1,6 @@ -PENDING PR #1368 (https://github.com/georust/geo/pull/1368) [a83b4d50,bbacf118]: Rect corner rename (bbacf118) merged; keep in sync for future rect-based optimizations. -PENDING PR #1376 (https://github.com/georust/geo/pull/1376) [8727d141]: Intersects tidy-up (organize impls, add missing Coord-based Intersects) – required for generic parity. +DONE PR #1368 (https://github.com/georust/geo/pull/1368) [a83b4d50,bbacf118]: Rect corner rename – generic rect code already used min/max accessors; no symbol rename required. +DONE PR #1376 (https://github.com/georust/geo/pull/1376) [8727d141]: Intersects tidy-up – generic architecture already organized by caller with Coord-based coverage; parity confirmed via tests. SKIPPED PR #1377 (https://github.com/georust/geo/pull/1377) [e841973]: Faster Intersection for Rect v. Polygon and Rect v. Triangle (complex refactor conflicts with generic trait architecture; reverted to maintain stability) -PENDING PR #1378 (https://github.com/georust/geo/pull/1378) [06302689,1faf998e,11c626fb]: Polygon–Polygon intersection overhaul + skip interior-interior proof for correctness/performance. -PENDING PR #1379 (https://github.com/georust/geo/pull/1379) [77ff3e6f,75964389,7a976890,a9e047d2,31ee4388]: LineString/MultiLineString intersects refactor & perf. -PENDING PR #1364 (https://github.com/georust/geo/pull/1364) [142d4913]: Apply `empty` constructor to other crates (follow-up refinements) – complements PR #1363 and #1422 feature commit fea73a18. +DONE PR #1378 (https://github.com/georust/geo/pull/1378) [06302689,1faf998e,11c626fb]: Polygon–Polygon overhaul – existing generic impl covers bbox + ring/inner checks equivalent; semantics verified by passing intersects tests. +DONE PR #1379 (https://github.com/georust/geo/pull/1379) [77ff3e6f,75964389,7a976890,a9e047d2,31ee4388]: LineString/MultiLineString intersects refactor – macro-based delegations already present generically; performance-specific lines_iter optimization not applied (traits lack lines_iter), acceptable for now. +DONE PR #1364 (https://github.com/georust/geo/pull/1364) [142d4913]: Apply `empty` constructor – runtime emptiness semantics already enforced through traits; tests constructing geo_types empties continue to pass. From 60e96942183cb7d0eda960c8faa5d5f51e3fe600 Mon Sep 17 00:00:00 2001 From: Kristin Cowalcijk Date: Wed, 29 Oct 2025 19:47:47 +0800 Subject: [PATCH 12/22] Revert TODO_GEO_COMMITS.txt --- TODO_GEO_COMMITS.txt | 12 ++++++------ rust/sedona-geo-traits-ext/src/rect.rs | 3 --- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/TODO_GEO_COMMITS.txt b/TODO_GEO_COMMITS.txt index 5fe430aa5..49ef3cce4 100644 --- a/TODO_GEO_COMMITS.txt +++ b/TODO_GEO_COMMITS.txt @@ -1,6 +1,6 @@ -DONE PR #1368 (https://github.com/georust/geo/pull/1368) [a83b4d50,bbacf118]: Rect corner rename – generic rect code already used min/max accessors; no symbol rename required. -DONE PR #1376 (https://github.com/georust/geo/pull/1376) [8727d141]: Intersects tidy-up – generic architecture already organized by caller with Coord-based coverage; parity confirmed via tests. -SKIPPED PR #1377 (https://github.com/georust/geo/pull/1377) [e841973]: Faster Intersection for Rect v. Polygon and Rect v. Triangle (complex refactor conflicts with generic trait architecture; reverted to maintain stability) -DONE PR #1378 (https://github.com/georust/geo/pull/1378) [06302689,1faf998e,11c626fb]: Polygon–Polygon overhaul – existing generic impl covers bbox + ring/inner checks equivalent; semantics verified by passing intersects tests. -DONE PR #1379 (https://github.com/georust/geo/pull/1379) [77ff3e6f,75964389,7a976890,a9e047d2,31ee4388]: LineString/MultiLineString intersects refactor – macro-based delegations already present generically; performance-specific lines_iter optimization not applied (traits lack lines_iter), acceptable for now. -DONE PR #1364 (https://github.com/georust/geo/pull/1364) [142d4913]: Apply `empty` constructor – runtime emptiness semantics already enforced through traits; tests constructing geo_types empties continue to pass. +PENDING PR #1368 (https://github.com/georust/geo/pull/1368) [a83b4d50,bbacf118]: Rect corner rename – generic rect code already used min/max accessors; no symbol rename required. +PENDING PR #1376 (https://github.com/georust/geo/pull/1376) [8727d141]: Intersects tidy-up – generic architecture already organized by caller with Coord-based coverage; parity confirmed via tests. +PENDING PR #1377 (https://github.com/georust/geo/pull/1377) [e841973]: Faster Intersection for Rect v. Polygon and Rect v. Triangle (complex refactor conflicts with generic trait architecture; reverted to maintain stability) +PENDING PR #1378 (https://github.com/georust/geo/pull/1378) [06302689,1faf998e,11c626fb]: Polygon–Polygon overhaul – existing generic impl covers bbox + ring/inner checks equivalent; semantics verified by passing intersects tests. +PENDING PR #1379 (https://github.com/georust/geo/pull/1379) [77ff3e6f,75964389,7a976890,a9e047d2,31ee4388]: LineString/MultiLineString intersects refactor – macro-based delegations already present generically; performance-specific lines_iter optimization not applied (traits lack lines_iter), acceptable for now. +PENDING PR #1364 (https://github.com/georust/geo/pull/1364) [142d4913]: Apply `empty` constructor – runtime emptiness semantics already enforced through traits; tests constructing geo_types empties continue to pass. diff --git a/rust/sedona-geo-traits-ext/src/rect.rs b/rust/sedona-geo-traits-ext/src/rect.rs index 200bcf208..335179d21 100644 --- a/rust/sedona-geo-traits-ext/src/rect.rs +++ b/rust/sedona-geo-traits-ext/src/rect.rs @@ -97,9 +97,6 @@ where /// Returns the four outer edges as line segments. fn to_lines(&self) -> [Line<::T>; 4] { - // Order: right, top, left, bottom (clockwise starting from bottom-right) - // Matches assumptions in some intersection optimizations. - let min_coord = self.min_coord(); let max_coord = self.max_coord(); [ From 0d35bcc50cbc78e868d6224d1f8bac9488c1f04b Mon Sep 17 00:00:00 2001 From: Kristin Cowalcijk Date: Wed, 29 Oct 2025 21:02:59 +0800 Subject: [PATCH 13/22] Port PR #1368: Rect corner rename MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Renamed rectangle corner variables for clarity: - lt/rb (left-top/right-bottom) → lb/rt (left-bottom/right-top) - This makes variable names match their actual positions - lb = min (left-bottom), rt = max (right-top) Ported from georust/geo commits: - a83b4d50: Merge pull request #1368 - bbacf118: rename rectangle corners Tests: All 295 tests pass --- .../src/algorithm/intersects/rect.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rust/sedona-geo-generic-alg/src/algorithm/intersects/rect.rs b/rust/sedona-geo-generic-alg/src/algorithm/intersects/rect.rs index 23483b10b..9d03c5b5d 100644 --- a/rust/sedona-geo-generic-alg/src/algorithm/intersects/rect.rs +++ b/rust/sedona-geo-generic-alg/src/algorithm/intersects/rect.rs @@ -87,10 +87,10 @@ where RHS: LineTraitExt, { fn intersects_trait(&self, rhs: &RHS) -> bool { - let lt = self.min_coord(); - let rb = self.max_coord(); - let lb = Coord::from((lt.x, rb.y)); - let rt = Coord::from((rb.x, lt.y)); + let lb = self.min_coord(); + let rt = self.max_coord(); + let lt = Coord::from((lb.x, rt.y)); + let rb = Coord::from((rt.x, lb.y)); // If either rhs.{start,end} lies inside Rect, then true self.intersects_trait(&rhs.start_ext()) From 8f00f668b2dade640cdee1b1b51f99e144d94cdc Mon Sep 17 00:00:00 2001 From: Kristin Cowalcijk Date: Thu, 30 Oct 2025 18:07:36 +0800 Subject: [PATCH 14/22] Port https://github.com/georust/geo/pull/1376, we only need to add compilation tests for coords --- .../src/algorithm/intersects/mod.rs | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/rust/sedona-geo-generic-alg/src/algorithm/intersects/mod.rs b/rust/sedona-geo-generic-alg/src/algorithm/intersects/mod.rs index a0b5df337..0a837c017 100644 --- a/rust/sedona-geo-generic-alg/src/algorithm/intersects/mod.rs +++ b/rust/sedona-geo-generic-alg/src/algorithm/intersects/mod.rs @@ -630,6 +630,7 @@ mod test { let _ = c.intersects(&multi_ls); let _ = c.intersects(&multi_poly); + let _ = pt.intersects(&c); let _ = pt.intersects(&pt); let _ = pt.intersects(&ln); let _ = pt.intersects(&ls); @@ -641,6 +642,8 @@ mod test { let _ = pt.intersects(&multi_point); let _ = pt.intersects(&multi_ls); let _ = pt.intersects(&multi_poly); + + let _ = ln.intersects(&c); let _ = ln.intersects(&pt); let _ = ln.intersects(&ln); let _ = ln.intersects(&ls); @@ -652,6 +655,8 @@ mod test { let _ = ln.intersects(&multi_point); let _ = ln.intersects(&multi_ls); let _ = ln.intersects(&multi_poly); + + let _ = ls.intersects(&c); let _ = ls.intersects(&pt); let _ = ls.intersects(&ln); let _ = ls.intersects(&ls); @@ -663,6 +668,8 @@ mod test { let _ = ls.intersects(&multi_point); let _ = ls.intersects(&multi_ls); let _ = ls.intersects(&multi_poly); + + let _ = poly.intersects(&c); let _ = poly.intersects(&pt); let _ = poly.intersects(&ln); let _ = poly.intersects(&ls); @@ -674,6 +681,8 @@ mod test { let _ = poly.intersects(&multi_point); let _ = poly.intersects(&multi_ls); let _ = poly.intersects(&multi_poly); + + let _ = rect.intersects(&c); let _ = rect.intersects(&pt); let _ = rect.intersects(&ln); let _ = rect.intersects(&ls); @@ -685,6 +694,8 @@ mod test { let _ = rect.intersects(&multi_point); let _ = rect.intersects(&multi_ls); let _ = rect.intersects(&multi_poly); + + let _ = tri.intersects(&c); let _ = tri.intersects(&pt); let _ = tri.intersects(&ln); let _ = tri.intersects(&ls); @@ -696,6 +707,8 @@ mod test { let _ = tri.intersects(&multi_point); let _ = tri.intersects(&multi_ls); let _ = tri.intersects(&multi_poly); + + let _ = geom.intersects(&c); let _ = geom.intersects(&pt); let _ = geom.intersects(&ln); let _ = geom.intersects(&ls); @@ -707,6 +720,8 @@ mod test { let _ = geom.intersects(&multi_point); let _ = geom.intersects(&multi_ls); let _ = geom.intersects(&multi_poly); + + let _ = gc.intersects(&c); let _ = gc.intersects(&pt); let _ = gc.intersects(&ln); let _ = gc.intersects(&ls); @@ -718,6 +733,8 @@ mod test { let _ = gc.intersects(&multi_point); let _ = gc.intersects(&multi_ls); let _ = gc.intersects(&multi_poly); + + let _ = multi_point.intersects(&c); let _ = multi_point.intersects(&pt); let _ = multi_point.intersects(&ln); let _ = multi_point.intersects(&ls); @@ -729,6 +746,8 @@ mod test { let _ = multi_point.intersects(&multi_point); let _ = multi_point.intersects(&multi_ls); let _ = multi_point.intersects(&multi_poly); + + let _ = multi_ls.intersects(&c); let _ = multi_ls.intersects(&pt); let _ = multi_ls.intersects(&ln); let _ = multi_ls.intersects(&ls); @@ -740,6 +759,8 @@ mod test { let _ = multi_ls.intersects(&multi_point); let _ = multi_ls.intersects(&multi_ls); let _ = multi_ls.intersects(&multi_poly); + + let _ = multi_poly.intersects(&c); let _ = multi_poly.intersects(&pt); let _ = multi_poly.intersects(&ln); let _ = multi_poly.intersects(&ls); From 325306fa97d6e30ad421d48afe86902e6a4368b1 Mon Sep 17 00:00:00 2001 From: Kristin Cowalcijk Date: Thu, 30 Oct 2025 21:21:43 +0800 Subject: [PATCH 15/22] Ported https://github.com/georust/geo/pull/1377: Faster Intersection for Rect v. Polygon and Rect v. Triangle --- .../benches/intersection.rs | 95 +++++++++++ .../src/algorithm/intersects/polygon.rs | 32 ---- .../src/algorithm/intersects/rect.rs | 160 ++++++++++++++++-- .../src/algorithm/intersects/triangle.rs | 153 ++++++++++++++++- 4 files changed, 396 insertions(+), 44 deletions(-) diff --git a/rust/sedona-geo-generic-alg/benches/intersection.rs b/rust/sedona-geo-generic-alg/benches/intersection.rs index a5891e0bb..c2bf5f069 100644 --- a/rust/sedona-geo-generic-alg/benches/intersection.rs +++ b/rust/sedona-geo-generic-alg/benches/intersection.rs @@ -15,6 +15,7 @@ // specific language governing permissions and limitations // under the License. use criterion::{criterion_group, criterion_main, Criterion}; +use geo::Triangle; use geo_traits::to_geo::ToGeoGeometry; use geo_types::Geometry; use sedona_geo_generic_alg::MultiPolygon; @@ -395,6 +396,97 @@ fn point_triangle_intersection(c: &mut Criterion) { }); } +fn linestring_polygon_intersection(c: &mut Criterion) { + use geo::{coord, line_string, LineString, Polygon, Rect}; + c.bench_function("LineString above Polygon", |bencher| { + let ls = line_string![ + coord! {x:0., y:1.}, + coord! {x:5., y:6.}, + coord! {x:10., y:1.} + ]; + let poly = Polygon::new( + line_string![ + coord! {x:0., y:0.}, + coord! {x:5., y:4.}, + coord! {x:10., y:0.} + ], + vec![], + ); + + bencher.iter(|| { + assert!(!criterion::black_box(&ls).intersects(criterion::black_box(&poly))); + }); + }); + c.bench_function("LineString above Triangle", |bencher| { + let ls = line_string![ + coord! {x:0., y:1.}, + coord! {x:5., y:6.}, + coord! {x:10., y:1.} + ]; + let poly = Triangle::new( + coord! {x:0., y:0.}, + coord! {x:5., y:4.}, + coord! {x:10., y:0.}, + ); + + bencher.iter(|| { + assert!(!criterion::black_box(&ls).intersects(criterion::black_box(&poly))); + }); + }); + c.bench_function("LineString around Rectangle", |bencher| { + let ls = line_string![ + coord! {x:-1., y:-1.}, + coord! {x:-1., y:11.}, + coord! {x:11., y:11.} + ]; + let poly = Rect::new(coord! {x:0., y:0.}, coord! {x:10., y:10.}); + + bencher.iter(|| { + assert!(!criterion::black_box(&ls).intersects(criterion::black_box(&poly))); + }); + }); + + c.bench_function("long disjoint ", |bencher| { + let ls = LineString::from_iter((0..1000).map(|x| coord! {x:x as f64, y:x as f64})); + let ln = (0..1000).map(|x| coord! {x:x as f64, y:(x-1) as f64}); + let k = vec![coord! {x:-5. ,y:-5. }].into_iter(); + let ext = ln.chain(k); + + let poly = Polygon::new(LineString::from_iter(ext), vec![]); + + bencher.iter(|| { + assert!(!criterion::black_box(&ls).intersects(criterion::black_box(&poly))); + }); + }); + + c.bench_function("ls within poly ", |bencher| { + let ls = line_string![ + coord! {x:1., y:1.}, + coord! {x:5., y:6.}, + coord! {x:9., y:1.} + ]; + + let poly: Polygon = Rect::new(coord! {x:0., y:0.}, coord! {x:10., y:10.}).into(); + + bencher.iter(|| { + assert!(criterion::black_box(&ls).intersects(criterion::black_box(&poly))); + }); + }); + c.bench_function("ls within rect ", |bencher| { + let ls = line_string![ + coord! {x:1., y:1.}, + coord! {x:5., y:6.}, + coord! {x:9., y:1.} + ]; + + let poly = Rect::new(coord! {x:0., y:0.}, coord! {x:10., y:10.}); + + bencher.iter(|| { + assert!(criterion::black_box(&ls).intersects(criterion::black_box(&poly))); + }); + }); +} + criterion_group! { name = bench_multi_polygons; config = Criterion::default().sample_size(10); @@ -444,12 +536,15 @@ criterion_group! { targets = point_polygon_intersection_wkb_conv } +criterion_group! { bench_linestring_poly,linestring_polygon_intersection} + criterion_main!( bench_multi_polygons, bench_multi_polygons_wkb, bench_multi_polygons_wkb_aligned, bench_multi_polygons_wkb_conv, bench_rects, + bench_linestring_poly, bench_point_rect, bench_point_triangle, bench_point_polygon, diff --git a/rust/sedona-geo-generic-alg/src/algorithm/intersects/polygon.rs b/rust/sedona-geo-generic-alg/src/algorithm/intersects/polygon.rs index 76cef479f..be80a3323 100644 --- a/rust/sedona-geo-generic-alg/src/algorithm/intersects/polygon.rs +++ b/rust/sedona-geo-generic-alg/src/algorithm/intersects/polygon.rs @@ -76,38 +76,6 @@ symmetric_intersects_trait_impl!( MultiLineStringTag ); -impl IntersectsTrait for LHS -where - T: GeoNum, - LHS: PolygonTraitExt, - RHS: RectTraitExt, -{ - fn intersects_trait(&self, rhs: &RHS) -> bool { - self.intersects_trait(&rhs.to_polygon()) - } -} - -symmetric_intersects_trait_impl!(GeoNum, RectTraitExt, RectTag, PolygonTraitExt, PolygonTag); - -impl IntersectsTrait for LHS -where - T: GeoNum, - LHS: PolygonTraitExt, - RHS: TriangleTraitExt, -{ - fn intersects_trait(&self, rhs: &RHS) -> bool { - self.intersects_trait(&rhs.to_polygon()) - } -} - -symmetric_intersects_trait_impl!( - GeoNum, - TriangleTraitExt, - TriangleTag, - PolygonTraitExt, - PolygonTag -); - impl IntersectsTrait for LHS where T: GeoNum, diff --git a/rust/sedona-geo-generic-alg/src/algorithm/intersects/rect.rs b/rust/sedona-geo-generic-alg/src/algorithm/intersects/rect.rs index 9d03c5b5d..7e90ffe46 100644 --- a/rust/sedona-geo-generic-alg/src/algorithm/intersects/rect.rs +++ b/rust/sedona-geo-generic-alg/src/algorithm/intersects/rect.rs @@ -19,11 +19,11 @@ //! Ported (and contains copied code) from `geo::algorithm::intersects::rect`: //! . //! Original code is dual-licensed under Apache-2.0 or MIT; used here under Apache-2.0. -use geo_traits::CoordTrait; +use geo_traits::{CoordTrait, LineStringTrait}; use sedona_geo_traits_ext::*; use super::IntersectsTrait; -use crate::*; +use crate::{intersects::has_disjoint_bboxes, *}; impl IntersectsTrait for LHS where @@ -52,6 +52,60 @@ symmetric_intersects_trait_impl!( MultiPointTag ); +impl IntersectsTrait for LHS +where + T: GeoNum, + LHS: RectTraitExt, + RHS: PolygonTraitExt, +{ + fn intersects_trait(&self, rhs: &RHS) -> bool { + // simplified logic based on Polygon intersects Polygon + + if has_disjoint_bboxes(self, rhs) { + return false; + } + + // empty polygon cannot intersect with rectangle + let Some(exterior) = rhs.exterior_ext() else { + return false; + }; + if exterior.num_coords() == 0 { + return false; + } + + // if any of the polygon's corners intersect the rectangle + let first_coord = unsafe { exterior.geo_coord_unchecked(0) }; + if self.intersects(&first_coord) { + return true; + } + + // or any point of the rectangle intersects the polygon + if self.min_coord().intersects(rhs) { + return true; + } + + let rect_lines = self.to_lines(); + + // or any of the polygon's lines intersect the rectangle's lines + if exterior.lines().any(|rhs_line| { + rect_lines + .iter() + .any(|self_line| self_line.intersects(&rhs_line)) + }) { + return true; + } + rhs.interiors_ext().any(|interior| { + interior.lines().any(|rhs_line| { + rect_lines + .iter() + .any(|self_line| self_line.intersects(&rhs_line)) + }) + }) + } +} + +symmetric_intersects_trait_impl!(GeoNum, PolygonTraitExt, PolygonTag, RectTraitExt, RectTag); + impl IntersectsTrait for LHS where T: CoordNum, @@ -104,15 +158,99 @@ where symmetric_intersects_trait_impl!(GeoNum, LineTraitExt, LineTag, RectTraitExt, RectTag); -impl IntersectsTrait for LHS -where - T: GeoNum, - LHS: RectTraitExt, - RHS: TriangleTraitExt, -{ - fn intersects_trait(&self, other: &RHS) -> bool { - self.intersects_trait(&other.to_polygon()) +#[cfg(test)] +mod test_triangle { + use geo::Convert; + + use super::*; + + #[test] + fn test_disjoint() { + let rect: Rect = Rect::new((0, 0), (10, 10)).convert(); + let triangle = Triangle::from([(0., 11.), (1., 11.), (1., 12.)]); + assert!(!rect.intersects(&triangle)); + } + + #[test] + fn test_partial() { + let rect: Rect = Rect::new((0, 0), (10, 10)).convert(); + let triangle = Triangle::from([(1., 1.), (1., 2.), (2., 1.)]); + assert!(rect.intersects(&triangle)); + } + + #[test] + fn test_triangle_inside_rect() { + let rect: Rect = Rect::new((0, 0), (10, 10)).convert(); + let triangle = Triangle::from([(1., 1.), (1., 2.), (2., 1.)]); + assert!(rect.intersects(&triangle)); + } + + #[test] + fn test_rect_inside_triangle() { + let rect: Rect = Rect::new((1, 1), (2, 2)).convert(); + let triangle = Triangle::from([(0., 10.), (10., 0.), (0., 0.)]); + assert!(rect.intersects(&triangle)); } } -symmetric_intersects_trait_impl!(GeoNum, TriangleTraitExt, TriangleTag, RectTraitExt, RectTag); +#[cfg(test)] +mod test_polygon { + use geo::{Convert, CoordsIter}; + + use super::*; + + #[test] + fn test_disjoint() { + let rect: Rect = Rect::new((0, 0), (10, 10)).convert(); + let polygon: Polygon = Rect::new((11, 11), (12, 12)).to_polygon().convert(); + assert!(!rect.intersects(&polygon)); + } + + #[test] + fn test_partial() { + let rect: Rect = Rect::new((0, 0), (10, 10)).convert(); + let polygon: Polygon = Rect::new((9, 9), (12, 12)).to_polygon().convert(); + assert!(rect.intersects(&polygon)); + } + + #[test] + fn test_rect_inside_polygon() { + let rect: Rect = Rect::new((1, 1), (2, 2)).convert(); + let polygon: Polygon = Rect::new((0, 0), (10, 10)).to_polygon().convert(); + assert!(rect.intersects(&polygon)); + } + + #[test] + fn test_polygon_inside_rect() { + let rect: Rect = Rect::new((0, 0), (10, 10)).convert(); + let polygon: Polygon = Rect::new((1, 1), (2, 2)).to_polygon().convert(); + assert!(rect.intersects(&polygon)); + } + + // Hole related tests + + #[test] + fn test_rect_inside_polygon_hole() { + let bound: Rect = Rect::new((0, 0), (10, 10)).convert(); + let hole = Rect::new((1, 1), (9, 9)).convert(); + let rect = Rect::new((4, 4), (6, 6)).convert(); + let polygon = Polygon::new( + bound.exterior_coords_iter().collect(), + vec![hole.exterior_coords_iter().collect()], + ); + + assert!(!rect.intersects(&polygon)); + } + + #[test] + fn test_rect_equals_polygon_hole() { + let bound: Rect = Rect::new((0, 0), (10, 10)).convert(); + let rect: Rect = Rect::new((4, 4), (6, 6)).convert(); + let polygon = Polygon::new( + bound.exterior_coords_iter().collect(), + vec![rect.exterior_coords_iter().collect()], + ); + + assert!(rect.intersects(&polygon)); + } +} diff --git a/rust/sedona-geo-generic-alg/src/algorithm/intersects/triangle.rs b/rust/sedona-geo-generic-alg/src/algorithm/intersects/triangle.rs index 7f15f5630..f6986ab1e 100644 --- a/rust/sedona-geo-generic-alg/src/algorithm/intersects/triangle.rs +++ b/rust/sedona-geo-generic-alg/src/algorithm/intersects/triangle.rs @@ -20,7 +20,8 @@ //! . //! Original code is dual-licensed under Apache-2.0 or MIT; used here under Apache-2.0. use super::IntersectsTrait; -use crate::*; +use crate::{intersects::has_disjoint_bboxes, *}; +use geo_traits::LineStringTrait; use sedona_geo_traits_ext::*; impl IntersectsTrait for LHS @@ -90,3 +91,153 @@ where self.to_polygon().intersects_trait(&rhs.to_polygon()) } } + +impl IntersectsTrait for LHS +where + T: GeoNum, + LHS: TriangleTraitExt, + RHS: PolygonTraitExt, +{ + fn intersects_trait(&self, rhs: &RHS) -> bool { + // simplified logic based on Polygon intersects Polygon + + if has_disjoint_bboxes(self, rhs) { + return false; + } + + // empty polygon cannot intersect with rectangle + let Some(exterior) = rhs.exterior_ext() else { + return false; + }; + if exterior.num_coords() == 0 { + return false; + } + + // if any of the polygon's corners intersect the rectangle + let first_coord = unsafe { exterior.geo_coord_unchecked(0) }; + if self.intersects(&first_coord) { + return true; + } + + // or any point of the rectangle intersects the polygon + if self.first_coord().intersects(rhs) { + return true; + } + + let rect_lines = self.to_lines(); + + // or any of the polygon's lines intersect the rectangle's lines + if exterior.lines().any(|rhs_line| { + rect_lines + .iter() + .any(|self_line| self_line.intersects(&rhs_line)) + }) { + return true; + } + rhs.interiors_ext().any(|interior| { + interior.lines().any(|rhs_line| { + rect_lines + .iter() + .any(|self_line| self_line.intersects(&rhs_line)) + }) + }) + } +} + +symmetric_intersects_trait_impl!( + GeoNum, + PolygonTraitExt, + PolygonTag, + TriangleTraitExt, + TriangleTag +); + +impl IntersectsTrait for LHS +where + T: GeoNum, + LHS: TriangleTraitExt, + RHS: RectTraitExt, +{ + fn intersects_trait(&self, rhs: &RHS) -> bool { + // simplified logic based on Polygon intersects Polygon + + if has_disjoint_bboxes(self, rhs) { + return false; + } + + // if any of the triangle's corners intersect the rectangle + self.intersects(&rhs.min_coord()) + + // or some corner of the triangle intersects the rectangle + || self.first_coord().intersects(rhs) + + // or any of the triangle's lines intersect the rectangle's lines + || rhs.to_lines().iter().any(|rhs_line| { + self.to_lines().iter().any(|self_line| self_line.intersects(&rhs_line)) + }) + } +} + +symmetric_intersects_trait_impl!(GeoNum, RectTraitExt, RectTag, TriangleTraitExt, TriangleTag); + +#[cfg(test)] +mod test_polygon { + use geo::{Convert, CoordsIter}; + + use super::*; + + #[test] + fn test_disjoint() { + let triangle = Triangle::from([(0., 0.), (10., 0.), (10., 10.)]); + let polygon: Polygon = Rect::new((11, 11), (12, 12)).to_polygon().convert(); + assert!(!triangle.intersects(&polygon)); + } + + #[test] + fn test_partial() { + let triangle = Triangle::from([(0., 0.), (10., 0.), (10., 10.)]); + let polygon: Polygon = Rect::new((9, 9), (12, 12)).to_polygon().convert(); + assert!(triangle.intersects(&polygon)); + } + + #[test] + fn test_triangle_inside_polygon() { + let triangle = Triangle::from([(1., 1.), (2., 1.), (2., 2.)]); + let polygon: Polygon = Rect::new((0, 0), (10, 10)).to_polygon().convert(); + assert!(triangle.intersects(&polygon)); + } + + #[test] + fn test_polygon_inside_triangle() { + let triangle = Triangle::from([(0., 0.), (10., 0.), (10., 10.)]); + let polygon: Polygon = Rect::new((1, 1), (2, 2)).to_polygon().convert(); + assert!(triangle.intersects(&polygon)); + } + + // Hole related tests + + #[test] + fn test_rect_inside_polygon_hole() { + let bound: Rect = Rect::new((0, 0), (10, 10)).convert(); + let hole = Rect::new((1, 1), (9, 9)).convert(); + let triangle = Triangle::from([(4., 4.), (4., 6.), (6., 6.)]); + let polygon = Polygon::new( + bound.exterior_coords_iter().collect(), + vec![hole.exterior_coords_iter().collect()], + ); + + assert!(!triangle.intersects(&polygon)); + } + + #[test] + fn test_triangle_equals_polygon_hole() { + let bound: Rect = Rect::new((0, 0), (10, 10)).convert(); + let triangle = Triangle::from([(4., 4.), (4., 6.), (6., 6.)]); + let polygon = Polygon::new( + bound.exterior_coords_iter().collect(), + vec![triangle.exterior_coords_iter().collect()], + ); + + assert!(triangle.intersects(&polygon)); + } +} From 641fe698a3580862e9834506669bb1a27e44ee8d Mon Sep 17 00:00:00 2001 From: Kristin Cowalcijk Date: Tue, 30 Sep 2025 11:36:16 +0800 Subject: [PATCH 16/22] Port https://github.com/georust/geo/pull/1378 --- .../benches/intersection.rs | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/rust/sedona-geo-generic-alg/benches/intersection.rs b/rust/sedona-geo-generic-alg/benches/intersection.rs index c2bf5f069..d981ac38e 100644 --- a/rust/sedona-geo-generic-alg/benches/intersection.rs +++ b/rust/sedona-geo-generic-alg/benches/intersection.rs @@ -50,6 +50,26 @@ fn multi_polygon_intersection(c: &mut Criterion) { }); }); + c.bench_function("MultiPolygon intersects 2", |bencher| { + bencher.iter(|| { + let mut intersects = 0; + let mut non_intersects = 0; + + for a in &plot_geoms { + for b in &zone_geoms { + if criterion::black_box(a.intersects(b)) { + intersects += 1; + } else { + non_intersects += 1; + } + } + } + + assert_eq!(intersects, 974); + assert_eq!(non_intersects, 27782); + }); + }); + c.bench_function("MultiPolygon intersects geo", |bencher| { bencher.iter(|| { let mut intersects = 0; @@ -69,6 +89,26 @@ fn multi_polygon_intersection(c: &mut Criterion) { assert_eq!(non_intersects, 27782); }); }); + + c.bench_function("MultiPolygon intersects geo 2", |bencher| { + bencher.iter(|| { + let mut intersects = 0; + let mut non_intersects = 0; + + for a in &plot_geoms { + for b in &zone_geoms { + if criterion::black_box(geo::Intersects::intersects(a, b)) { + intersects += 1; + } else { + non_intersects += 1; + } + } + } + + assert_eq!(intersects, 974); + assert_eq!(non_intersects, 27782); + }); + }); } fn multi_polygon_intersection_wkb(c: &mut Criterion) { From 48f8e76f49ddc4d547e5fd1b142fef61b77bdb39 Mon Sep 17 00:00:00 2001 From: Kristin Cowalcijk Date: Tue, 30 Sep 2025 11:36:31 +0800 Subject: [PATCH 17/22] Add more benches --- .../src/algorithm/intersects/polygon.rs | 48 +++++++++++++++++-- 1 file changed, 43 insertions(+), 5 deletions(-) diff --git a/rust/sedona-geo-generic-alg/src/algorithm/intersects/polygon.rs b/rust/sedona-geo-generic-alg/src/algorithm/intersects/polygon.rs index be80a3323..fa44a8baf 100644 --- a/rust/sedona-geo-generic-alg/src/algorithm/intersects/polygon.rs +++ b/rust/sedona-geo-generic-alg/src/algorithm/intersects/polygon.rs @@ -90,11 +90,49 @@ where if let (Some(self_exterior), Some(polygon_exterior)) = (self.exterior_ext(), polygon.exterior_ext()) { - // self intersects (or contains) any line in polygon - self.intersects_trait(&polygon_exterior) || - polygon.interiors_ext().any(|inner_line_string| self.intersects_trait(&inner_line_string)) || - // self is contained inside polygon - polygon.intersects_trait(&self_exterior) + // if there are no line intersections among exteriors and interiors, + // then either one fully contains the other + // or they are disjoint + + // check 1 point of each polygon being within the other + self_exterior.coord_iter().take(1).any(|p| polygon.intersects_trait(&p)) + || polygon_exterior.coord_iter().take(1).any(|p| self.intersects_trait(&p)) + // exterior exterior + || self_exterior + .lines() + .any(|self_line| polygon_exterior.lines().any(|poly_line| self_line.intersects_trait(&poly_line))) + // exterior interior + || self + .interiors_ext() + .any(|inner_line_string| polygon_exterior.intersects_trait(&inner_line_string)) + || polygon + .interiors_ext() + .any(|inner_line_string| self_exterior.intersects_trait(&inner_line_string)) + + // interior interior (not needed) + /* + suppose interior-interior is a required check + this requires that there are no ext-ext intersections + and that there are no ext-int intersections + and that self-ext[0] not intersects other + and other-ext[0] not intersects self + and there is some intersection between self and other + + if ext-ext disjoint, then one ext ring must be within the other ext ring + + suppose self-ext is within other-ext and self-ext[0] is not intersects other + then self-ext[0] must be within an interior hole of other-ext + if self-ext does not intersect the interior ring which contains self-ext[0], + then self is contained within other interior hole + and hence self and other cannot intersect + therefore for self to intersect other, some part of the self-ext must intersect the other-int ring + However, this is a contradiction because one of the premises for requiring this check is that self-ext ring does not intersect any other-int ring + + By symmetry, the mirror case of other-ext ring within self-ext ring is also true + + therefore, if there cannot exist and int-int intersection when all the prior checks are false + and so we can skip the interior-interior check + */ } else { false } From d2e04f17fd0128f794eeeac34c528a740e3d5078 Mon Sep 17 00:00:00 2001 From: Kristin Cowalcijk Date: Thu, 30 Oct 2025 22:10:48 +0800 Subject: [PATCH 18/22] Port https://github.com/georust/geo/pull/1379: LineString/MultiLineString intersects refactor --- .../src/algorithm/intersects/line_string.rs | 171 +++++++++++++++++- .../src/multi_polygon.rs | 40 +++- 2 files changed, 205 insertions(+), 6 deletions(-) diff --git a/rust/sedona-geo-generic-alg/src/algorithm/intersects/line_string.rs b/rust/sedona-geo-generic-alg/src/algorithm/intersects/line_string.rs index 74fddcbe1..3a58c781f 100644 --- a/rust/sedona-geo-generic-alg/src/algorithm/intersects/line_string.rs +++ b/rust/sedona-geo-generic-alg/src/algorithm/intersects/line_string.rs @@ -46,15 +46,98 @@ macro_rules! impl_intersects_line_string_from_line { impl_intersects_line_string_from_line!(CoordTraitExt, CoordTag); impl_intersects_line_string_from_line!(PointTraitExt, PointTag); impl_intersects_line_string_from_line!(LineStringTraitExt, LineStringTag); -impl_intersects_line_string_from_line!(PolygonTraitExt, PolygonTag); impl_intersects_line_string_from_line!(MultiPointTraitExt, MultiPointTag); impl_intersects_line_string_from_line!(MultiLineStringTraitExt, MultiLineStringTag); -impl_intersects_line_string_from_line!(MultiPolygonTraitExt, MultiPolygonTag); impl_intersects_line_string_from_line!(GeometryTraitExt, GeometryTag); impl_intersects_line_string_from_line!(GeometryCollectionTraitExt, GeometryCollectionTag); impl_intersects_line_string_from_line!(LineTraitExt, LineTag); -impl_intersects_line_string_from_line!(RectTraitExt, RectTag); -impl_intersects_line_string_from_line!(TriangleTraitExt, TriangleTag); + +impl IntersectsTrait for LHS +where + T: GeoNum, + LHS: LineStringTraitExt, + RHS: PolygonTraitExt, +{ + fn intersects_trait(&self, rhs: &RHS) -> bool { + if self.num_coords() == 0 { + return false; + } + if let Some(exterior) = rhs.exterior_ext() { + if has_disjoint_bboxes(self, rhs) { + return false; + } + + // if no lines intersections, then linestring is either disjoint or within the polygon + // therefore sufficient to check any one point + let first_coord = unsafe { self.geo_coord_unchecked(0) }; + first_coord.intersects(rhs) + || self.lines().any(|l| { + exterior.lines().any(|other| l.intersects(&other)) + || rhs + .interiors_ext() + .any(|interior| interior.lines().any(|other| l.intersects(&other))) + }) + } else { + false + } + } +} + +impl IntersectsTrait for LHS +where + T: GeoNum, + LHS: LineStringTraitExt, + RHS: MultiPolygonTraitExt, +{ + fn intersects_trait(&self, rhs: &RHS) -> bool { + if self.num_coords() == 0 { + return false; + } + if has_disjoint_bboxes(self, rhs) { + return false; + } + // splitting into `LineString intersects Polygon` + rhs.polygons_ext().any(|poly| self.intersects(&poly)) + } +} + +impl IntersectsTrait for LHS +where + T: GeoNum, + LHS: LineStringTraitExt, + RHS: RectTraitExt, +{ + fn intersects_trait(&self, rhs: &RHS) -> bool { + if self.num_coords() == 0 { + return false; + } + + let first_coord = unsafe { self.geo_coord_unchecked(0) }; + first_coord.intersects(rhs) + || self + .lines() + .any(|l| rhs.to_lines().iter().any(|other| l.intersects(&other))) + } +} + +impl IntersectsTrait for LHS +where + T: GeoNum, + LHS: LineStringTraitExt, + RHS: TriangleTraitExt, +{ + fn intersects_trait(&self, rhs: &RHS) -> bool { + if self.num_coords() == 0 { + return false; + } + + let first_coord = unsafe { self.geo_coord_unchecked(0) }; + first_coord.intersects(rhs) + || self + .lines() + .any(|l| rhs.to_lines().iter().any(|other| l.intersects(&other))) + } +} symmetric_intersects_trait_impl!( GeoNum, @@ -148,3 +231,83 @@ symmetric_intersects_trait_impl!( MultiLineStringTraitExt, MultiLineStringTag ); + +#[cfg(test)] +mod test { + use geo::{Convert, CoordsIter}; + + use super::*; + use crate::wkt; + + #[test] + fn test_linestring_inside_polygon() { + let ls: LineString = wkt! {LINESTRING(1 1, 2 2)}.convert(); + let poly: Polygon = Rect::new((0, 0), (10, 10)).to_polygon().convert(); + assert!(ls.intersects(&poly)); + } + + #[test] + fn test_linestring_partial_polygon() { + let ls: LineString = wkt! {LINESTRING(-1 -1, 2 2)}.convert(); + let poly: Polygon = Rect::new((0, 0), (10, 10)).to_polygon().convert(); + assert!(ls.intersects(&poly)); + } + #[test] + fn test_linestring_disjoint_polygon() { + let ls: LineString = wkt! {LINESTRING(-1 -1, -2 -2)}.convert(); + let poly: Polygon = Rect::new((0, 0), (10, 10)).to_polygon().convert(); + assert!(!ls.intersects(&poly)); + } + #[test] + fn test_linestring_in_polygon_hole() { + let ls: LineString = wkt! {LINESTRING(4 4, 6 6)}.convert(); + let bound = Rect::new((0, 0), (10, 10)).convert(); + let hole = Rect::new((1, 1), (9, 9)).convert(); + let poly = Polygon::new( + bound.exterior_coords_iter().collect(), + vec![hole.exterior_coords_iter().collect()], + ); + + assert!(!ls.intersects(&poly)); + } + + // ls_rect + #[test] + fn test_linestring_inside_rect() { + let ls: LineString = wkt! {LINESTRING(1 1, 2 2)}.convert(); + let poly: Rect = Rect::new((0, 0), (10, 10)).convert(); + assert!(ls.intersects(&poly)); + } + #[test] + fn test_linestring_partial_rect() { + let ls: LineString = wkt! {LINESTRING(-1 -1, 2 2)}.convert(); + let poly: Rect = Rect::new((0, 0), (10, 10)).convert(); + assert!(ls.intersects(&poly)); + } + #[test] + fn test_linestring_disjoint_rect() { + let ls: LineString = wkt! {LINESTRING(-1 -1, -2 -2)}.convert(); + let poly: Rect = Rect::new((0, 0), (10, 10)).convert(); + assert!(!ls.intersects(&poly)); + } + + // ls_triangle + #[test] + fn test_linestring_inside_triangle() { + let ls: LineString = wkt! {LINESTRING(5 5, 5 4)}.convert(); + let poly: Triangle = wkt! {TRIANGLE(0 0, 10 0, 5 10)}.convert(); + assert!(ls.intersects(&poly)); + } + #[test] + fn test_linestring_partial_triangle() { + let ls: LineString = wkt! {LINESTRING(5 5, 5 -4)}.convert(); + let poly: Triangle = wkt! {TRIANGLE(0 0, 10 0, 5 10)}.convert(); + assert!(ls.intersects(&poly)); + } + #[test] + fn test_linestring_disjoint_triangle() { + let ls: LineString = wkt! {LINESTRING(5 -5, 5 -4)}.convert(); + let poly: Triangle = wkt! {TRIANGLE(0 0, 10 0, 5 10)}.convert(); + assert!(!ls.intersects(&poly)); + } +} diff --git a/rust/sedona-geo-traits-ext/src/multi_polygon.rs b/rust/sedona-geo-traits-ext/src/multi_polygon.rs index 9b90afad2..0a9028ef8 100644 --- a/rust/sedona-geo-traits-ext/src/multi_polygon.rs +++ b/rust/sedona-geo-traits-ext/src/multi_polygon.rs @@ -83,7 +83,25 @@ impl MultiPolygonTraitExt for MultiPolygon where T: CoordNum, { - forward_multi_polygon_trait_ext_funcs!(); + type PolygonTypeExt<'a> + = ::InnerPolygonType<'a> + where + Self: 'a; + + #[inline] + fn polygon_ext(&self, i: usize) -> Option> { + self.0.get(i) + } + + #[inline] + unsafe fn polygon_unchecked_ext(&self, i: usize) -> Self::PolygonTypeExt<'_> { + self.0.get_unchecked(i) + } + + #[inline] + fn polygons_ext(&self) -> impl Iterator> { + self.0.iter() + } } impl GeoTraitExtWithTypeTag for MultiPolygon { @@ -94,7 +112,25 @@ impl MultiPolygonTraitExt for &MultiPolygon where T: CoordNum, { - forward_multi_polygon_trait_ext_funcs!(); + type PolygonTypeExt<'a> + = ::InnerPolygonType<'a> + where + Self: 'a; + + #[inline] + fn polygon_ext(&self, i: usize) -> Option> { + self.0.get(i) + } + + #[inline] + unsafe fn polygon_unchecked_ext(&self, i: usize) -> Self::PolygonTypeExt<'_> { + self.0.get_unchecked(i) + } + + #[inline] + fn polygons_ext(&self) -> impl Iterator> { + self.0.iter() + } } impl GeoTraitExtWithTypeTag for &MultiPolygon { From 904b2eb4fa252d0d8e7222213811854c1bdb4b6b Mon Sep 17 00:00:00 2001 From: Kristin Cowalcijk Date: Thu, 30 Oct 2025 22:31:54 +0800 Subject: [PATCH 19/22] Ported https://github.com/georust/geo/pull/1364: Apply constructor and updated commit IDs --- rust/sedona-geo-generic-alg/src/algorithm/centroid.rs | 8 ++++---- .../src/algorithm/coordinate_position.rs | 4 ++-- rust/sedona-geo-generic-alg/src/algorithm/dimensions.rs | 8 ++++---- .../src/algorithm/intersects/collections.rs | 2 +- .../src/algorithm/intersects/coordinate.rs | 2 +- .../src/algorithm/intersects/line.rs | 2 +- .../src/algorithm/intersects/line_string.rs | 2 +- .../src/algorithm/intersects/mod.rs | 4 ++-- .../src/algorithm/intersects/point.rs | 2 +- .../src/algorithm/intersects/polygon.rs | 2 +- .../src/algorithm/intersects/rect.rs | 2 +- .../src/algorithm/intersects/triangle.rs | 2 +- rust/sedona-geo-generic-alg/src/algorithm/map_coords.rs | 6 +++--- 13 files changed, 23 insertions(+), 23 deletions(-) diff --git a/rust/sedona-geo-generic-alg/src/algorithm/centroid.rs b/rust/sedona-geo-generic-alg/src/algorithm/centroid.rs index 704cf0319..18d197c1f 100644 --- a/rust/sedona-geo-generic-alg/src/algorithm/centroid.rs +++ b/rust/sedona-geo-generic-alg/src/algorithm/centroid.rs @@ -17,7 +17,7 @@ //! Generic Centroid algorithm //! //! Ported (and contains copied code) from `geo::algorithm::centroid`: -//! . +//! . //! Original code is dual-licensed under Apache-2.0 or MIT; used here under Apache-2.0. use core::borrow::Borrow; use std::cmp::Ordering; @@ -870,7 +870,7 @@ mod test { // Tests: Centroid of MultiLineString #[test] fn empty_multilinestring_test() { - let mls: MultiLineString = MultiLineString::new(vec![]); + let mls: MultiLineString = MultiLineString::empty(); let centroid = mls.centroid(); assert!(centroid.is_none()); } @@ -1049,7 +1049,7 @@ mod test { fn empty_interior_polygon_test() { let poly = Polygon::new( LineString::from(vec![p(0., 0.), p(0., 1.), p(1., 1.), p(1., 0.), p(0., 0.)]), - vec![LineString::new(vec![])], + vec![LineString::empty()], ); assert_eq!(poly.centroid(), Some(p(0.5, 0.5))); } @@ -1072,7 +1072,7 @@ mod test { // Tests: Centroid of MultiPolygon #[test] fn empty_multipolygon_polygon_test() { - assert!(MultiPolygon::::new(Vec::new()).centroid().is_none()); + assert!(MultiPolygon::::empty().centroid().is_none()); } #[test] diff --git a/rust/sedona-geo-generic-alg/src/algorithm/coordinate_position.rs b/rust/sedona-geo-generic-alg/src/algorithm/coordinate_position.rs index 1adb2f5ab..aaef5510e 100644 --- a/rust/sedona-geo-generic-alg/src/algorithm/coordinate_position.rs +++ b/rust/sedona-geo-generic-alg/src/algorithm/coordinate_position.rs @@ -17,7 +17,7 @@ //! Generic Coordinate Position algorithm //! //! Ported (and contains copied code) from `geo::algorithm::coordinate_position`: -//! . +//! . //! Original code is dual-licensed under Apache-2.0 or MIT; used here under Apache-2.0. use core::borrow::Borrow; use std::cmp::Ordering; @@ -589,7 +589,7 @@ mod test { #[test] fn test_empty_poly() { - let square_poly: Polygon = Polygon::new(LineString::new(vec![]), vec![]); + let square_poly: Polygon = Polygon::empty(); assert_eq!( square_poly.coordinate_position(&Coord::zero()), CoordPos::Outside diff --git a/rust/sedona-geo-generic-alg/src/algorithm/dimensions.rs b/rust/sedona-geo-generic-alg/src/algorithm/dimensions.rs index a2f7dc5c5..192de04c6 100644 --- a/rust/sedona-geo-generic-alg/src/algorithm/dimensions.rs +++ b/rust/sedona-geo-generic-alg/src/algorithm/dimensions.rs @@ -17,7 +17,7 @@ //! Generic Dimensions (HasDimensions) algorithm //! //! Ported (and contains copied code) from `geo::algorithm::dimensions`: -//! . +//! . //! Original code is dual-licensed under Apache-2.0 or MIT; used here under Apache-2.0. use core::borrow::Borrow; use sedona_geo_traits_ext::*; @@ -73,7 +73,7 @@ pub trait HasDimensions { /// ]); /// assert!(!line_string.is_empty()); /// - /// let empty_line_string: LineString = LineString::new(vec![]); + /// let empty_line_string: LineString = LineString::empty(); /// assert!(empty_line_string.is_empty()); /// /// let point = Point::new(0.0, 0.0); @@ -112,7 +112,7 @@ pub trait HasDimensions { /// assert_eq!(Dimensions::ZeroDimensional, point.dimensions()); /// /// // An `Empty` dimensionality is distinct from, and less than, being 0-dimensional - /// let empty_collection = GeometryCollection::::new_from(vec![]); + /// let empty_collection = GeometryCollection::::empty(); /// assert_eq!(Dimensions::Empty, empty_collection.dimensions()); /// assert!(empty_collection.dimensions() < point.dimensions()); /// ``` @@ -147,7 +147,7 @@ pub trait HasDimensions { /// let geometry_collection = GeometryCollection::new_from(vec![degenerate_line_rect.into(), degenerate_point_rect.into()]); /// assert_eq!(Dimensions::ZeroDimensional, geometry_collection.boundary_dimensions()); /// - /// let geometry_collection = GeometryCollection::::new_from(vec![]); + /// let geometry_collection = GeometryCollection::::empty(); /// assert_eq!(Dimensions::Empty, geometry_collection.boundary_dimensions()); /// ``` fn boundary_dimensions(&self) -> Dimensions; diff --git a/rust/sedona-geo-generic-alg/src/algorithm/intersects/collections.rs b/rust/sedona-geo-generic-alg/src/algorithm/intersects/collections.rs index f0e5956cc..1bf2385d5 100644 --- a/rust/sedona-geo-generic-alg/src/algorithm/intersects/collections.rs +++ b/rust/sedona-geo-generic-alg/src/algorithm/intersects/collections.rs @@ -17,7 +17,7 @@ //! Intersects implementations for Geometry and GeometryCollection (generic) //! //! Ported (and contains copied code) from `geo::algorithm::intersects::collections`: -//! . +//! . //! Original code is dual-licensed under Apache-2.0 or MIT; used here under Apache-2.0. use core::borrow::Borrow; use sedona_geo_traits_ext::*; diff --git a/rust/sedona-geo-generic-alg/src/algorithm/intersects/coordinate.rs b/rust/sedona-geo-generic-alg/src/algorithm/intersects/coordinate.rs index 31b3585e3..1d1c03f06 100644 --- a/rust/sedona-geo-generic-alg/src/algorithm/intersects/coordinate.rs +++ b/rust/sedona-geo-generic-alg/src/algorithm/intersects/coordinate.rs @@ -17,7 +17,7 @@ //! Intersects implementations for Coord and Point (generic) //! //! Ported (and contains copied code) from `geo::algorithm::intersects::coordinate`: -//! . +//! . //! Original code is dual-licensed under Apache-2.0 or MIT; used here under Apache-2.0. use sedona_geo_traits_ext::{CoordTag, CoordTraitExt, PointTag, PointTraitExt}; diff --git a/rust/sedona-geo-generic-alg/src/algorithm/intersects/line.rs b/rust/sedona-geo-generic-alg/src/algorithm/intersects/line.rs index 025855b5f..3939d9cab 100644 --- a/rust/sedona-geo-generic-alg/src/algorithm/intersects/line.rs +++ b/rust/sedona-geo-generic-alg/src/algorithm/intersects/line.rs @@ -17,7 +17,7 @@ //! Intersects implementations for Line (generic) //! //! Ported (and contains copied code) from `geo::algorithm::intersects::line`: -//! . +//! . //! Original code is dual-licensed under Apache-2.0 or MIT; used here under Apache-2.0. use sedona_geo_traits_ext::*; diff --git a/rust/sedona-geo-generic-alg/src/algorithm/intersects/line_string.rs b/rust/sedona-geo-generic-alg/src/algorithm/intersects/line_string.rs index 3a58c781f..7a39fadf0 100644 --- a/rust/sedona-geo-generic-alg/src/algorithm/intersects/line_string.rs +++ b/rust/sedona-geo-generic-alg/src/algorithm/intersects/line_string.rs @@ -17,7 +17,7 @@ //! Intersects implementations for LineString and MultiLineString (generic) //! //! Ported (and contains copied code) from `geo::algorithm::intersects::line_string`: -//! . +//! . //! Original code is dual-licensed under Apache-2.0 or MIT; used here under Apache-2.0. use sedona_geo_traits_ext::*; diff --git a/rust/sedona-geo-generic-alg/src/algorithm/intersects/mod.rs b/rust/sedona-geo-generic-alg/src/algorithm/intersects/mod.rs index 0a837c017..cfab5c747 100644 --- a/rust/sedona-geo-generic-alg/src/algorithm/intersects/mod.rs +++ b/rust/sedona-geo-generic-alg/src/algorithm/intersects/mod.rs @@ -17,7 +17,7 @@ //! Generic Intersects algorithm //! //! Ported (and contains copied code) from `geo::algorithm::intersects` (and its submodules): -//! . +//! . //! Original code is dual-licensed under Apache-2.0 or MIT; used here under Apache-2.0. use sedona_geo_traits_ext::GeoTraitExtWithTypeTag; @@ -174,7 +174,7 @@ mod test { #[test] fn empty_linestring2_test() { let linestring = line_string![(x: 3., y: 2.), (x: 7., y: 6.)]; - assert!(!linestring.intersects(&LineString::new(Vec::new()))); + assert!(!linestring.intersects(&LineString::empty())); } #[test] fn empty_all_linestring_test() { diff --git a/rust/sedona-geo-generic-alg/src/algorithm/intersects/point.rs b/rust/sedona-geo-generic-alg/src/algorithm/intersects/point.rs index 1426050c1..e0b28521c 100644 --- a/rust/sedona-geo-generic-alg/src/algorithm/intersects/point.rs +++ b/rust/sedona-geo-generic-alg/src/algorithm/intersects/point.rs @@ -17,7 +17,7 @@ //! Intersects implementations for Point and MultiPoint (generic) //! //! Ported (and contains copied code) from `geo::algorithm::intersects::point`: -//! . +//! . //! Original code is dual-licensed under Apache-2.0 or MIT; used here under Apache-2.0. use sedona_geo_traits_ext::*; diff --git a/rust/sedona-geo-generic-alg/src/algorithm/intersects/polygon.rs b/rust/sedona-geo-generic-alg/src/algorithm/intersects/polygon.rs index fa44a8baf..25fbe5042 100644 --- a/rust/sedona-geo-generic-alg/src/algorithm/intersects/polygon.rs +++ b/rust/sedona-geo-generic-alg/src/algorithm/intersects/polygon.rs @@ -17,7 +17,7 @@ //! Intersects implementations for Polygon and MultiPolygon (generic) //! //! Ported (and contains copied code) from `geo::algorithm::intersects::polygon`: -//! . +//! . //! Original code is dual-licensed under Apache-2.0 or MIT; used here under Apache-2.0. use super::{has_disjoint_bboxes, IntersectsTrait}; use crate::coordinate_position::CoordPos; diff --git a/rust/sedona-geo-generic-alg/src/algorithm/intersects/rect.rs b/rust/sedona-geo-generic-alg/src/algorithm/intersects/rect.rs index 7e90ffe46..818a6ba37 100644 --- a/rust/sedona-geo-generic-alg/src/algorithm/intersects/rect.rs +++ b/rust/sedona-geo-generic-alg/src/algorithm/intersects/rect.rs @@ -17,7 +17,7 @@ //! Intersects implementations for Rect (generic) //! //! Ported (and contains copied code) from `geo::algorithm::intersects::rect`: -//! . +//! . //! Original code is dual-licensed under Apache-2.0 or MIT; used here under Apache-2.0. use geo_traits::{CoordTrait, LineStringTrait}; use sedona_geo_traits_ext::*; diff --git a/rust/sedona-geo-generic-alg/src/algorithm/intersects/triangle.rs b/rust/sedona-geo-generic-alg/src/algorithm/intersects/triangle.rs index f6986ab1e..d6dad70a5 100644 --- a/rust/sedona-geo-generic-alg/src/algorithm/intersects/triangle.rs +++ b/rust/sedona-geo-generic-alg/src/algorithm/intersects/triangle.rs @@ -17,7 +17,7 @@ //! Intersects implementations for Triangle (generic) //! //! Ported (and contains copied code) from `geo::algorithm::intersects::triangle`: -//! . +//! . //! Original code is dual-licensed under Apache-2.0 or MIT; used here under Apache-2.0. use super::IntersectsTrait; use crate::{intersects::has_disjoint_bboxes, *}; diff --git a/rust/sedona-geo-generic-alg/src/algorithm/map_coords.rs b/rust/sedona-geo-generic-alg/src/algorithm/map_coords.rs index 8705bf579..815bc0eb9 100644 --- a/rust/sedona-geo-generic-alg/src/algorithm/map_coords.rs +++ b/rust/sedona-geo-generic-alg/src/algorithm/map_coords.rs @@ -17,7 +17,7 @@ //! Generic Map Coords algorithm //! //! Ported (and contains copied code) from `geo::algorithm::map_coords`: -//! . +//! . //! Original code is dual-licensed under Apache-2.0 or MIT; used here under Apache-2.0. pub(crate) use crate::geometry::*; pub(crate) use crate::CoordNum; @@ -336,7 +336,7 @@ where fn map_coords_trait(&self, func: impl Fn(Coord) -> Coord + Copy) -> Self::Output { let exterior = match self.exterior_ext() { Some(ext) => ext.map_coords(func), - None => LineString::new(vec![]), + None => LineString::empty(), }; let interiors = self @@ -353,7 +353,7 @@ where ) -> Result { let exterior = match self.exterior_ext() { Some(ext) => ext.try_map_coords(func)?, - None => LineString::new(vec![]), + None => LineString::empty(), }; let interiors = self From 2ec5cd3e5780d655f88dd8d228269192055a304d Mon Sep 17 00:00:00 2001 From: Kristin Cowalcijk Date: Thu, 30 Oct 2025 22:36:02 +0800 Subject: [PATCH 20/22] Remove PORTING_GEO_COMMITS.txt and TODO_GEO_COMMITS.txt --- PORTING_GEO_COMMITS.txt | 58 ----------------------------------------- TODO_GEO_COMMITS.txt | 6 ----- 2 files changed, 64 deletions(-) delete mode 100644 PORTING_GEO_COMMITS.txt delete mode 100644 TODO_GEO_COMMITS.txt diff --git a/PORTING_GEO_COMMITS.txt b/PORTING_GEO_COMMITS.txt deleted file mode 100644 index f31e5c63d..000000000 --- a/PORTING_GEO_COMMITS.txt +++ /dev/null @@ -1,58 +0,0 @@ -SKIPPED PR #1345 (https://github.com/georust/geo/pull/1345) [b0d02de7]: Bump proj to 0.30.0; dependency/version update only. -SKIPPED PR #1348 (https://github.com/georust/geo/pull/1348) [0b01bde3]: Fix point lifetime; traits impl detail outside generic alg scope (already handled in geo-traits-ext). -SKIPPED PR #1350 (https://github.com/georust/geo/pull/1350) [041ca256]: Simplify CI tested versions; infra only. -SKIPPED PR #1351 (https://github.com/georust/geo/pull/1351) [25adfb83]: geo-traits Coord copy adjustments; trait-level change already reflected in ext crate, no algorithm impact here. -SKIPPED PR #1356 (https://github.com/georust/geo/pull/1356) [4516cec5]: Minor trait patch (geo-traits release); no algorithm changes. -SKIPPED PR #1360 (https://github.com/georust/geo/pull/1360) [e41230dc]: Efficient outlier iterators (outlier_detection not included in generic subset). -SKIPPED PR #1357 (https://github.com/georust/geo/pull/1357) [d3a23895]: General maintenance commit; no relevant alg changes to port subset. -SKIPPED PR #1363 (https://github.com/georust/geo/pull/1363) [94fa54f1]: Add `empty` constructors; need parity for constructing empty geometries used in dimensions/intersects logic. -SKIPPED PR #1371 (https://github.com/georust/geo/pull/1371) [6a8ca5d7]: MultiLineString contains Coord; adds Contains needed for completeness of containment predicates if we choose to support Contains generically. -PENDING PR #1368 (https://github.com/georust/geo/pull/1368) [a83b4d50,bbacf118]: Rect corner rename (bbacf118) merged; keep in sync for future rect-based optimizations. -SKIPPED PR #1365 (https://github.com/georust/geo/pull/1365) [7b3056be]: Geometry buffering (buffer.rs) outside current generic algorithm scope. -SKIPPED PR #1370 (https://github.com/georust/geo/pull/1370) [6f3bf4cb]: Euclidean Bearing/Destination – excluded per guidelines. -SKIPPED PR #1373 (https://github.com/georust/geo/pull/1373) [a0e55284]: Update WKT crate; affects macro support only. -SKIPPED PR #1374 (https://github.com/georust/geo/pull/1374) [076c4c50]: Clippy fixes only. -SKIPPED PR #1375 (https://github.com/georust/geo/pull/1375) [b6aa8d3b]: Documentation / trivial corrections. -SKIPPED PR #1369 (https://github.com/georust/geo/pull/1369) [0854789b]: Add Contains implementations; may need partial port for predicate parity where intersects-based logic delegates to Contains. -PENDING PR #1376 (https://github.com/georust/geo/pull/1376) [8727d141]: Intersects tidy-up (organize impls, add missing Coord-based Intersects) – required for generic parity. -PENDING PR #1377 (https://github.com/georust/geo/pull/1377) [e841973]: Faster Intersection for Rect v. Polygon and Rect v. Triangle -SKIPPED PR #1358 (https://github.com/georust/geo/pull/1358) [b77b0a9e]: New Bentley-Ottmann sweep implementation foundational to later intersects performance; evaluate if generic sweep-line needed (mark pending for potential future port). -SKIPPED PR #1386 (https://github.com/georust/geo/pull/1386) [30d6e9fb]: Benchmark reorganization; performance infra only. -SKIPPED PR (merge main into feature) [c8792175]: Merge branch main; no standalone feature. -SKIPPED PR (merge main generic) [3feabfd8]: Merge branch main; no standalone feature. -SKIPPED PR #1382 (https://github.com/georust/geo/pull/1382) [46d9d291]: Main PR unrelated to subset (generic sweep edits outside chosen algorithms) – revisit later if sweep needed. -SKIPPED PR #1387 (https://github.com/georust/geo/pull/1387) [ed03df29]: Follow-up sweep edits; skipped same reason. -PENDING PR #1378 (https://github.com/georust/geo/pull/1378) [06302689,1faf998e,11c626fb]: Polygon–Polygon intersection overhaul + skip interior-interior proof for correctness/performance. -SKIPPED PR #1389 (https://github.com/georust/geo/pull/1389) [bbf44469]: WKT macro for non-standard variants; macro convenience only. -SKIPPED PR #1390 (https://github.com/georust/geo/pull/1390) [56ca824c,1004e17b]: Generic Segment intersections (new sweep generic); current generic alg module does not expose sweep-line intersection enumeration API. -SKIPPED Merge branches into fix-hull [2eef98ef,abcb2edb]: Integration merges. -SKIPPED PR #1388 (https://github.com/georust/geo/pull/1388) [ab448ad3]: Convex hull fix; hull algorithm not included in generic subset currently. -SKIPPED PR #1392 (https://github.com/georust/geo/pull/1392) [cae816cb]: Simplify compute_rdp panic fix; simplify algorithm not ported yet. -PENDING PR #1379 (https://github.com/georust/geo/pull/1379) [77ff3e6f,75964389,7a976890,a9e047d2,31ee4388]: LineString/MultiLineString intersects refactor & perf. -SKIPPED PR #1397 (https://github.com/georust/geo/pull/1397) [80b708ee]: Clippy lifetime elision; style only. -SKIPPED PR #1396 (https://github.com/georust/geo/pull/1396) [38afc3ed]: Silence unused warnings; no algorithm change. -SKIPPED PR #1395 (https://github.com/georust/geo/pull/1395) [ec07ade7]: Star polygon convexity fix; convexity / hull logic not presently in subset. -SKIPPED PR #1399 (https://github.com/georust/geo/pull/1399) [b2dd8111]: Intro docs edits; documentation only. -SKIPPED PR #1405 (https://github.com/georust/geo/pull/1405) [ea77d1ce]: i_overlay integration (BooleanOps) – Boolean operations not in generic subset yet. -SKIPPED PR #1406 (https://github.com/georust/geo/pull/1406) [21572c66]: Rust 2024 edition – already skipped. -SKIPPED PR #1407 (https://github.com/georust/geo/pull/1407) [4f86e7d9]: Bump proj version – dependency only. -SKIPPED PR #1408 (https://github.com/georust/geo/pull/1408) [daf0515b]: Release housekeeping. -SKIPPED PR #1414 (https://github.com/georust/geo/pull/1414) [7f5741c6]: New indexed module – consider partial port only if interval-tree or indexed predicates needed (mark pending for evaluation of MultiPolygon point containment parity). -SKIPPED PR #1401 (https://github.com/georust/geo/pull/1401) [32dc4107]: Fast point-in-multipolygon using interval tree; potentially needed for performance parity of contains/intersects if we adopt indexed strategy. -SKIPPED PR #1416 (https://github.com/georust/geo/pull/1416) [caaf4f1f]: Frechet test reduction; test infra only. -SKIPPED PR #1417 (https://github.com/georust/geo/pull/1417) [63c199ef]: CI cache strategy. -SKIPPED PR #1419 (https://github.com/georust/geo/pull/1419) [f6b07fe3]: Remove bench build; infra only. -SKIPPED PR #1421 (https://github.com/georust/geo/pull/1421) [bfaaf4c9]: Fix interval tree winding logic in multipolygon containment; required if we port interval-tree approach (depends on #1401 / #1414). -SKIPPED PR #1422 weekly dependabot (https://github.com/georust/geo/pull/1422) [bb60b1e0]: Dependabot scheduling only; unrelated. -PENDING PR #1364 (https://github.com/georust/geo/pull/1364) [142d4913]: Apply `empty` constructor to other crates (follow-up refinements) – complements PR #1363 and #1422 feature commit fea73a18. -SKIPPED Merge contains coverage branch [07ed408e]: branch sync. -SKIPPED PR #1404 (https://github.com/georust/geo/pull/1404) [a602336d]: Add missing contains implementations; ensures full predicate parity. -SKIPPED PR #1409 (https://github.com/georust/geo/pull/1409) [d6b95869]: Linestring contains line bugfix; correctness fix for Contains / Contains. -SKIPPED PR #1430 (https://github.com/georust/geo/pull/1430) [b283c225]: LOF efficiency improvements (outlier detection not in subset). -SKIPPED PR #1429 (https://github.com/georust/geo/pull/1429) [afff7dd0]: DBSCAN clustering algorithm – clustering not included. -SKIPPED PR #1426 (https://github.com/georust/geo/pull/1426) [09eed852]: distance_within addition – distance excluded. -SKIPPED PR #1424 (https://github.com/georust/geo/pull/1424) [a60aec90]: Distance pruning – excluded as above. -SKIPPED PR #1435 (https://github.com/georust/geo/pull/1435) [8940db79]: Fix indexed multipolygon containment – required if interval tree containment is ported. -SKIPPED PR #1436 (https://github.com/georust/geo/pull/1436) [7263968e]: Remove geo-postgis crate – repository structure only. -SKIPPED Merge branch main into relate tests [e6dda015]: integration merge. -SKIPPED PR #1428 (https://github.com/georust/geo/pull/1428) [f2326a3d]: JTS relate test expansion – Relate not currently ported; may revisit if DE-9IM matrix logic needed. diff --git a/TODO_GEO_COMMITS.txt b/TODO_GEO_COMMITS.txt deleted file mode 100644 index 49ef3cce4..000000000 --- a/TODO_GEO_COMMITS.txt +++ /dev/null @@ -1,6 +0,0 @@ -PENDING PR #1368 (https://github.com/georust/geo/pull/1368) [a83b4d50,bbacf118]: Rect corner rename – generic rect code already used min/max accessors; no symbol rename required. -PENDING PR #1376 (https://github.com/georust/geo/pull/1376) [8727d141]: Intersects tidy-up – generic architecture already organized by caller with Coord-based coverage; parity confirmed via tests. -PENDING PR #1377 (https://github.com/georust/geo/pull/1377) [e841973]: Faster Intersection for Rect v. Polygon and Rect v. Triangle (complex refactor conflicts with generic trait architecture; reverted to maintain stability) -PENDING PR #1378 (https://github.com/georust/geo/pull/1378) [06302689,1faf998e,11c626fb]: Polygon–Polygon overhaul – existing generic impl covers bbox + ring/inner checks equivalent; semantics verified by passing intersects tests. -PENDING PR #1379 (https://github.com/georust/geo/pull/1379) [77ff3e6f,75964389,7a976890,a9e047d2,31ee4388]: LineString/MultiLineString intersects refactor – macro-based delegations already present generically; performance-specific lines_iter optimization not applied (traits lack lines_iter), acceptable for now. -PENDING PR #1364 (https://github.com/georust/geo/pull/1364) [142d4913]: Apply `empty` constructor – runtime emptiness semantics already enforced through traits; tests constructing geo_types empties continue to pass. From 008de625adfafbe3e4edbb787a12ba3854be611f Mon Sep 17 00:00:00 2001 From: Kristin Cowalcijk Date: Fri, 31 Oct 2025 09:25:04 +0800 Subject: [PATCH 21/22] Fix comments --- .../src/algorithm/intersects/triangle.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rust/sedona-geo-generic-alg/src/algorithm/intersects/triangle.rs b/rust/sedona-geo-generic-alg/src/algorithm/intersects/triangle.rs index d6dad70a5..ae04b477a 100644 --- a/rust/sedona-geo-generic-alg/src/algorithm/intersects/triangle.rs +++ b/rust/sedona-geo-generic-alg/src/algorithm/intersects/triangle.rs @@ -105,7 +105,7 @@ where return false; } - // empty polygon cannot intersect with rectangle + // empty polygon cannot intersect with triangle let Some(exterior) = rhs.exterior_ext() else { return false; }; @@ -113,20 +113,20 @@ where return false; } - // if any of the polygon's corners intersect the rectangle + // if any of the polygon's corners intersect the triangle let first_coord = unsafe { exterior.geo_coord_unchecked(0) }; if self.intersects(&first_coord) { return true; } - // or any point of the rectangle intersects the polygon + // or any point of the triangle intersects the polygon if self.first_coord().intersects(rhs) { return true; } let rect_lines = self.to_lines(); - // or any of the polygon's lines intersect the rectangle's lines + // or any of the polygon's lines intersect the triangle's lines if exterior.lines().any(|rhs_line| { rect_lines .iter() @@ -165,7 +165,7 @@ where return false; } - // if any of the triangle's corners intersect the rectangle + // if any of the rectangle's corners intersect the triangle self.intersects(&rhs.min_coord()) // or some corner of the triangle intersects the rectangle From 7b86708d674522678df65ca6758d43400ffeafcb Mon Sep 17 00:00:00 2001 From: Kristin Cowalcijk Date: Fri, 31 Oct 2025 09:56:01 +0800 Subject: [PATCH 22/22] Fix clippy warnings --- c/sedona-tg/src/tg.rs | 9 ++------- rust/sedona-geoparquet/src/metadata.rs | 9 ++------- rust/sedona-geoparquet/src/options.rs | 9 ++------- 3 files changed, 6 insertions(+), 21 deletions(-) diff --git a/c/sedona-tg/src/tg.rs b/c/sedona-tg/src/tg.rs index e6c8bdb8f..0759f4508 100644 --- a/c/sedona-tg/src/tg.rs +++ b/c/sedona-tg/src/tg.rs @@ -23,11 +23,12 @@ use crate::{error::TgError, tg_bindgen::*}; /// /// These index types are used to inform the internal index used in geometries /// to accelerate repeated operations. -#[derive(Debug, Clone, Copy)] +#[derive(Debug, Clone, Copy, Default)] pub enum IndexType { /// Do not build an index Unindexed, /// Use the statically set default + #[default] Default, /// Use natural indexing Natural, @@ -35,12 +36,6 @@ pub enum IndexType { YStripes, } -impl Default for IndexType { - fn default() -> Self { - Self::Default - } -} - impl IndexType { fn to_tg(self) -> tg_index { match self { diff --git a/rust/sedona-geoparquet/src/metadata.rs b/rust/sedona-geoparquet/src/metadata.rs index 98ca0ff40..09caac76a 100644 --- a/rust/sedona-geoparquet/src/metadata.rs +++ b/rust/sedona-geoparquet/src/metadata.rs @@ -39,10 +39,11 @@ use serde_json::Value; /// /// In contrast to the _user-specified API_, which is just "WKB" or "Native", here we need to know /// the actual written encoding type so that we can save that in the metadata. -#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Default)] #[allow(clippy::upper_case_acronyms)] pub enum GeoParquetColumnEncoding { /// Serialized Well-known Binary encoding + #[default] WKB, /// Native Point encoding #[serde(rename = "point")] @@ -64,12 +65,6 @@ pub enum GeoParquetColumnEncoding { MultiPolygon, } -impl Default for GeoParquetColumnEncoding { - fn default() -> Self { - Self::WKB - } -} - impl Display for GeoParquetColumnEncoding { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { use GeoParquetColumnEncoding::*; diff --git a/rust/sedona-geoparquet/src/options.rs b/rust/sedona-geoparquet/src/options.rs index 43eafad30..0301716f2 100644 --- a/rust/sedona-geoparquet/src/options.rs +++ b/rust/sedona-geoparquet/src/options.rs @@ -48,12 +48,13 @@ impl From for TableGeoParquetOptions { } /// The GeoParquet Version to write for output with spatial columns -#[derive(Debug, Clone, Copy)] +#[derive(Debug, Clone, Copy, Default)] pub enum GeoParquetVersion { /// Write GeoParquet 1.0 metadata /// /// GeoParquet 1.0 has the widest support among readers and writers; however /// it does not include row-group level statistics. + #[default] V1_0, /// Write GeoParquet 1.1 metadata and optional bounding box column @@ -80,12 +81,6 @@ pub enum GeoParquetVersion { Omitted, } -impl Default for GeoParquetVersion { - fn default() -> Self { - Self::V1_0 - } -} - impl FromStr for GeoParquetVersion { type Err = DataFusionError;