GHSL — catalog explorer¶
Browse the bundled GHSL product catalog: list the curated products, resolve a friendly alias, inspect an availability matrix, and read a categorical legend. No download — this notebook touches no network.
Setup¶
The only import we need is the GHSL Catalog, which loads the bundled product metadata
shipped with earthlens (no credentials, no network).
from earthlens.ghsl import Catalog
Curated products¶
Construct the catalog and count how many curated products it carries.
cat = Catalog()
print('curated products:', len(cat))
List the canonical product codes — each one can be passed to the GHSL backend as a
dataset.
cat.available_products()
Resolving aliases¶
Friendly names such as population or built_height resolve to their canonical GHSL codes
via resolve(), so you can refer to products by an easy-to-remember alias.
[cat.resolve(a) for a in ['population', 'settlement_model', 'built_height', 'land']]
Availability matrix¶
Each product carries a per-release availability matrix (epochs × resolutions). Here we fetch
the GHS_POP product and read the epochs and resolutions available in release R2023A.
pop = cat.get('GHS_POP')
print('epochs :', pop.release_epochs('R2023A'))
print('res :', pop.release_resolutions('R2023A'))
Categorical legend¶
Categorical products (here the settlement model GHS_SMOD) ship a class legend mapping each
pixel value to its label.
smod = cat.get('GHS_SMOD')
smod.legend