Catalog explorer (no network)¶
Browse the bundled Sentinel Hub two-layer catalog — curated collections and the evalscript recipe library — entirely offline. No credentials or network needed.
In [ ]:
Copied!
from earthlens.sentinel_hub import Catalog, read_evalscript
cat = Catalog()
print('collections:', sorted(cat.datasets))
print('recipes:', len(cat.recipes))
from earthlens.sentinel_hub import Catalog, read_evalscript
cat = Catalog()
print('collections:', sorted(cat.datasets))
print('recipes:', len(cat.recipes))
Collections and their DataCollection binding¶
In [ ]:
Copied!
for key in sorted(cat.datasets):
col = cat.get_collection(key)
print(
f'{key:18s} -> {col.sh_collection:14s} {col.resolution} m, default bands {col.default_bands}'
)
for key in sorted(cat.datasets):
col = cat.get_collection(key)
print(
f'{key:18s} -> {col.sh_collection:14s} {col.resolution} m, default bands {col.default_bands}'
)
Recipes (render vs Statistical dataMask variants)¶
In [ ]:
Copied!
for key in sorted(cat.recipes):
r = cat.get_recipe(key)
print(f'{key:30s} {r.kind:6s} {r.evalscript}')
for key in sorted(cat.recipes):
r = cat.get_recipe(key)
print(f'{key:30s} {r.kind:6s} {r.evalscript}')
Resolve a recipe and read its evalscript¶
In [ ]:
Copied!
resolved = cat.resolve('sentinel-2-l2a-ndvi')
print(resolved.sh_collection, resolved.evalscript, resolved.is_recipe)
print(read_evalscript(resolved.evalscript))
resolved = cat.resolve('sentinel-2-l2a-ndvi')
print(resolved.sh_collection, resolved.evalscript, resolved.is_recipe)
print(read_evalscript(resolved.evalscript))