Skip to content

Conversation

@Kontinuation
Copy link
Member

This is part of the forked dependency elimination plan: #165. This PR depends on #193.

This PR moves geo-traits-ext from wherobots/geo to sedona-db and renamed it to sedona-geo-traits-ext. Currently it is a standalone crate and can be compiled using cd rust/sedona-geo-traits-ext && cargo build. We'll update the Cargo.toml files in the final step to make it live.

@Kontinuation Kontinuation force-pushed the split-pr4-add-geo-traits-ext branch from 91b7012 to 7cbc5d7 Compare October 8, 2025 13:02
@Kontinuation Kontinuation requested a review from Copilot October 8, 2025 13:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds the sedona-geo-traits-ext crate to the sedona-db project as part of the forked dependency elimination plan. The crate provides extension traits for the geo-traits library, offering additional convenience methods and helpers that mirror the APIs of geo-types while working through trait objects.

Key changes include:

  • Creation of a new standalone Rust crate with extension traits for geometric types
  • Implementation of WKB (Well-Known Binary) support with optimized coordinate and line iterators
  • Addition of type tagging system to work around Rust's orphan rule limitations

Reviewed Changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
rust/sedona-geo-traits-ext/Cargo.toml Package configuration and dependencies
rust/sedona-geo-traits-ext/README.md Documentation explaining the crate's purpose and design
rust/sedona-geo-traits-ext/src/lib.rs Main library file with public exports
rust/sedona-geo-traits-ext/src/type_tag.rs Type tagging system for trait dispatch
rust/sedona-geo-traits-ext/src/coord.rs Coordinate extension traits
rust/sedona-geo-traits-ext/src/point.rs Point geometry extension traits
rust/sedona-geo-traits-ext/src/line.rs Line geometry extension traits
rust/sedona-geo-traits-ext/src/line_string.rs LineString geometry extension traits
rust/sedona-geo-traits-ext/src/polygon.rs Polygon geometry extension traits
rust/sedona-geo-traits-ext/src/multi_point.rs MultiPoint geometry extension traits
rust/sedona-geo-traits-ext/src/multi_line_string.rs MultiLineString geometry extension traits
rust/sedona-geo-traits-ext/src/multi_polygon.rs MultiPolygon geometry extension traits
rust/sedona-geo-traits-ext/src/geometry_collection.rs GeometryCollection extension traits
rust/sedona-geo-traits-ext/src/geometry.rs Main geometry extension traits
rust/sedona-geo-traits-ext/src/rect.rs Rectangle geometry extension traits
rust/sedona-geo-traits-ext/src/triangle.rs Triangle geometry extension traits
rust/sedona-geo-traits-ext/src/wkb_ext.rs WKB format support with optimized iterators

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Kontinuation Kontinuation marked this pull request as ready for review October 8, 2025 13:56
@Kontinuation Kontinuation marked this pull request as draft October 8, 2025 16:28
test(sedona-geo-traits-ext): add non-trivial LineString tests (rev_lines, is_closed); triangles left pending due to overflow panic

fix(LineStringTraitExt::triangles): use saturating_sub for <3 coords and add comprehensive tests

test(sedona-geo-traits-ext): split LineString combined test into rev_lines, triangles, and is_closed

refactor(tests): switch to let-else pattern in WKB tests for flatter control flow

test: expand LineString tests (empty, 2pt, 3pt, 4pt) for rev_lines/is_closed/triangles

Fix
@Kontinuation Kontinuation marked this pull request as ready for review October 8, 2025 17:06
Copy link
Member

@paleolimbot paleolimbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@Kontinuation Kontinuation merged commit 2051517 into apache:main Oct 9, 2025
12 checks passed
Kontinuation added a commit that referenced this pull request Oct 9, 2025
This is part of the forked dependency elimination plan: #165. This PR depends on #194.

This PR moves geo-generic-alg from wherobots/geo to sedona-db and renamed it to sedona-geo-generic-alg. Currently it is a standalone crate and can be compiled using `cd rust/sedona-geo-generic-alg && cargo build`. We'll update the Cargo.toml files in the final step to make it live.

The code moved to sedona-db only contains the algorithms actually used by other parts of the project. There's a backup containing all ported algorithms here: https://github.com/Kontinuation/sedona-db/tree/full-migrate-generic-alg.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants