Get and serialize geometries from SegmentSplits#74
Merged
yamilbknsu merged 8 commits intomainfrom Jan 2, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
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_geometriesfunction to parallelize geometry creation from segment splits - Implemented
create_geometry_from_splitmethod 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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
robfitzgerald
approved these changes
Dec 31, 2025
Collaborator
robfitzgerald
left a comment
There was a problem hiding this comment.
works great, thanks! happy new year @yamilbknsu!!!! 🎆
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.