Skip to content
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

Adds equivalents of turf-line-chunk #10

Merged
merged 7 commits into from
Nov 25, 2023
Merged

Adds equivalents of turf-line-chunk #10

merged 7 commits into from
Nov 25, 2023

Conversation

nighthawk
Copy link
Member

@nighthawk nighthawk commented Dec 10, 2022

Also:

  • GeoJSON.LineString.length
  • GeoJSON.Polygon.LinearRing.circumference

TODOs:

Also:

- GeoJSON.LineString.length
- GeoJSON.Polygon.LinearRing.circumference
@nighthawk nighthawk self-assigned this Dec 10, 2022
@nighthawk
Copy link
Member Author

When this is done, can also contribute this to the upstream repo to resolve mapbox/turf-swift#183

@nighthawk
Copy link
Member Author

Oh, turf-line-chunk does something different than what I implemented here. Rather than adding more points to the existing line, it splits it up into separate features. Hmm, that's not what I need in my use of this, but someone might need it. Could add a new method as GeoJSON.Feature.chunk(length:) which does that and keep the existing methods that work on line strings and linear rings.

- New `GeoJSON.GeometryObject(splittingWhenCrossingAntiMeridian:)` helper
- Rename `clip(to:)` to `clipped(to:)`
- Adds `GeoJSON.LineString.clipped(to:)`
- Move algorithms to algorithms folder
@nighthawk nighthawk merged commit 286a462 into main Nov 25, 2023
3 checks passed
@nighthawk nighthawk deleted the chunked branch November 25, 2023 06:11
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.

1 participant