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.
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.
removed tessellate changes, should be included in a different PR as they are more complex.
|
@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? |
smallsaucepan
left a comment
There was a problem hiding this comment.
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 👍 |
|
I encountered some unexpected behavior with turf lineSliceAlong / lineChunk which seems to tie back to this change, created an issue for discussion: #3007 |
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:
contributorsfield ofpackage.json- you've earned it! 👏