Repository: JuliaEarth/CoordRefSystems.jl (julia)

Issue:
Add `Cartesian` constructor with tuple of numbers
The current constructors only cover the unitful case or cases with splat.

Pull request description:
Now, `Cartesian` constructors accept a tuple of number or a tuple of quantities:
```julia
Cartesian((1.0, 1.0))
Cartesian((1.0u"m", 1.0u"m"))
```
closes #71

Patch:
diff --git a/src/crs/basic.jl b/src/crs/basic.jl
index b5253964..425f16a5 100644
--- a/src/crs/basic.jl
+++ b/src/crs/basic.jl
@@ -12,6 +12,8 @@ abstract type Basic{Datum} <: CRS{Datum} end
 """
     Cartesian(x₁, x₂, ..., xₙ)
     Cartesian{Datum}(x₁, x₂, ..., xₙ)
+    Cartesian((x₁, x₂, ..., xₙ))
+    Cartesian{Datum}((x₁, x₂, ..., xₙ))
 
 N-dimensional Cartesian coordinates `x₁, x₂, ..., xₙ` in length units (default to meter)
 with a given `Datum` (default to `NoDatum`).
@@ -37,9 +39,9 @@ struct Cartesian{Datum,N,L<:Len} <: Basic{Datum}
 end
 
 Cartesian{Datum}(coords::NTuple{N,L}) where {Datum,N,L<:Len} = Cartesian{Datum,N,float(L)}(coords)
-Cartesian{Datum}(coords::L...) where {Datum,L<:Len} = Cartesian{Datum}(coords)
-Cartesian{Datum}(coords::Len...) where {Datum} = Cartesian{Datum}(promote(coords...))
-Cartesian{Datum}(coords::Number...) where {Datum} = Cartesian{Datum}(addunit.(coords, u"m")...)
+Cartesian{Datum}(coords::NTuple{N,Len}) where {Datum,N} = Cartesian{Datum}(promote(coords...))
+Cartesian{Datum}(coords::NTuple{N,Number}) where {Datum,N} = Cartesian{Datum}(addunit.(coords, u"m"))
+Cartesian{Datum}(coords::Number...) where {Datum} = Cartesian{Datum}(coords)
 
 Cartesian(args...) = Cartesian{NoDatum}(args...)
 


Test patch:
diff --git a/test/crs/constructors.jl b/test/crs/constructors.jl
index eef03d77..c7b13f1b 100644
--- a/test/crs/constructors.jl
+++ b/test/crs/constructors.jl
@@ -5,6 +5,9 @@
       @test Cartesian(T(1), T(1)) == Cartesian(T(1) * u"m", T(1) * u"m")
       @test Cartesian(T(1), T(1), T(1)) == Cartesian(T(1) * u"m", T(1) * u"m", T(1) * u"m")
       @test Cartesian(T(1) * u"m", 1 * u"m") == Cartesian(T(1) * u"m", T(1) * u"m")
+      @test Cartesian((T(1), T(1))) == Cartesian((T(1) * u"m", T(1) * u"m"))
+      @test Cartesian((T(1), T(1), T(1))) == Cartesian((T(1) * u"m", T(1) * u"m", T(1) * u"m"))
+      @test Cartesian((T(1) * u"m", 1 * u"m")) == Cartesian((T(1) * u"m", T(1) * u"m"))
 
       c = Cartesian(T(1))
       @test sprint(show, c) == "Cartesian{NoDatum}(x: 1.0 m)"