|
53 | 53 | AG=ArchGDAL |
54 | 54 | r = AG.readraster(p) |
55 | 55 | @test YAXArrayBase.dimnames(r) == (:Y, :X, :Band) |
| 56 | + @test YAXArrayBase.dimname(r,1) == :Y |
| 57 | + @test YAXArrayBase.dimname(r,2) == :X |
| 58 | + @test YAXArrayBase.dimname(r,3) == :Band |
56 | 59 | @test YAXArrayBase.dimvals(r,1) == -28493.166784412522:60.02213698319374:2298.189487965865 |
| 60 | + @test YAXArrayBase.dimvals(r,2) == 4.2558845438021915e6:-60.02213698319374:4.22503316539283e6 |
| 61 | + @test YAXArrayBase.dimvals(r,3) == ["Gray"] |
| 62 | + @test_throws Exception YAXArrayBase.dimname(r,4) |
| 63 | + @test_throws Exception YAXArrayBase.dimvals(r,4) |
| 64 | + @test YAXArrayBase.iscontdim(r,1) == true |
| 65 | + @test YAXArrayBase.iscontdim(r,2) == true |
| 66 | + @test YAXArrayBase.iscontdim(r,3) == true |
57 | 67 | @test YAXArrayBase.getattributes(r)["projection"] == "+proj=cea +lat_ts=33.75 +lon_0=-117.333333333333 +x_0=0 +y_0=0 +datum=NAD27 +units=m +no_defs" |
58 | 68 | b = AG.getband(r,1) |
59 | 69 | @test YAXArrayBase.dimnames(b) == (:Y, :X) |
| 70 | + @test YAXArrayBase.dimname(b,1) == :Y |
| 71 | + @test YAXArrayBase.dimname(b,2) == :X |
60 | 72 | @test YAXArrayBase.dimvals(b,1) == -28493.166784412522:60.02213698319374:2298.189487965865 |
| 73 | + @test YAXArrayBase.dimvals(b,2) == 4.2558845438021915e6:-60.02213698319374:4.22503316539283e6 |
| 74 | + @test_throws Exception YAXArrayBase.dimname(b,3) |
| 75 | + @test_throws Exception YAXArrayBase.dimvals(b,3) |
| 76 | + @test YAXArrayBase.iscontdim(b,1) == true |
| 77 | + @test YAXArrayBase.iscontdim(b,2) == true |
61 | 78 | @test YAXArrayBase.getattributes(b)["projection"] == "+proj=cea +lat_ts=33.75 +lon_0=-117.333333333333 +x_0=0 +y_0=0 +datum=NAD27 +units=m +no_defs" |
62 | 79 | end |
0 commit comments