From 4e59668c5a4951797a7c3411859277f55d3ed23d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 25 Jun 2021 00:41:33 +0000 Subject: [PATCH 1/2] CompatHelper: bump compat for "ArchGDAL" to "0.7" --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 3b2750bc..3bea40fc 100644 --- a/Project.toml +++ b/Project.toml @@ -12,7 +12,7 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" ZipFile = "a5390f91-8eb1-5f08-bee0-b1d1ffed6cea" [compat] -ArchGDAL = "0.6" +ArchGDAL = "0.6, 0.7" Downloads = "1.4" RecipesBase = "0.7, 0.8, 1.0" Requires = "1.0" From a209ce7fc20dfc986c6ffbfe5f4ee70e9dbc0f8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Poisot?= Date: Thu, 2 Sep 2021 17:27:04 -0400 Subject: [PATCH 2/2] =?UTF-8?q?=E2=9C=A8=20add=20a=20grid=20function=20to?= =?UTF-8?q?=20get=20the=20grid=20of=20a=20layer=20Fixes=20#112?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Project.toml | 2 +- src/SimpleSDMLayers.jl | 2 +- src/lib/basics.jl | 4 ++++ test/basics.jl | 3 +++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 3bea40fc..b2b63cf8 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "SimpleSDMLayers" uuid = "2c645270-77db-11e9-22c3-0f302a89c64c" authors = ["Timothée Poisot ", "Gabriel Dansereau "] -version = "0.7.0" +version = "0.7.1" [deps] ArchGDAL = "c9ce4bd3-c3d5-55b8-8973-c0e20141b8c3" diff --git a/src/SimpleSDMLayers.jl b/src/SimpleSDMLayers.jl index 583e9f6f..cf207b3e 100644 --- a/src/SimpleSDMLayers.jl +++ b/src/SimpleSDMLayers.jl @@ -15,7 +15,7 @@ include(joinpath("lib", "overloads.jl")) include(joinpath("lib", "generated.jl")) include(joinpath("lib", "basics.jl")) -export latitudes, longitudes, boundingbox +export latitudes, longitudes, boundingbox, grid include(joinpath("lib", "iteration.jl")) diff --git a/src/lib/basics.jl b/src/lib/basics.jl index 803a3965..a303aee3 100644 --- a/src/lib/basics.jl +++ b/src/lib/basics.jl @@ -39,3 +39,7 @@ end function _layers_are_compatible(layers::Array{T}) where {T <: SimpleSDMLayer} all(layer -> _layers_are_compatible(layer, layers[1]), layers) end + +function grid(layer::T) where {T <: SimpleSDMLayer} + return copy(layer.grid) +end \ No newline at end of file diff --git a/test/basics.jl b/test/basics.jl index 501a29bc..9234fc40 100644 --- a/test/basics.jl +++ b/test/basics.jl @@ -20,4 +20,7 @@ bbox = boundingbox(S) @test bbox.bottom == S.bottom @test bbox.top == S.top +A = grid(S) +@test M == A + end