Skip to content

Commit b97f8f5

Browse files
authored
Merge pull request #89 from gaelforget/v0p3p14c
update notebook
2 parents 24a4dae + 4431660 commit b97f8f5

File tree

1 file changed

+25
-9
lines changed

1 file changed

+25
-9
lines changed

tutorials/GeoTIFF_demo.jl

+25-9
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,36 @@ begin
1919
using ArchGDAL, Colors
2020
using ArchGDAL.DiskArrays: eachchunk
2121
using PlutoUI
22+
using Glob
23+
pth0=joinpath("worldcover2021","ESA_WorldCover_10m_2021_v200_60deg_macrotile_N30E120")
24+
list0=glob("*.tif",pth0)
25+
list1=basename.(list0)
2226
end
2327

2428
# ╔═╡ f5e13837-9335-489f-a275-dbc1b5c5b7c3
2529
begin
26-
filename=joinpath("worldcover2021","ESA_WorldCover_10m_2021_v200_60deg_macrotile_N30E120",
27-
"ESA_WorldCover_10m_2021_V200_N30E132_Map.tif")
2830

29-
ii_select=@bind ii Select(0:6,default=3)
30-
31+
ii_select=@bind ii Select(0:6,default=5)
32+
ff_select=@bind ff Select(list1,default="ESA_WorldCover_10m_2021_V200_N30E132_Map.tif")
33+
3134
md"""## GeoTIFF Basics Demo
3235
3336
Demonstration of basic handling of GeoTIFF files using [ArchGDAL.jl](https://github.com/yeesian/ArchGDAL.jl).
3437
3538
The dataset used is from [worldcover2021.esa.int](https://worldcover2021.esa.int).
3639
37-
- filename = $(basename(filename))
38-
- isfile(filename) = $(isfile(filename))
40+
- filename = $(ff_select)
3941
- level = $(ii_select)
4042
4143
"""
4244
end
4345

46+
# ╔═╡ 33d86f38-d406-49b7-8935-40901ba44dc9
47+
begin
48+
filename=joinpath(pth0,ff)
49+
isfile(filename)
50+
end
51+
4452
# ╔═╡ 5a3c438e-afc7-4ba9-9236-bec0a42f5d04
4553
begin
4654
dataset = ArchGDAL.readraster(filename)
@@ -75,11 +83,13 @@ PLUTO_PROJECT_TOML_CONTENTS = """
7583
[deps]
7684
ArchGDAL = "c9ce4bd3-c3d5-55b8-8973-c0e20141b8c3"
7785
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
86+
Glob = "c27321d9-0574-5035-807b-f59d2c89b15c"
7887
PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8"
7988
8089
[compat]
8190
ArchGDAL = "~0.9.2"
8291
Colors = "~0.12.8"
92+
Glob = "~1.3.0"
8393
PlutoUI = "~0.7.48"
8494
"""
8595

@@ -89,7 +99,7 @@ PLUTO_MANIFEST_TOML_CONTENTS = """
8999
90100
julia_version = "1.8.1"
91101
manifest_format = "2.0"
92-
project_hash = "2254d1571daefbf2fa3d03d28ac03a7a10005317"
102+
project_hash = "ed5ca2ecf161eb2c1f70750539bcb3296eae7a71"
93103
94104
[[deps.AbstractFFTs]]
95105
deps = ["ChainRulesCore", "LinearAlgebra"]
@@ -257,6 +267,11 @@ git-tree-sha1 = "29e1ec25cfb6762f503a19495aec347acf867a9e"
257267
uuid = "0329782f-3d07-4b52-b9f6-d3137cf03c7a"
258268
version = "1.0.0"
259269
270+
[[deps.Glob]]
271+
git-tree-sha1 = "4df9f7e06108728ebf00a0a11edee4b29a482bb2"
272+
uuid = "c27321d9-0574-5035-807b-f59d2c89b15c"
273+
version = "1.3.0"
274+
260275
[[deps.Graphics]]
261276
deps = ["Colors", "LinearAlgebra", "NaNMath"]
262277
git-tree-sha1 = "d61890399bc535850c4bf08e4e0d3a7ad0f21cbd"
@@ -684,14 +699,15 @@ version = "17.4.0+0"
684699

685700
# ╔═╡ Cell order:
686701
# ╟─f5e13837-9335-489f-a275-dbc1b5c5b7c3
687-
# ╟─307e1580-43d8-4594-880a-2c7c945f946e
702+
# ╠═307e1580-43d8-4594-880a-2c7c945f946e
703+
# ╟─33d86f38-d406-49b7-8935-40901ba44dc9
688704
# ╠═5a3c438e-afc7-4ba9-9236-bec0a42f5d04
689705
# ╠═bfe77156-41ce-4c9c-84dd-245301bab3af
690706
# ╠═51b09683-d514-4345-b59b-c08aad9d1655
691707
# ╠═60f9047f-155f-4b3b-ae75-1bfee616cb7b
692708
# ╠═e49078e2-9303-4399-9e12-d5eba18c4b73
693709
# ╠═a10060c0-c0ef-4ec2-a74f-b02c4754efc3
694710
# ╠═cfb1c4b6-9abf-4641-ba5f-426c93a30a41
695-
# ╠═9837f09b-b0d1-42e0-b9e2-d3ebd9bfb2e7
711+
# ╟─9837f09b-b0d1-42e0-b9e2-d3ebd9bfb2e7
696712
# ╟─00000000-0000-0000-0000-000000000001
697713
# ╟─00000000-0000-0000-0000-000000000002

0 commit comments

Comments
 (0)