-
Notifications
You must be signed in to change notification settings - Fork 983
Changed turf-destination and turf-ellipse to pass through elevation value if present #2852
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
Changed turf-destination and turf-ellipse to pass through elevation value if present #2852
Conversation
Fix dimension handling in tesselate. Test for elevation in tesselate. Fix elevation in destination. Add input and output test cases with elevation to destination and ellipse.
packages/turf-tesselate/test.ts
Outdated
t.equal( | ||
simpleTrianglesWithElevation.type, | ||
"FeatureCollection", | ||
"Polygon returns a FeatureCollection" | ||
); | ||
t.equal( | ||
simpleTrianglesWithElevation.features[0].geometry.type, | ||
"Polygon", | ||
"contains at least 1 triangle" | ||
); | ||
t.equal( | ||
simpleTrianglesWithElevation.features[0].geometry.coordinates[0].length, | ||
4, | ||
"triangle is valid" | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if these tests are necessary to repeat. I copied them from the first polygon. I figured they would catch any malformation issues from adding the elevation to the coordinate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed tessellate changes, should be included in a different PR as they are more complex.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #2855
@smallsaucepan can I get a review? |
Apologies @prozvora. I'm a bit swamped at the moment. Will take a look for you as soon as I can 👍 |
@smallsaucepan Bumping, can I get a review? Also, could this be patched on v6.5.0? |
@twelch any chance I could get a review on this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry this took so long to get to @prozvora. Have added one request to check at runtime whether any elevation elements passed are numbers.
Thanks for this PR @prozvora 👍 |
Summary of Changes
Fix elevation in destination.
Add input and output test cases with elevation to destination and ellipse.
Note
This is a non-breaking change.
Resolves
Test Output
Destination
Ellipse
Please provide the following when creating a PR:
contributors
field ofpackage.json
- you've earned it! 👏