Add support for getting projected coordinates #23
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.
Just putting it here as draft PR to show what I was experimenting with (this just projects a single point at the moment).
The reason I started looking at this is because it would be nice to get the coordinates in a certain projection for quick plotting of spherely geography objects (https://dewey.dunnington.ca/post/2022/s2-version-1.1.0/#plotting, https://github.com/r-spatial/s2/blob/76e36ae9ef1348412726e780f6a5a9e4ba0805d8/R/plot.R).
But also in general we will want to expose methods to get all the coordinates, and then providing an option to get projected coordinates (in some basic projections that S2 supports) might be nice.
For the plotting, we will also need to add tesselation in the process of getting the projected coordinates (to correctly represent the shortest-path-on-the-sphere in a projection that uses "straight" lines)