Working with Sentinel-2 in Julia SentinelDataSource.jl package
Direct access to analysis-ready data cubes

Table of ContentsΒΆ
Run this notebook interactively with all dependencies pre-installed
IntroductionΒΆ
SentinelDataSource.jl is a Julia package that extends DimensionalData to load EOPF Zarr data. This backend enables seamless access to ESA EOPF data products stored in the Zarr format, presenting them as analysis-ready data structures.
This notebook demonstrates how to use the SentinelDataSource package to explore and analyze EOPF Zarr datasets. It highlights the key features currently supported.
π GitHub: JuliaGeo SentinelDataSource
β Issue Tracker: Submit or view issues
Install the SentinelDataSource packageΒΆ
The SentinelDataSource package can be installed as any Julia package via the internal package manager.
] add https://github.com/JuliaGeo/SentinelDataSource.jl.gitImport PackageΒΆ
The SentinelDataSource package is the library to open EOPF datasets. This is integrated into the DimensionalData ecosystem and the JuliaGeo ecosystem.
using SentinelDataSource
using YAXArraysMain Features of the SentinelDataSource packageΒΆ
The SentinelDataSource package will at the moment open the EOPF datasets in Native Mode and will return a DimTree of the data.
Open the Product in Native ModeΒΆ
Sentinel-2 Level-2AΒΆ
We begin with a simple example by accessing a Sentinel-2 L2A product in native mode. To obtain the product URL, you can use the STAC Browser to locate a tile and retrieve the URL from the βEOPF Productβ asset.
path = joinpath(
"https://objects.eodc.eu/e05ab01a9d56408d82ac32d69a5aae2a:notebook-data/tutorial_data/",
"cpm_v262/S2A_MSIL2A_20200707T101031_N0500_R022_T32TPS_20230614T182201.zarr"
)"https://objects.eodc.eu/e05ab01a9d56408d82ac32d69a5aae2a:notebook-data/tutorial_data/cpm_v262/S2A_MSIL2A_20200707T101031_N0500_R022_T32TPS_20230614T182201.zarr"We can use SentinelDataSource.open_datatree to open the EOPF Zarr product as an DimensionalData.DimTree.
dt = SentinelDataSource.open_tree(path)β DimTree β
β branches β€
:measurements
ββ :reflectance
ββ :r20m dims: X, Y size: 5490Γ5490 layers: :b12, :b11, :b07, :b04, :b01, :b02, :b03, :b8a, :b06, :b05
ββ :r60m dims: X, Y size: 1830Γ1830 layers: :b12, :b11, :b07, :b09, :b04, :b01, :b02, :b03, :b06, :b8a, :b05
ββ :r10m dims: X, Y size: 10980Γ10980 layers: :b02, :b03, :b08, :b04
:conditions
ββ :mask
β ββ :detector_footprint
β β ββ :r20m dims: X, Y size: 5490Γ5490 layers: :b8a, :b06, :b12, :b11, :b07, :b05
β β ββ :r60m dims: X, Y size: 1830Γ1830 layers: :b10, :b01, :b09
β β ββ :r10m dims: X, Y size: 10980Γ10980 layers: :b02, :b03, :b08, :b04
β ββ :l1c_classification
β β ββ :r60m dims: X, Y size: 1830Γ1830 layers: :b00
β ββ :l2a_classification
β ββ :r20m dims: X, Y size: 5490Γ5490 layers: :scl
β ββ :r60m dims: X, Y size: 1830Γ1830 layers: :scl
ββ :geometry dims: X, Y, angle, Band, detector size: 23Γ23Γ2Γ13Γ6 layers: :sun_angles, :mean_sun_angles, :mean_viewing_incidence_angles, :viewing_incidence_angles
ββ :meteorology
ββ :cams dims: X, Y size: 9Γ9 layers: :aod865, :aod670, :aod550, :aod1240, :omaod550, :z, :aod469, :ssaod550, :suaod550, :duaod550, :bcaod550
ββ :ecmwf dims: X, Y size: 9Γ9 layers: :u10, :msl, :tco3, :r, :tcwv, :v10
:quality
ββ :atmosphere
β ββ :r20m dims: X, Y size: 5490Γ5490 layers: :aot, :wvp
β ββ :r60m dims: X, Y size: 1830Γ1830 layers: :aot, :wvp
β ββ :r10m dims: X, Y size: 10980Γ10980 layers: :aot, :wvp
ββ :mask
β ββ :r20m dims: X, Y size: 5490Γ5490 layers: :b8a, :b06, :b12, :b11, :b07, :b05
β ββ :r60m dims: X, Y size: 1830Γ1830 layers: :b10, :b01, :b09
β ββ :r10m dims: X, Y size: 10980Γ10980 layers: :b02, :b03, :b08, :b04
ββ :probability
ββ :r20m dims: X, Y size: 5490Γ5490 layers: :cld, :snw
βββββββββββAs an example, we plot the 60 meters red band to view the image.
using CairoMakie
data = dt.measurements.reflectance.r60m[:b04]
fig, ax, h = image(data)
ConclusionΒΆ
This notebook presents the current development state of the SentinelDataSource.jl package, which enables seamless access to EOPF Zarr products in the familiar DimensionalData ecosystem. The key takeaways are summarized below:
EOPF products are opened without modification using DimensionalData
DimTreeand structures.These DimTree objects can be queried with the selectors as other DimensionalData objects.
Future Development StepsΒΆ
Incorporate user feedbackβplease test the plugin and submit issues here: https://
github .com /JuliaGeo /SentinelDataSource .jl /issues
