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

turf-tessellate: Pass original coordinate elevations through the tessellate function. #2855

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

prozvora
Copy link

Summary of Changes

Pad elevation coordinate member with undefined for passing to earcut.
Strip off undefined elevations before returning result from tessellate.
Add test case for constant elevation in all coordinates.
Add test case for variable elevation in some coordinates.

Note

This is a non-breaking change.

Resolves

Test Output

turf-all-tests

Tessellate

# tesselate
ok 1 Polygon returns a FeatureCollection
ok 2 contains at least 1 triangle
ok 3 triangle is valid
ok 4 MultiPolygon returns a FeatureCollection
ok 5 contains at least 1 triangle
ok 6 triangle is valid
ok 7 should throw
ok 8 should throw
ok 9 Polygon returns a FeatureCollection
ok 10 contains at least 1 triangle
ok 11 triangle is valid
ok 12 triangle coordinates contain elevation
ok 13 Polygon returns a FeatureCollection
ok 14 first triangle coordinates contain original elevations
ok 15 second triangle coordinates contain original elevations

1..15
# tests 15
# pass  15

# ok

Please provide the following when creating a PR:

  • Meaningful title, including the name of the package being modified.
  • Summary of the changes.
  • Heads up if this is a breaking change.
  • Any issues this resolves.
  • Inclusion of your details in the contributors field of package.json - you've earned it! 👏
  • Confirmation you've read the steps for preparing a pull request.

@prozvora prozvora changed the title turf-tessellate: Pass original coordinate elevations through the tesselate function. turf-tessellate: Pass original coordinate elevations through the tessellate function. Mar 16, 2025
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