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.
Change
Coord
from being aSVector{4, Float64}
alias to a struct implemented here. This struct is now mostly internal, since tuples are always returned from transformations. Length of the output tuple still depends on the input length. SVectors still work as input coordinates, just like tuples, vectors, and multiple argumentsf(x, y)
.I included a benchmark here that shows that performance is good:
https://github.com/JuliaGeo/Proj4.jl/blob/a2e71c159a5892b0986e1b933fe0ff405ce940a2/test/benchmark.jl
This is the same benchmark as used here: #51 (comment). For types like SVector or tuples the return type (tuple length) can be inferred precisely, for Vector it infers
Union{NTuple{2,Float64},NTuple{3,Float64},NTuple{4,Float64}}
which is as good as we can expect.This is on top of #57, but since it changes the return type of transformations I wanted to put it up separately for review. I think after this #57 would be ready for release, I was thinking to make it Proj.jl v1, such that we can actually start using the minor version number for features.