Skip to content

Latest commit

 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GeoTessera examples

Tessera publishes a 128-dimensional embedding for every 10m pixel of land, for every year since 2017. These examples show how to read and use them with GeoTessera.

Setup

Every script declares its dependencies in a PEP 723 header, so uv is a handy tool.

Quickstart

This is a very basic way to get started with some numbers.

uv run quickstart.py

This reads one pixel's embedding straight from the public store. Pass --lon/--lat for a place you know, and --version "v2" for the v2 beta model.

Where next

You want to... Go to
Understand the embeddings and how to work with them teaching/
Classify a region from your own labelled points classify/
Detect a feature over a large region solarpanel/
Make a false-colour map pumap-viz/

teaching/ is a five-step guided tour. It starts by classifying land cover around a point, and renders the result as PNG and SVG. It then reads the store with plain xarray/zarr to show what the geotessera library does for you. It then demonstrates the v2 store's 16-dimension matryoshka prefixes for faster 'sketch' analyses.

classify/ converts a GeoJSON of labelled points into a classified GeoTIFF. It streams from the zarr store, or via downloaded tiles for offline reuse. It has a helper to grab labels from OpenStreetMap.

solarpanel/ trains a solar-panel detector from a handful of labelled points, then streams a 58km region through it. This is a good pattern for inference over regions larger than memory.

pumap-viz/ projects the 128-bands to RGB with a parametric UMAP for a false-colour view of any region or country. This is for artwork purposes!

Concepts

  • GeoTesseraZarr streams from the public zarr store and is the way most examples work. GeoTessera downloads tiles to disk first, for offline reuse.
  • Embeddings stay on their native 10m UTM grid where possible to avoid skew. Classify first and then reproject only the result.
  • Embedding releases sit side by side in the store, so every pipeline takes a --version-style flag and trialling a new model is a one-flag change.
  • geotessera reports progress on long reads through the standard logging module rather than progress bars. Each script turns the geotessera logger up to INFO so those lines show; there are no progress= flags to pass.
  • Zarr-reading scripts pass cache_dir="tessera-cache" so store metadata persists across runs and chunk data is cached for the session (rereads within a run are free). The cache directory is keyed per store version and safe to delete at any time.

About

Some example code for GeoTessera

Resources

Stars

10 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages