|
219 | 219 |
|
220 | 220 | @testset "reconstruct" begin |
221 | 221 | c = Cartesian(T(1) * mm, T(2) * mm) |
222 | | - rv = CoordRefSystems.raw(c) |
223 | | - @test CoordRefSystems.reconstruct(typeof(c), rv) == c |
224 | | - c = Polar(T(1) * km, T(2) * rad) |
225 | | - rv = CoordRefSystems.raw(c) |
226 | | - @test CoordRefSystems.reconstruct(typeof(c), rv) == c |
| 222 | + r = CoordRefSystems.raw(c) |
| 223 | + @test CoordRefSystems.reconstruct(typeof(c), r) == c |
| 224 | + C = Cartesian{WGS84Latest} |
| 225 | + @test CoordRefSystems.reconstruct(C, r) == C(T(1) * m, T(2) * m) |
| 226 | + C = Cartesian |
| 227 | + @test CoordRefSystems.reconstruct(C, r) == C(T(1) * m, T(2) * m) |
| 228 | + |
227 | 229 | c = Cartesian(T(1) * cm, T(2) * cm, T(3) * cm) |
228 | | - rv = CoordRefSystems.raw(c) |
229 | | - @test CoordRefSystems.reconstruct(typeof(c), rv) == c |
| 230 | + r = CoordRefSystems.raw(c) |
| 231 | + @test CoordRefSystems.reconstruct(typeof(c), r) == c |
| 232 | + C = Cartesian{WGS84Latest} |
| 233 | + @test CoordRefSystems.reconstruct(C, r) == C(T(1) * m, T(2) * m, T(3) * m) |
| 234 | + C = Cartesian |
| 235 | + @test CoordRefSystems.reconstruct(C, r) == C(T(1) * m, T(2) * m, T(3) * m) |
| 236 | + |
| 237 | + c = Polar(T(1) * km, T(2) * rad) |
| 238 | + r = CoordRefSystems.raw(c) |
| 239 | + @test CoordRefSystems.reconstruct(typeof(c), r) == c |
| 240 | + C = Polar{WGS84Latest} |
| 241 | + @test CoordRefSystems.reconstruct(C, r) == C(T(1) * m, T(2) * rad) |
| 242 | + C = Polar |
| 243 | + @test CoordRefSystems.reconstruct(C, r) == C(T(1) * m, T(2) * rad) |
| 244 | + |
230 | 245 | c = Cylindrical(T(1) * cm, T(2) * rad, T(3) * cm) |
231 | | - rv = CoordRefSystems.raw(c) |
232 | | - @test CoordRefSystems.reconstruct(typeof(c), rv) == c |
| 246 | + r = CoordRefSystems.raw(c) |
| 247 | + @test CoordRefSystems.reconstruct(typeof(c), r) == c |
| 248 | + C = Cylindrical{WGS84Latest} |
| 249 | + @test CoordRefSystems.reconstruct(C, r) == C(T(1) * m, T(2) * rad, T(3) * m) |
| 250 | + C = Cylindrical |
| 251 | + @test CoordRefSystems.reconstruct(C, r) == C(T(1) * m, T(2) * rad, T(3) * m) |
| 252 | + |
233 | 253 | c = Spherical(T(1) * mm, T(2) * rad, T(3) * rad) |
234 | | - rv = CoordRefSystems.raw(c) |
235 | | - @test CoordRefSystems.reconstruct(typeof(c), rv) == c |
| 254 | + r = CoordRefSystems.raw(c) |
| 255 | + @test CoordRefSystems.reconstruct(typeof(c), r) == c |
| 256 | + C = Spherical{WGS84Latest} |
| 257 | + @test CoordRefSystems.reconstruct(C, r) == C(T(1) * m, T(2) * rad, T(3) * rad) |
| 258 | + C = Spherical |
| 259 | + @test CoordRefSystems.reconstruct(C, r) == C(T(1) * m, T(2) * rad, T(3) * rad) |
236 | 260 |
|
237 | 261 | for C in geographic2D |
238 | 262 | c = C(T(30), T(60)) |
239 | | - rv = CoordRefSystems.raw(c) |
240 | | - @test CoordRefSystems.reconstruct(typeof(c), rv) == c |
| 263 | + r = CoordRefSystems.raw(c) |
| 264 | + @test CoordRefSystems.reconstruct(typeof(c), r) == c |
| 265 | + @test CoordRefSystems.reconstruct(C, r) == c |
241 | 266 | end |
242 | 267 |
|
243 | 268 | for C in geographic3D |
244 | 269 | c = C(T(30), T(60), T(1)) |
245 | | - rv = CoordRefSystems.raw(c) |
246 | | - @test CoordRefSystems.reconstruct(typeof(c), rv) == c |
| 270 | + r = CoordRefSystems.raw(c) |
| 271 | + @test CoordRefSystems.reconstruct(typeof(c), r) == c |
| 272 | + @test CoordRefSystems.reconstruct(C, r) == c |
247 | 273 | end |
248 | 274 |
|
249 | 275 | for C in projected |
250 | 276 | c = C(T(1), T(2)) |
251 | | - rv = CoordRefSystems.raw(c) |
252 | | - @test CoordRefSystems.reconstruct(typeof(c), rv) == c |
| 277 | + r = CoordRefSystems.raw(c) |
| 278 | + @test CoordRefSystems.reconstruct(typeof(c), r) == c |
| 279 | + @test CoordRefSystems.reconstruct(C, r) == c |
253 | 280 | end |
254 | 281 | end |
255 | 282 |
|
|
0 commit comments