CLI Reference¶
geotessera reads, exports, and displays Tessera embeddings.
The default dataset is v1.1-dclimate, read as Zarr over direct AWS HTTPS.
geotessera info lists the direct URLs.
Synopsis¶
geotessera [GLOBAL OPTIONS] COMMAND [OPTIONS]
geotessera COMMAND --help
Global options¶
--via-gatewayOpt into the Source Cooperative proxy at
data.source.coopfor public mirror Zarr reads. Direct AWS HTTPS is the default. Place this flag before the command name:geotessera --via-gateway download --bbox 0.05,52.15,0.20,52.25 --output tiles
Alternatively, set the environment variable for the command and its worker processes:
GEOTESSERA_VIA_GATEWAY=1 geotessera download --bbox 0.05,52.15,0.20,52.25 --output tiles
Omit the flag and unset the variable (or set it to
0) to use direct AWS reads again. The option works with either the gateway URL or the direct AWS HTTPS URL shown byinfo. Both routes read the same objects anonymously and share the same cache. Icechunk and unrelated stores are unaffected.
Commands¶
download¶
geotessera download [OPTIONS] --output DIRECTORY
Export a region as GeoTIFF files or download individual embedding tiles. Specify one region selector from Region selection.
--source auto|zarr|tilesSelect the data source. The default,
auto, uses Zarr for TIFF output and individual tiles for NPY output or--registry-dir. Zarr supports TIFF output only. Tiles are deprecated and will be removed.-o, --output DIRECTORYWrite files to this directory. This option is required unless
--dry-runis set.-f, --format tiff|npySelect the output format. The default is
tiff. NPY downloads contain quantized embeddings, scale arrays, and landmask GeoTIFFs. NPY is deprecated and will be removed.--year INTEGERSelect the embedding year. The default is 2024.
--bands LISTSelect comma-separated, zero-based embedding bands in the given order. The default is all bands at the selected depth. This option applies to TIFF output.
--depth INTEGERRead a published matryoshka prefix from Zarr. The default is the full embedding. Band indices refer to the selected prefix. A store without the requested depth reports an error.
--compress TEXTSet the GeoTIFF compression method. The default is
lzw.--dry-runRead metadata and report the size without downloading embeddings. Zarr mode reports uncompressed output bytes. NPY mode totals the source embedding, scale, and landmask file sizes. Tile TIFF mode estimates output size from the source metadata. Compressed GeoTIFF sizes and Zarr transfer sizes depend on the data and chunk layout.
--list-filesList individual tile output files with their sizes. Zarr exports always print the output paths.
-v, --verbosePrint additional tile download details.
Dataset, store, and cache options are described in Dataset and storage options.
Output and repeated runs¶
Zarr exports write tessera_YEAR_utmNN.tif for each intersecting UTM zone.
Each file contains dequantized float32 values on the native grid, with NaN
nodata, band descriptions, and source metadata. Output windows enclose the
requested bounds within the available zone grid. Large outputs use BigTIFF
when needed.
Each destination is replaced only after the new Zarr export file is complete. Rerunning repeats the export, including zones completed before a failure. Use a separate output directory for each region.
Individual tile downloads use the
global_0.1_degree_representation/YEAR/grid_LON_LAT/ layout. NPY scale
files accompany the embedding arrays, and landmasks are stored under
global_0.1_degree_tiff_all/.
Both sources record the dataset version and variant in the output
directory’s tessera_metadata.json, and GeoTIFFs also record them in
their TESSERA_DATASET_VERSION and TESSERA_DATASET_VARIANT tags.
Downloading into a directory that holds another dataset is an error. A
store given by --store-url that is not a published dataset is not
recorded or checked.
Tile downloads skip existing files. Rerun the same command to continue an interrupted download. Use a new output directory when changing the exported bands, since existing tiles are reused by filename.
Examples¶
Export three embedding bands from Zarr:
geotessera download --bbox '-3.0,53.4,-2.9,53.5' \
--year 2024 --bands 0,1,2 --output region/
Export from a local Zarr store:
geotessera download --store-url /data/tessera.zarr \
--bbox '-3.0,53.4,-2.9,53.5' --year 2024 --output region/
Estimate an export from a published prefix:
geotessera download --dataset-version v2 --depth 16 \
--bbox '-3.0,53.4,-2.9,53.5' --year 2024 --dry-run
Download an individual v1.1 tile, which exists only for the cambridge
variant, as GeoTIFF or raw NPY files:
geotessera download --source tiles --dataset-variant cambridge \
--tile '0.17,52.23' --output tiles/
geotessera download --format npy --dataset-variant cambridge \
--tile '0.17,52.23' --output arrays/
visualize¶
geotessera visualize INPUT_PATH OUTPUT_FILE [OPTIONS]
Create a PCA mosaic from a GeoTIFF file or a directory of GeoTIFF or NPY tiles. NPY input must include its scale arrays and landmask GeoTIFFs.
The command fits one PCA model to a reproducible sample of up to 100,000 valid pixels across the inputs. It applies the same model and color scale to every input and processes the rasters in windows. Pixels with missing values remain masked. Colors may differ from earlier releases that fitted PCA separately for each tile or used every pixel.
The output contains the first three components as a display-scaled uint8 RGB image, or fewer bands if fewer components are requested. Additional components contribute to the variance metadata but are not written to the mosaic. Use the original embeddings for analysis.
--n-components INTEGERSet the number of PCA components to fit. The default is 3. The count must not exceed the number of input bands or valid sampled pixels.
--crs TEXTSet the output coordinate reference system. The default is
EPSG:3857.--balance histogram|percentile|adaptiveSet the color scaling method. The default,
histogram, equalizes the sampled distribution.percentileclips to the selected percentiles.adaptiveuses the sampled mean and standard deviation.--percentile-low FLOAT,--percentile-high FLOATSet the lower and upper bounds for percentile scaling. The defaults are 2 and 98. Use these options with
--balance percentile.
Create a PCA image and display it as a web map:
geotessera visualize region/ pca.tif
geotessera webmap pca.tif --output map/ --serve
webmap¶
geotessera webmap [RGB_MOSAIC] [OPTIONS]
Create web tiles and viewer.html from a three-band RGB GeoTIFF.
Omit RGB_MOSAIC and specify one region selector to read directly from
Zarr. Region mode maps three embedding bands to RGB using a common min/max
scale across the region. Use visualize first to create a PCA map.
Tile generation requires the GDAL command-line tools on PATH. The map
uses Web Mercator (EPSG:3857). Serve the output directory over HTTP to
view the map.
-o, --output DIRECTORYWrite the viewer, tiles, and intermediate rasters to this directory. The default is
tessera_webmapfor a region, orRGB_MOSAIC_STEM_webmapfor a local image.--bands LISTSelect exactly three comma-separated, zero-based embedding bands for a Zarr region. The default is
0,1,2.--year INTEGER,--depth INTEGERSelect the year and published embedding prefix for a Zarr region. The defaults are 2024 and the full embedding.
--region-file PATH_OR_URLRead a vector boundary and overlay it on the map. In region mode, this also selects the bounding box to stream. With
RGB_MOSAIC, it adds an overlay without changing the image extent.--min-zoom INTEGER,--max-zoom INTEGERSet the range of zoom levels to generate, inclusive. The defaults are 8 and 15. Values must satisfy
0 <= min <= max <= 24.--initial-zoom INTEGERSet the viewer’s initial zoom level. The default is 10.
--force/--no-forceRegenerate the streamed RGB mosaic and web tiles. The default is
--no-force. Use--forcewhen data changes at the same store URL.--serve/--no-serveStart the web server and open a browser after generating the map. The default is
--no-serve. With--serve, an occupied port causes an error before processing starts.-p, --port INTEGERSet the web server port. The default is 8000.
--use-gdal-raster/--use-gdal2tilesSelect the GDAL tile generator. The default is
--use-gdal2tiles.--use-gdal-rasterrequires a GDAL installation withgdal raster tile.
Region mode also accepts the options in Region selection and
Dataset and storage options, except --registry-dir.
Repeated runs¶
Matching completed RGB mosaics and tiles are reused. Changing the zoom range rebuilds tiles without reading the embeddings again. Interrupted tile generation restarts from the completed RGB mosaic; interrupted RGB generation reads the region again.
Keep the output directory and its JSON completion files to retain this behavior. The Zarr read cache does not replace the completed map output. The viewer uses relative tile paths, so the directory can be moved or served from another location.
Create a map directly from a region:
geotessera webmap --bbox '-3.0,53.4,-2.9,53.5' \
--year 2024 --bands 0,1,2 --output map/ --serve
Rebuild the tiles at a different zoom range:
geotessera webmap --bbox '-3.0,53.4,-2.9,53.5' \
--year 2024 --bands 0,1,2 --output map/ --min-zoom 6 --max-zoom 16
serve¶
geotessera serve DIRECTORY [OPTIONS]
Serve all files in DIRECTORY over HTTP. This command displays an
existing web map without regenerating it. An occupied port causes an
error. Press Ctrl+C to stop the server.
-p, --port INTEGERSet the listening port. The default is 8000.
--open/--no-openOpen the viewer in a browser. The default is
--open.--html PATHSelect an HTML file relative to
DIRECTORY. If omitted, the server looks forindex.html,viewer.html,map.html, thencoverage.html.
Serve an existing map on a different port:
geotessera serve map/ --port 8001 --html viewer.html
coverage¶
geotessera coverage [OPTIONS]
Show embedding availability as a PNG map, JSON coverage files, and an HTML globe. Region selectors limit the PNG map and outline vector boundaries; the globe shows global coverage.
-o, --output PATHSet the PNG filename or output directory. The default is
tessera_coverage.png. Supporting JSON files, textures, andglobe.htmlare written alongside the PNG.--year INTEGERShow coverage for one year. If omitted, show all available years.
--by-sourceShow each dataset version and variant in a separate color, with selectable layers in the globe. Omitted version and variant options select all datasets with NPY tiles in this mode. Otherwise the default is
v1.1and its default variant.--tile-color TEXTSet the tile color when year-based colors are disabled. The default is
red.--tile-alpha FLOATSet tile opacity from 0 to 1. The default is 0.6.
--tile-size FLOATSet the tile size multiplier. The default is 1.0.
--width INTEGERSet the PNG width in pixels. The default is 2000.
--no-countriesHide country boundaries.
--no-multi-year-colorsDisable the default year-based colors. These colors show tiles with all years in green, only the latest year in blue, and other year combinations in orange.
-v, --verbosePrint additional coverage details.
This command accepts Region selection and the dataset and manifest
options in Dataset and storage options. It does not accept --store-url.
For a dataset published as Icechunk, such as the default, the PNG map is drawn from the store’s tile registry, one rectangle per 2048-pixel tile, and no globe is written.
Inspect coverage for a region or compare datasets:
geotessera coverage --country 'United Kingdom' --year 2024
geotessera coverage --by-source --output coverage/
info¶
geotessera info [OPTIONS]
Show every dataset version and variant, the formats each is published in
(NPY, Zarr, Icechunk) and its store URLs, followed by a summary of the
selected dataset. A * marks each version’s default variant.
--tiles PATHInspect a local GeoTIFF or NPY file or directory. Report the files, years, bounds, coordinate reference systems, and band counts.
--geotiffs PATHUse the deprecated alias for
--tiles.--dataset-version TEXT,--dataset-variant TEXTSelect the dataset to summarise. The defaults are
v1.1and that version’s default variant.-v, --verboseInclude individual tile details, tile counts per year, and the incomplete zone-years of an Icechunk store.
Inspect exported files:
geotessera info --tiles region/ --verbose
version¶
geotessera version
Print the installed GeoTessera version.
Region selection¶
--bbox WEST,SOUTH,EAST,NORTHSelect WGS84 longitude and latitude bounds. A two-coordinate value,
LON,LAT, selects the containing 0.1-degree tile.--tile LON,LATSelect the 0.1-degree tile containing a WGS84 point.
--region-file PATH_OR_URLRead a vector region from a local file or URL. GeoJSON, Shapefile, and GeoPackage are supported. The input must declare its CRS.
--country TEXTSelect a country by name or code, such as
United KingdomorGB.
download and region-based webmap require exactly one selector.
coverage permits no selector to show the world. Zarr exports use the
bounding box of a country or vector region; they do not clip to its polygon.
West must be less than east. Split regions crossing the antimeridian into
two requests.
Dataset and storage options¶
--dataset-version TEXTSelect a dataset version, such as
v1,v1.1, orv2. The default isv1.1. Rungeotessera infoto list known datasets.--dataset-variant TEXTSelect a variant within the version. If omitted, use the version’s default variant. If that variant is not published in the requested format, use the first variant that is, with a warning: v1.1 NPY tiles exist only for
cambridge. Variants are separate inference runs; embeddings of different versions or variants cannot be interchanged.--store-url URL_OR_PATHRead a Zarr store from this URL or local path. This overrides the store selected by the dataset options. Use it with Zarr downloads or region-based web maps.
--cache-dir DIRECTORYSet the read cache directory. Zarr metadata persists between runs, while byte-range reads of sharded embeddings are cached within the process. Tile workflows cache manifests here and write embedding files to
--output.--registry-dir DIRECTORYRead
manifest.parquetandlandmasks.parquetfrom this directory. This option applies to tile downloads and coverage. It selects tiles whendownload --source autois used and conflicts with an explicit--source zarr.
Exit status¶
Commands return zero on success and a nonzero status for invalid arguments or processing failures. An incomplete NPY download returns a nonzero status. Files completed before a failure may remain in the output directory.
See also¶
Zarr Quick Start describes the Python streaming API.
Quick Start Guide describes individual tile downloads.
Data Repository Maintenance describes geotessera-registry for data maintainers.