fix(projection) - Rework public API to allow arbitrary projections - #3098
Merged
Conversation
Collaborator
Author
|
One possible counterexample to the |
mfedderly
force-pushed
the
mf/projection-public-api
branch
from
August 18, 2026 15:37
b63fbe3 to
0644511
Compare
mfedderly
marked this pull request as ready for review
August 18, 2026 15:38
mfedderly
force-pushed
the
mf/projection-public-api
branch
from
August 18, 2026 16:19
52ce426 to
d844986
Compare
mfedderly
force-pushed
the
mf/projection-public-api
branch
from
August 18, 2026 16:22
d844986 to
a43f870
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rename
converttoprojectand exports it as new public api.There are plenty of projections that aren't Mercator or WGS84, and a lot of work has gone into generic projection tools like
proj4. This lets people use the existing projection code in Turf to manage the GeoJSON wrappers without forcing Turf to continue to expand for new projections or stay up to date with these other packages.WGS84 and Mercator are a special case because they are so often used in web mapping, so I think it makes sense to continue to ship implementations of these two methods.
Fixes #3046