Welcome · 11:00–11:25

What does a satellite see?

Today we follow one lake in Bengaluru through open satellite, weather and map data, read the cloud-native way, and then let a foundation model read the pixels for us. We start with the basics: what a satellite measures, who takes the pictures, and where to look at them.

About me

I'm Aman Bagrecha, a geospatial consultant working on remote sensing, computer vision and open-source tools. I write about maps, satellites and code at amanbagrecha.com, and I've spoken about open-source geospatial tools at FOSS4G in Kosovo, Seoul and Hiroshima. In Bengaluru I co-run Let's Talk Spatial, a community for anyone into GIS, remote sensing and maps: free meetups, talks and workshops.
Presenting at FOSS4G 2023
Presenting at FOSS4G 2023, Prizren, Kosovo
Let's Talk Spatial meetup group photo
Let's Talk Spatial #22, Takshashila Institution, May 2026

Earth Observation data

Earth-observation satellites measure what comes back from each patch of ground. Optical satellites (Sentinel-2, Landsat, Resourcesat) work like cameras: they record how much sunlight the ground reflects, in a handful of colours called bands, several of them invisible to us. Radar satellites (Sentinel-1, NISAR) bring their own light: they send microwave pulses and record the echo, so they see through clouds and at night.
Satellite From Pixel Passes every Since Measures
Sentinel-2 ESA, Europe's Copernicus programme 10 m 5 days 2015 13 bands, visible to shortwave infrared
Landsat 8 and 9 NASA and USGS 30 m 8 days 1972, for the series 11 bands, including heat
Sentinel-1 ESA 10 m 6–12 days 2014 radar, through clouds, day and night
Resourcesat-2 and 2A (LISS-III) ISRO 23.5 m 24 days each 2011 4 bands, green to shortwave infrared
All four are free to use. ISRO's newest, NISAR, built with NASA and launched from Sriharikota in July 2025, adds free radar at two wavelengths. Today we use Sentinel-2: small pixels, a new picture every few days, and the whole archive free on the cloud.

Light we can't see

Each Sentinel-2 band measures one slice of the spectrum. Here are ten of them over the lake, a cloud-free average of January to April 2025.
bands = datapack.sentinel2_bands()    # 10 bands x 500 x 700 pixels; a prepared file
wavelength = {                        # centre of each band, in nanometres
    "blue": 492, "green": 560, "red": 665,
    "red edge 1": 704, "red edge 2": 740, "red edge 3": 783,
    "near-infrared": 833, "narrow near-infrared": 865,
    "shortwave infrared 1": 1614, "shortwave infrared 2": 2202,
}
How this file was made · making it reads about 135 MB of Sentinel-2 from Earth Search, under a minute

The chart reads a small prepared file (3.6 MB): your copy in data/ if you have one, otherwise it downloads once. To make it yourself from the original data, run uv run cngeo datapack build --step bands --force. This is the code that runs:

def sentinel2_bands(year: int) -> np.ndarray:
    """Median of the clear Jan-Apr Sentinel-2 scenes (10 bands, reflectance), the no-model baseline."""
    import odc.stac
    from pystac_client import Client

    cache = _cache(f"sentinel2_bands_{year}.tif")
    if cache.exists():
        return _read(cache)
    items = Client.open(EARTH_SEARCH).search(collections=["sentinel-2-c1-l2a"], bbox=STUDY_LONLAT,
                                             datetime=f"{year}-01-01/{year}-04-30",
                                             query={"eo:cloud_cover": {"lt": 5}}).item_collection()
    items = [i for i in items if "43PGQ" in i.id]
    bands = S2_BANDS
    odc.stac.configure_rio(cloud_defaults=True)
    ds = odc.stac.load(items, bands=bands + ["scl"], crs=CRS, resolution=RES, x=(STUDY[0], STUDY[2]),
                       y=(STUDY[1], STUDY[3]), groupby="solar_day", chunks={}).compute()
    clear = ~ds.scl.isin([0, 1, 3, 8, 9, 10])
    med = np.stack([(ds[b].where(clear & (ds[b] > 0)) * 0.0001 - 0.1).median("time").values for b in bands]).astype("float32")
    med = med[:, ::-1] if ds.y[0] < ds.y[-1] else med
    write_cog(cache, med, nodata=np.nan)
    return med


def bands(force: bool = False):
    """Ten Sentinel-2 bands for the remote-sensing intro: the Jan-Apr 2025 median, reflectance x 10 000."""
    out = datapack.path("sentinel2_bands")
    if out.exists() and not force:
        return
    med = sentinel2_bands(2025)
    write_cog(out, (np.nan_to_num(med, nan=0) * 10000).clip(1, 65535).round().astype("uint16") * np.isfinite(med),
              nodata=0, bands=",".join(S2_BANDS))
Water absorbs almost all light beyond green, so it stays dark. Leaves reflect near-infrared strongly, so plants are bright in a colour our eyes can't see. Roofs, roads and bare ground reflect a lot everywhere, and most in the shortwave infrared. Those differences are what lets a computer tell one surface from another. Point at the middle of the lake: in places it reflects like a plant, because floating weeds cover the water.

False colour

To see near-infrared, show it as red, show red as green and green as blue. In this false-colour picture plants turn red, water goes nearly black and buildings look grey-blue. Move the line to compare it with true colour.
blue, green, red, nir = bands[0], bands[1], bands[2], bands[6]

true_colour = charts.stretch(np.dstack([red, green, blue]))
false_colour = charts.stretch(np.dstack([nir, red, green]))   # near-infrared as red
charts.swipe(false_colour, true_colour, title="Bellandur lake, early 2025",
             subtitle="left of the line: false colour · right: true colour")

Plaforms to explore dataset

  • Copernicus Browser: every Sentinel picture, any band combination, in a web page. Search for Bellandur and pick the "False color" preset.
  • Bhuvan: ISRO's map portal, with Indian satellite pictures and maps made from them. ISRO's data itself is downloaded from Bhoonidhi.
  • EarthExplorer: the Landsat archive, back to 1972.
A browser shows one place on one date at a time. To use nine years of pictures in a few lines of code we need catalogs, and files we can read a piece of. That's the first lesson.

Today

We find out what happened to Bellandur lake, one question at a time.
Time Lesson The question How we answer it
11:00 Welcome (this page) What does a satellite see? bands, false colour, where to look
11:25 Start here the lake's story, and a check that your setup works
11:35 1 · Satellite images What did the lake look like in 2017, and now? find Sentinel-2 pictures in a STAC catalog and read just the lake from Cloud-Optimized GeoTIFFs
12:10 2 · Weather grids How much rain fell the night the lake overflowed? read NASA's rain record from Zarr stores
12:35 3 · Watersheds and buildings What drains into the lake, and what was built around it? CoRE Stack watersheds and Overture buildings, from GeoParquet
13:00 lunch
14:00 4 · Pixels as vectors Can a model tell lake from road from rooftop, and find places like this anywhere on Earth? AlphaEarth and TESSERA embeddings
14:45 5 · Using embeddings What changed around the lake since 2017? groups, a few labels, and change between years
15:25 6 · Reading the catalog How do we get it all back? open our own catalog with pystac and read each file again
15:45 questions
16:00 close
By lunch you will know where satellite, weather and map data live, how they are stored, and how to read only the piece you need. After lunch you will use a foundation model's summary of every 10 m square to search, classify and compare places, here and across the planet. The same code works for any place: change the box.

Get set up

You need uv, which installs Python and every package for you. Windows. Open PowerShell (Start menu, type "PowerShell") and run these one at a time:
# 1. install uv, once. Then close PowerShell and open it again.
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

# 2. download the workshop and install its packages (no git needed)
irm https://github.com/amanbagrecha/catalogs-and-embeddings/archive/main.zip -OutFile workshop.zip
Expand-Archive workshop.zip -DestinationPath .
cd catalogs-and-embeddings-main
uv sync

# 3. open the notebooks in your browser
uv run marimo edit notebooks
macOS and Linux. In a terminal:
curl -LsSf https://astral.sh/uv/install.sh | sh     # once; then open a new terminal
git clone https://github.com/amanbagrecha/catalogs-and-embeddings
cd catalogs-and-embeddings
uv sync
uv run marimo edit notebooks
To come back later, open a terminal in the workshop folder and run uv run marimo edit notebooks again. There is no data to download first. The lessons read their data straight from the cloud, and the few small files we prepared in advance download themselves when a notebook needs them. In marimo, open Start here first: it checks that everything works.

Made with open data and open-source Python · marimo · Altair