Skip to content

Allow splitting only within grid bounds - #73

Merged
tomalrussell merged 9 commits into
mainfrom
fix/47-splits-outside-grid
Aug 20, 2026
Merged

Allow splitting only within grid bounds#73
tomalrussell merged 9 commits into
mainfrom
fix/47-splits-outside-grid

Conversation

@tomalrussell

Copy link
Copy Markdown
Member

Aims to close #47

  • Test lines partially/wholly outside the grid
  • Split linestrings within bounds (behind "bounded" flag)

Comment thread extension/src/operations.cpp
Comment thread extension/src/operations.cpp
@thomas-fred

Copy link
Copy Markdown

Perhaps worth adding a test where a segment is co-linear with some part of a grid. Also in the case of co-linear with a grid edge (in the bounded case).

@thomas-fred

Copy link
Copy Markdown

Nothing else catches my eye

@tomalrussell
tomalrussell force-pushed the fix/47-splits-outside-grid branch from aff1e0c to 021e643 Compare August 18, 2026 15:26
- Horizontal/vertical segments
- Various directions
- Could maybe reuse a linesCross check to simplify further?
- Add docstring noting that it's a test for whether a line-segment intersects a rectangular extent (i.e. "within" is okay, as subset of "intersects")
@tomalrussell

Copy link
Copy Markdown
Member Author

Perhaps worth adding a test where a segment is co-linear with some part of a grid. Also in the case of co-linear with a grid edge (in the bounded case).

Added some more tests, including co-linear with bounds.

Just looking at the CI, needs linting but getting close!

@tomalrussell
tomalrussell merged commit 228aaca into main Aug 20, 2026
9 checks passed
@tomalrussell
tomalrussell deleted the fix/47-splits-outside-grid branch August 20, 2026 11:36
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.

Test raster intersection with line segment external to grid

2 participants