Repository navigation
Add ClipByRect2D with Sutherland-Hodgman and Liang-Barsky algorithms #709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
peterstace
wants to merge
36
commits into
master
Choose a base branch
from
clip-by-rect-doc
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 24 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
ced5a26
Add Sutherland-Hodgman algorithm documentation
peterstace 6374c8c
Add exhaustive ClipByRect unit test case inventory
peterstace 182d374
sutherland_hodgman.md: tweak test cases
peterstace 1a07156
sutherland_hodgman.md: tweak test cases and rules
peterstace d2cecf9
sutherland_hodgman.md: tweaks
peterstace 7bf04e6
alg_sutherland_hodgman.go: add stubs and dispatch for ClipByRect
peterstace 1a32f86
Implement for Point
peterstace e7e56f3
MultiPoint
peterstace 22cb4c5
LineString
peterstace e1c5957
MultiLineString
peterstace 2f014f6
Implement polygon clipping
peterstace 3e2f6fe
MultiPolygon
peterstace f9c03e6
polygonClipper refactor
peterstace 18c63dd
GeometryCollection
peterstace 35a9117
Add DR, NE, and CD test cases for ClipByRect
peterstace 488fb3b
Fix Z/M values lost when polygon fully contains clipping rect
peterstace 9353ebe
Replace []Coordinates with mutableSequence in polygon clipping
peterstace 1fac7c7
Revert "Replace []Coordinates with mutableSequence in polygon clipping"
peterstace 4e8582a
alg_clip_by_rect_sutherland_hodgman.go: Alt way to handle coordinates
peterstace 71bc5cf
Revert back to using []Coordinates
peterstace f35ddea
Pass around raw []float64
peterstace 8447c1e
Rename ClipByRect to ClipByRect2D with 2D-only output
peterstace 7a6674b
Update ClipByRect tests to use consolidated test helpers
peterstace 100ab7c
Fix lint failures from CI
peterstace cb7b00a
Use sort package instead of slices/cmp
peterstace fdfd0cb
Remove clip-by-rect algorithm docs
peterstace c4b3d3b
Rename Sutherland-Hodgman test file to match source
peterstace c5e97f0
Remove redundant endpoint short-circuits in lerpXY
peterstace 4dbf7b5
Remove vertical whitespace
peterstace 034e5a1
Trim lerpXY doc comment to its core contract
peterstace b3702d3
Move xysToSeq next to its inverse asXYs in type_sequence.go
peterstace cc7075d
Remove redundant empty-sequence guard in clipLineStringByRect
peterstace 8252bbb
Remove clipping docs
peterstace 3e354d1
Merge branch 'clip-by-rect-doc' of github.com:peterstace/simplefeatur…
peterstace 398cc5e
Snap line-clip endpoints exactly onto rect edges
peterstace 34d3895
Return ok from findNextStart instead of a bogus index
peterstace File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.