Skip to content

Adds equivalents of turf-line-chunk#10

Merged
nighthawk merged 7 commits into
mainfrom
chunked
Nov 25, 2023
Merged

Adds equivalents of turf-line-chunk#10
nighthawk merged 7 commits into
mainfrom
chunked

Conversation

@nighthawk
Copy link
Copy Markdown
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
Copy Markdown
Member Author

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

@nighthawk
Copy link
Copy Markdown
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
@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