Skip to content

Get and serialize geometries from SegmentSplits#74

Merged
yamilbknsu merged 8 commits intomainfrom
yep/edge-attributes
Jan 2, 2026
Merged

Get and serialize geometries from SegmentSplits#74
yamilbknsu merged 8 commits intomainfrom
yep/edge-attributes

Conversation

@yamilbknsu
Copy link
Collaborator

In this PR I implement the logic to create WKT geometries from segment splits and writing to txt file. For each segment split, we get the corresponding segment and iterate over its LineString geometry checking which points are in the linear reference corresponding to the split.

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 implements the logic to create WKT (Well-Known Text) geometries from segment splits and serialize them to a compressed text file. The implementation extracts LineString geometries for each segment split by iterating through the segment's geometry and selecting points within the linear reference range of the split.

Key changes:

  • Added create_geometries function to parallelize geometry creation from segment splits
  • Implemented create_geometry_from_split method that extracts sub-geometries based on linear reference ranges
  • Integrated geometry serialization into the graph output, writing WKT strings to edges-geometries-enumerated.txt.gz

Reviewed changes

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

Show a summary per file
File Description
rust/bambam-omf/src/graph/serialize_ops.rs Added parallel create_geometries function to create LineString geometries from segment splits
rust/bambam-omf/src/graph/segment_split.rs Implemented create_geometry_from_split method with distance-based point selection logic; updated imports to use geo crate's Length trait
rust/bambam-omf/src/graph/omf_graph.rs Integrated geometry creation into graph building; added geometries field to OmfEdgeList; added writer and serialization logic for WKT geometries
rust/bambam-omf/src/graph/connector_in_segment.rs Updated format string to use inline variable formatting
rust/bambam-omf/src/app/cli_bbox.rs Updated format string to use inline variable formatting
rust/bambam-omf/Cargo.toml Added wkt dependency for WKT serialization
rust/bambam-gbfs/src/app/gbfs_cli.rs Updated format strings to use inline variable formatting

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

yamilbknsu and others added 2 commits December 31, 2025 14:31
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Collaborator

@robfitzgerald robfitzgerald left a comment

Choose a reason for hiding this comment

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

works great, thanks! happy new year @yamilbknsu!!!! 🎆

@yamilbknsu yamilbknsu merged commit f123598 into main Jan 2, 2026
1 check passed
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.

3 participants