geeViz.outputLib.thumbs

Generate Earth Engine thumbnails with automatic visualization handling.

geeViz.outputLib.thumbs provides functions that mirror the auto-visualization logic in geeView and geeViz.outputLib.charts — detecting thematic vs. continuous data, reading *_class_values / *_class_palette image properties, and building appropriate viz params — so you can get publication-ready thumbnail URLs and embeddable HTML <img> tags without manual configuration.

Supports ee.Image (PNG) and ee.ImageCollection (animated GIF or filmstrip), with optional per-feature clipping for ee.FeatureCollection geometries.

Animated GIFs

For ee.ImageCollection inputs, generate_gif() creates properly mosaicked per-time-step frames, with optional date burn-in using system:time_start metadata.

Example:

import geeViz.geeView as gv
from geeViz.outputLib import thumbs as tl

ee = gv.ee
lcms = ee.ImageCollection("USFS/GTAC/LCMS/v2024-10")
area = ee.Geometry.Point([-111.8, 40.7]).buffer(10000)

url = tl.get_thumb_url(lcms.select(["Land_Cover"]).first(), area)
html = tl.embed_thumb(url, title="LCMS Land Cover")

# Animated GIF with date labels
gif_html = tl.generate_gif(
    lcms.select(["Land_Cover"]),
    area,
    burn_in_date=True,
    date_format="YYYY",
)

Functions

auto_viz(ee_obj[, band_name, geometry, ...])

Build visualization parameters automatically from image properties.

auto_viz_continuous(image, geometry[, ...])

Build visualization parameters for a continuous ee.Image by sampling the region.

download_thumb(url[, timeout])

Download raw image bytes from an Earth Engine thumbnail URL.

embed_thumb(url[, title, width, download])

Generate an embeddable HTML <figure> element for a thumbnail.

embed_thumb_grid(thumb_results[, columns, ...])

Generate an HTML CSS-grid layout of multiple thumbnails.

generate_filmstrip(ee_obj, geometry[, ...])

Generate a filmstrip grid image from an Earth Engine ImageCollection.

generate_gif(ee_obj, geometry[, viz_params, ...])

Generate an animated GIF from an Earth Engine ImageCollection.

generate_map_chart(ee_obj, geometry[, ...])

Generate a combined map + chart output.

generate_map_chart_gif(ee_obj, geometry[, ...])

Generate an animated GIF with map thumbnails and cumulative line charts.

generate_thumbs(ee_obj, geometry[, ...])

Generate a publication-ready thumbnail PNG for a report section.

get_animation_url(ee_obj[, geometry, ...])

Get an animated GIF thumbnail URL for an ee.ImageCollection.

get_filmstrip_url(ee_obj[, geometry, ...])

Get a filmstrip thumbnail URL — all frames side-by-side in one PNG.

get_thumb_url(ee_obj[, geometry, ...])

Get a PNG thumbnail URL for an Earth Engine image.

get_thumb_urls_by_feature(ee_obj, features)

Get thumbnail URLs for an image clipped to each feature in a collection.

get_thumb_urls_by_feature_parallel(ee_obj, ...)

Generate per-feature thumbnail URLs in parallel using a thread pool.

thumb_to_base64(url[, timeout])

Download a thumbnail and return it as a base64 data URI string.