Remote data
access the remote DGGS pyramid Blue Marble:
julia
using DGGS
using Zarr
using GLMakie
store = zopen("https://raw.githubusercontent.com/danlooo/blue-marble.dggs.zarr/refs/heads/master")
p = open_dggs_pyramid(store)
┌ DGGSPyramid ┐
├─── branches ┤
:dggs_s1 dims: dggs_i, dggs_j, dggs_n size: 4×2×5 layers: :Red, :Green, :Blue
:dggs_s2 dims: dggs_i, dggs_j, dggs_n size: 8×4×5 layers: :Red, :Green, :Blue
:dggs_s3 dims: dggs_i, dggs_j, dggs_n size: 16×8×5 layers: :Red, :Green, :Blue
:dggs_s4 dims: dggs_i, dggs_j, dggs_n size: 32×16×5 layers: :Red, :Green, :Blue
:dggs_s5 dims: dggs_i, dggs_j, dggs_n size: 64×32×5 layers: :Red, :Green, :Blue
:dggs_s6 dims: dggs_i, dggs_j, dggs_n size: 128×64×5 layers: :Red, :Green, :Blue
:dggs_s7 dims: dggs_i, dggs_j, dggs_n size: 256×128×5 layers: :Red, :Green, :Blue
:dggs_s8 dims: dggs_i, dggs_j, dggs_n size: 512×256×5 layers: :Red, :Green, :Blue
:dggs_s9 dims: dggs_i, dggs_j, dggs_n size: 1024×512×5 layers: :Red, :Green, :Blue
:dggs_s10 dims: dggs_i, dggs_j, dggs_n size: 2048×1024×5 layers: :Red, :Green, :Blue
:dggs_s11 dims: dggs_i, dggs_j, dggs_n size: 4096×2048×5 layers: :Red, :Green, :Blue
├─────── DGGS ┤
DGGSRS: ISEA4D.Penta
Geo BBox: Extent(X = (-180.0, 180.0), Y = (-90.0, 90.0))
└─────────────┘
Plot the pyramid:
julia
plot(p, :Red, :Green, :Blue; scale_factor=1/255)
A vertex of the icosahedron used for projection is near Gothenburg, Sweeden. This results into different oritentations of the DGGS zones, depending on which polyhedral face they belong to:
julia
using Extents
bbox = Extent(X = (10.5,12), Y=(57.5,59))
plot(p, :Red, :Green, :Blue; scale_factor=1/255, extent=bbox)
Subset a dataset with arrays at the same spatial resolution:
julia
ds = p[8]
┌ 512×256×5 DGGSDataset ┐
├───────────────────────┴──────────────────────────────────────────────── dims ┐
↓ dggs_i Sampled{Int64} 0:1:511 ForwardOrdered Regular Points,
→ dggs_j Sampled{Int64} 0:1:255 ForwardOrdered Regular Points,
↗ dggs_n Sampled{Int64} 0:1:4 ForwardOrdered Regular Points
├────────────────────────────────────────────────────────────────────── layers ┤
:Red eltype: Union{Missing, UInt8} dims: dggs_i, dggs_j, dggs_n size: 512×256×5
:Green eltype: Union{Missing, UInt8} dims: dggs_i, dggs_j, dggs_n size: 512×256×5
:Blue eltype: Union{Missing, UInt8} dims: dggs_i, dggs_j, dggs_n size: 512×256×5
├──────────────────────────────────────────────────────────────────────── DGGS ┤
DGGSRS: ISEA4D.Penta
Resolution: 8 (up to 6.55e+05 cells)
Geo BBox: Extent(X = (-180.0, 180.0), Y = (-90.0, 90.0))
└──────────────────────────────────────────────────────────────────────────────┘
Extract a band:
julia
a = ds.Blue
┌ 512×256×5 DGGSArray{Union{Missing, UInt8}, 3} Blue ┐
├────────────────────────────────────────────────────┴─────────────────── dims ┐
↓ dggs_i Sampled{Int64} 0:1:511 ForwardOrdered Regular Points,
→ dggs_j Sampled{Int64} 0:1:255 ForwardOrdered Regular Points,
↗ dggs_n Sampled{Int64} 0:1:4 ForwardOrdered Regular Points
├──────────────────────────────────────────────────────────────────── metadata ┤
Dict{String, Any} with 7 entries:
"missing_value" => 255
"name" => "Blue"
"author" => "NASA Earth Observatory"
"source" => "https://eoimages.gsfc.nasa.gov/images/imagerecords/73000/…
"title" => "October, Blue Marble Next Generation"
"_FillValue" => 0xff
"published" => "2004-10-1"
├──────────────────────────────────────────────────────────────────────── DGGS ┤
DGGSRS: ISEA4D.Penta
Resolution: 8 (up to 6.55e+05 cells)
Geo BBox: Extent(X = (-180.0, 180.0), Y = (-90.0, 90.0))
└──────────────────────────────────────────────────────────────────────────────┘