Skip to content

Commit 09e1e6d

Browse files
committed
tests
1 parent 0526f0e commit 09e1e6d

File tree

3 files changed

+16
-21
lines changed

3 files changed

+16
-21
lines changed

ext/ArchGDALExt/archgdaldataset.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ function getproj(::Nothing, attrs)
135135
end
136136

137137

138-
function create_dataset(
138+
function YAB.create_dataset(
139139
::Type{<:GDALDataset},
140140
outpath,
141141
gatts,

test/datasets.jl

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,21 @@ h = get_var_handle(ds_zarr, "psl")
5555
@test allow_parallel_write(ds_zarr) == true
5656
@test allow_missings(ds_zarr) == false
5757
end
58-
58+
@testset "Reading ArchGDAL" begin
59+
using ArchGDAL
60+
import Downloads
61+
p3 = Downloads.download("https://download.osgeo.org/geotiff/samples/gdal_eg/cea.tif")
62+
ds_tif = YAXArrayBase.to_dataset(p3, driver=:gdal)
63+
vn = get_varnames(ds_tif)
64+
@test sort(vn) == ["Gray"]
65+
@test get_var_dims(ds_tif, "Gray") == ("X", "Y")
66+
@test haskey(get_var_attrs(ds_tif, "Gray"), "projection")
67+
h = get_var_handle(ds_tif, "Gray")
68+
@test !YAXArrayBase.iscompressed(h)
69+
@test all(isapprox.(h[1:2,1:2], [0x00 0x00; 0x00 0x00]))
70+
@test allow_parallel_write(ds_tif) == false
71+
@test allow_missings(ds_tif) == true
72+
end
5973
function test_write(T)
6074
p = tempname()
6175
ds = create_empty(T, p)

test/drivers_list.jl

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)