← Back to blog

An Open-Source Tool for Watching Lakes from Space

I built lake-area-gee, a free tool that measures the surface area of any lake or reservoir from public satellite imagery. Here is what it reveals about one of the world's great salt lakes.

Lake Urmia, in northwest Iran, was once one of the largest salt lakes on Earth — in wet years it spread over 7,000 square kilometers, an area larger than the U.S. state of Delaware. Over the last three decades it has lost most of its water to upstream dams, irrigation, and drought. It is a slow-motion environmental crisis, and it is big enough to watch from orbit. I wanted to answer a simple question: how well can an individual measure this, using only free, publicly available satellite images? So I built an open-source tool — lake-area-gee — to find out. The answer: remarkably well. Everything you see below is its output.

The idea

Two families of Earth-observation satellites photograph every spot on the planet, week in and week out, and give the images away for free: Landsat (run by NASA and the U.S. Geological Survey, taking pictures since 1984) and Sentinel-2 (run by the European Space Agency, since 2015). Their cameras record not just visible light but also invisible colors, like infrared — and that is the trick. Water is one of the few surfaces on Earth that reflects green light but swallows infrared almost completely. Land does the opposite.

So for every pixel in an image, you compute a simple score from the green and infrared measurements — the standard version is called the Modified Normalized Difference Water Index (MNDWI). Water pixels score high, land pixels score low. Pick a cutoff between the two, count the pixels above it, multiply by the ground area each pixel covers, and you have the lake's surface area on that date. Repeat for every date since 1984 and you have the lake's history.

The images add up to terabytes, but a platform called Google Earth Engine stores the entire archive and lets you run the math on Google's computers for free (for research and non-commercial use). Only the final numbers come back to your laptop, so the whole 42-year record computes in minutes, without downloading a single image.

Satellite photo of Lake Urmia, July 2020
Lake Urmia as the satellite sees it — July 2020, Sentinel-2.
Computed water map for the same scene
The water map lake-area-gee computes from the same image: 4,686 square kilometers.

What 42 years look like

Surface-area history of Lake Urmia, 1984 to 2026, from Landsat and Sentinel-2
Top: the full Landsat record, one point per season. Bottom: recent years measured by both satellite families independently — in summer they agree to within a fraction of a percent.

The trajectory is stark. Through the mid-1990s the lake regularly exceeded 7,000 square kilometers. By the early 2020s a typical summer footprint was under 4,000. Along the way the record captures a brief recovery around 2019–2020 (after wet winters and restoration releases), a new low in 2023–2025, and a partial rebound after the wet 2025–26 winter. The zigzag riding on top of the long trend is not noise — it is the lake breathing with the seasons: spring snowmelt from the surrounding mountains fills it, and summer evaporation draws it back down.

Comparing like with like — the same month (July), the same satellite family (Landsat), sparse years excluded — puts numbers on it. The July record peaks in 1995 at 7,705 square kilometers and bottoms out in 2025 at 3,292: a 57% loss. Over the two decades of steady decline (1995–2015), the lake shrank by about 190 square kilometers per year — half a square kilometer every day, for twenty years. Put another way: the average July lake of 1994–1999 was 6,672 square kilometers; the average of 2020–2025 is 3,876 — a 42% smaller lake within one generation.

Monthly surface-area measurements, 2017 to 2026
Month-by-month measurements from Sentinel-2 (2017–2026) resolve that seasonal breathing in detail.

What can go wrong (and how to be honest about it)

A number without its caveats is a trap. Measuring a lake from space has a few, and they are worth understanding because they apply to almost any satellite-based measurement you will ever read about:

Every number in these charts came from imagery anyone can access for free, processed with free tools. Environmental monitoring at this scale used to require an agency budget; now it requires curiosity and a free Google Earth Engine account.

Use it for your lake

Nothing here is specific to Lake Urmia — the same physics works for any lake, reservoir, or dam on Earth, and that is the point of lake-area-gee. Point it at a different water body by giving it the corner coordinates of a rectangle around it, pick a satellite and a date range, and it produces the same charts, uncertainty ranges, and quality-check images you see here. The math at its core is automatically tested, every caveat above is documented in the repository's method notes, and the README walks through setup from zero. If you use it for a water body you care about, I would love to hear about it.