OmniEarth v1.6.0

OmniEarth Technical Manual & User Guide

A step-by-step, in-depth guide covering core geospatial concepts, CLI options, Python/TypeScript SDK methods, and modality-specific architectures. Designed for both first-time GIS novices and experienced remote sensing engineers.

1. Fundamentals and Core Concepts

Earth observation (EO) data traditionally requires registering for multiple government portals (Copernicus SciHub/Dataspace, NASA Earthdata, USGS EarthExplorer, DLR EOC, Open-Meteo), writing custom download scripts, and translating inconsistent coordinate formats.

OmniEarth unifies 14 planetary data layers under a single standardized interface across both Python and TypeScript with native parallel chunked downloading and zero mandatory API keys for open-access tiers.

Instant Installation

Python (uv or pip): pip install omniearth
Node.js (pnpm or npm): npm install omniearth (or run instantly with npx omniearth)

Spatial Coordinates: Bounding Box vs Point vs GeoJSON

OmniEarth supports three universal ways to define an Area of Interest (AOI):

Format CLI Argument Example Value Description
Bounding Box --bbox --bbox 77.1 28.5 77.3 28.7 Standard WGS84 rectangular envelope: min_lon min_lat max_lon max_lat. Always use longitude first, then latitude.
Point with Radius --point --point 77.209 28.614 10.0 A center coordinate: lon lat [radius_km]. OmniEarth automatically converts this into an accurate bounding box around the point.
GeoJSON Polygon --geojson --geojson farm.geojson Path to a .geojson file (or inline JSON). Automatically parses FeatureCollection, Polygon, or MultiPolygon geometries and extracts bounds.
Coordinate Order Warning (Lon / Lat)

Standard GIS / GeoJSON formats specify Longitude (X, Easting) first and Latitude (Y, Northing) second. In India, for example, New Delhi is approximately 77.209° Longitude, 28.614° Latitude. Always pass 77.209 28.614, not the reverse!

Satellite Orbits & Sensor Acquisition Types

Understanding why some searches return hundreds of scenes while others return only a few:

Continuous Systematic Mapping Sentinel-2 / Landsat

Multispectral optical and SAR satellites (like Copernicus Sentinel-2 and Sentinel-1) have wide swaths (290 km) and orbit continuously. They image the entire land surface of Earth systematically every 5 to 10 days. A search over a 1-year window will typically yield 50 to 70 scenes.

Targeted Hyperspectral Tasking EnMAP / EMIT

Hyperspectral satellites capture hundreds of contiguous spectral bands (200–280+ bands) across a narrow swath (30–80 km). Because transmitting and storing hundreds of bands requires massive bandwidth, sensors like DLR EnMAP and NASA EMIT are tasked: they point and acquire imagery only when requested by research or commercial proposals. A search over any given field might only yield 2 to 5 acquisitions per year.

Continuous Grid Reanalysis Weather / Atmosphere / Soil

Numerical weather models (ECMWF IFS, GFS), air quality assimilation (CAMS, Sentinel-5P), and SoilGrids do not have swath gaps; they represent continuous spatial grids available 24/7/365 at hourly or daily time-steps.

Optical Processing Levels: Surface Reflectance (SR) vs Top-of-Atmosphere (TOA)

When querying optical imagery (Sentinel-2 or Landsat), OmniEarth provides the --level parameter (or level="sr"|"toa"):

Level Underlying Collection When to Use Bands Available
SR / BOA (Default) sentinel-2-l2a Vegetation monitoring, agriculture, soil indices, land use classification. Atmosphere scattering has been removed. B01–B08, B8A, B11, B12, visual RGB, Scene Classification (SCL). Note: Band 10 (Cirrus) is omitted in L2A.
TOA sentinel-2-l1c Water quality, coastal & lake limnology, high-altitude cirrus cloud detection, deep learning foundation model pre-training. B01–B12, including Band 10 (Cirrus - 1375 nm), coastal aerosol, visual RGB, and raw top-of-atmosphere reflectances.

Universal Chronological Ordering (Newest Acquisitions First)

A core architectural principle in OmniEarth v1.3.0 is guaranteed chronological descending order across all 14 data modalities, satellites, providers, and search interfaces (CLI, Python SDK, Node.js SDK, and REST).

Whenever you run search() or omniearth search, the returned scene list is strictly sorted so that the most recent acquisitions appear at the top (index 0).

  • Remote STAC Sortby: OmniEarth injects "sortby": [{"field": "properties.datetime", "direction": "desc"}] directly into upstream STAC payloads (e.g. AWS Earth Search, NASA CMR STAC, Copernicus Data Space), ensuring the remote server sorts and slices before applying the limit quota.
  • Multi-Provider Unified Merging: In multi-mission categories like Hyperspectral (which queries German DLR EnMAP and NASA EMIT), OmniEarth queries each underlying archive, aggregates the matching scenes, and performs a unified chronological sort descending. Newest scenes from any agency always rank first.
  • Strict Year Scoping: Passing --year 2026 (or year=2026) automatically bounds the datetime window to 2026-01-01T00:00:00Z through 2026-12-31T23:59:59Z, preventing bleed into older historical years.
  • Ascending Time Series: When extracting temporal trends via timeseries or get_time_series(), observations are returned in chronological ascending order (oldest to newest) specifically designed for sequential plotting and trend analysis.

omniearth download

Download scenes or specific assets directly with parallel multipart chunking, byte-range resumption, and space-agency checksum validation.

# Download by exact product ID
omniearth download --category optical --id S2B_43RFM_20261022_0_L2A --asset visual

# Find latest scene in bbox and download specific band
omniearth download --category optical --bbox 77.1 28.5 77.3 28.7 --asset red -o ./my_data

# Download raw .SAFE archive from CDSE with space-agency checksum verification
omniearth download --category optical --id "" --provider cdse --format safe --verify-checksum

# Download only RGB 10m bands from CDSE without downloading full 1.1 GB ZIP archive
omniearth download --category optical --id "" --provider cdse --bands rgb -o ./rgb_bands

# Download bands and generate on-the-fly True Color GeoTIFF composite
omniearth download --category optical --id "" --provider cdse --bands rgb --composite rgb -o ./composites

# Download all 13 assets of a hyperspectral scene concurrently
omniearth download --category hyperspectral --id ENMAP01-____L2A-DT0000174819_... --all --threads 6

# Interactive asset selector prompt (lists asset keys, formats, sizes to pick from)
omniearth download --category hyperspectral --id EMIT_L2A_RFL_001_20260819T071612_2623105_035 -i

# Download scene files into dedicated scene subdirectory (//...)
omniearth download --category optical --id S2A_32TPT_20260315_0_L2A --all --folder

# Download scene assets and compress into a single .zip archive
omniearth download --category elevation --id Copernicus_DSM_COG_10_N20_00_E078_00_DEM --zip
Flag Type Default Description
--id String None Exact scene/product ID or comma-separated list of IDs from a previous search.
--asset String visual / data Specific asset key to download (e.g. visual, red, cirrus, swir, dem, map).
--provider String None Explicit data provider backend (e.g. cdse, aws, dlr_enmap, nasa_lpdaac).
--format String cog Output format preference (cog for Cloud-Optimized GeoTIFF, safe for raw full product archives).
--bands String None Comma-separated band names or preset name (rgb, ndvi, tci, vnir, 10m, 20m, swir, vh, vv, dual, all).
--verify-checksum Flag False Verifies downloaded file integrity against official space agency MD5 or SHA-256 checksums before finalizing.
--composite String None Generates on-the-fly multiband GeoTIFF composite from downloaded bands (rgb, cir, or ndvi).
--outdir, -o String ./omniearth_downloads Destination directory on disk where downloaded files are saved.
--all Flag False Downloads every single asset associated with the scene in parallel.
-i, --interactive Flag False Interactively inspects available assets and prompts to select an asset or download all.
--folder Flag False Isolates downloaded scene assets into a dedicated scene folder (<outdir>/<scene_id>/).
--zip Flag False Packages downloaded scene files directly into a compressed <scene_id>.zip archive.
--threads, -t Integer 4 Number of parallel worker threads for chunked multipart downloading.
--no-resume Flag False Disables HTTP byte-range resumption and starts downloads from byte 0.
--no-multipart Flag False Disables parallel range chunking and downloads via a single HTTP stream.

Copernicus Data Space Ecosystem (CDSE) & Smart Downloader Capabilities

OmniEarth natively integrates official CDSE OData and STAC services for Sentinel-1, 2, 3, and 5P, offering both full raw .SAFE.zip packages and selective band extraction:

Raw Product Archives (.SAFE.zip)

Download full sovereign European Space Agency (ESA) product archives directly with byte-range HTTP resume, atomic staging, and MD5/SHA-256 cryptographic verification.

Selective Band Extraction (/Nodes)

Recursively traverses the CDSE OData /Nodes virtual hierarchy to stream only requested bands (e.g. B02, B03, B04) without pulling down 1+ GB ZIP archives.

Band Presets

Built-in presets for rapid analysis: rgb, ndvi, tci, vnir, 10m, 20m, swir for Sentinel-2; vh, vv, dual for Sentinel-1.

Automated GeoTIFF Compositing

Synthesizes True Color RGB, False Color Infrared (CIR), and float32 NDVI GeoTIFFs immediately upon band download completion.

omniearth compute

Sensor-agnostic radiometric and biophysical index engine. Accepts single scalar reflectances or JSON arrays.

# Compute NDVI on scalar values
omniearth compute --index ndvi --nir 0.82 --red 0.18

# Compute Soil-Adjusted Vegetation Index (SAVI) with L factor
omniearth compute --index savi --nir 0.75 --red 0.22 --l-factor 0.5

# Compute Bare Soil Index (BSI) on array of pixels and save summary JSON
omniearth compute --index bsi --nir "[0.4, 0.5]" --red "[0.3, 0.25]" --blue "[0.1, 0.15]" --swir "[0.55, 0.6]" --outpath bsi_stats.json
Index Name Formula Required Bands
ndvi Normalized Difference Vegetation Index (NIR - Red) / (NIR + Red) --nir, --red
ndwi Normalized Difference Water Index (McFeeters) (Green - NIR) / (Green + NIR) --green, --nir
ndre Normalized Difference Red Edge (NIR - RedEdge) / (NIR + RedEdge) --nir, --rededge
evi Enhanced Vegetation Index 2.5 * (NIR - Red) / (NIR + 6*Red - 7.5*Blue + 1) --nir, --red, --blue
nbr Normalized Burn Ratio (NIR - SWIR) / (NIR + SWIR) --nir, --swir
savi Soil-Adjusted Vegetation Index (1 + L) * (NIR - Red) / (NIR + Red + L) --nir, --red, --l-factor
msavi Modified Soil-Adjusted Vegetation Index (2*NIR + 1 - sqrt((2*NIR + 1)^2 - 8*(NIR - Red))) / 2 --nir, --red
bsi Bare Soil Index ((SWIR + Red) - (NIR + Blue)) / ((SWIR + Red) + (NIR + Blue)) --nir, --red, --blue, --swir
mndwi Modified Normalized Difference Water Index (Green - SWIR) / (Green + SWIR) --green, --swir

3. Python and TypeScript SDK Guide

Python SDK Architecture & Fluent Chaining

from omniearth import OmniEarth, Category, AOI

client = OmniEarth()

# 1. Search optical imagery with Top-of-Atmosphere (L1C)
results = client.search(
    category=Category.OPTICAL,
    bbox=[77.1, 28.5, 77.3, 28.7],
    year=2026,
    level="toa",
    max_cloud_cover=20.0,
    limit=5
)

# 2. Export footprints directly to GeoJSON or CSV
results.export_geojson("./footprints.geojson")
results.export_csv("./footprints.csv")

# 3. Fluent chaining: download top scene or all scenes
latest_scene = results.first()
if latest_scene:
    downloaded_path = latest_scene.download(asset_key="visual", outdir="./imagery")

# 4. Copernicus CDSE: Raw SAFE archive or Selective Band Extraction with compositing
cdse_file = client.download(
    id="",
    provider="cdse",
    bands="rgb",
    composite="rgb",      # Synthesizes True Color GeoTIFF composite
    verify_checksum=True, # Validates space-agency cryptographic hash
    outdir="./cdse_data"
)

Node.js & TypeScript SDK

import { OmniEarth, Category } from "omniearth";

const client = new OmniEarth();

// 1. Search with fluent SearchResults chaining
const results = await client.search({
  category: Category.OPTICAL,
  bbox: [77.1, 28.5, 77.3, 28.7],
  maxCloudCover: 15,
  limit: 5
});

// 2. Export spatial footprints directly
await results.exportGeoJSON("./footprints.geojson");
await results.exportCSV("./footprints.csv");

// 3. Selective band download & GeoTIFF compositing from CDSE
const compositePath = await client.download({
  id: "",
  provider: "cdse",
  bands: "rgb",
  composite: "rgb",
  verifyChecksum: true,
  outdir: "./composites"
});

GeoJSON Polygon Containment (Ray Casting)

OmniEarth includes built-in polygon ray-casting containment tests with zero external C/C++ dependencies (no GDAL or GEOS installation required):

from omniearth.models import AOI

# Load field boundary polygon from GeoJSON
aoi = AOI.from_geojson("sugarcane_field.geojson")

# Test whether a GPS coordinate is inside the boundary
is_inside = aoi.contains(lon=80.208, lat=27.875)
print(f"Point inside polygon boundary: {is_inside}")

4. Modality-by-Modality Reference Guide

1. Optical Multispectral Imagery (optical)

High-resolution 10m to 30m multispectral imagery from Copernicus Sentinel-2 (L2A Surface Reflectance & L1C Top-of-Atmosphere) and USGS Landsat 8/9.

  • Bands Available: Coastal (B01), Blue (B02), Green (B03), Red (B04), Red Edge (B05, B06, B07), NIR (B08, B8A), Water Vapor (B09), Cirrus (B10 in TOA), SWIR (B11, B12), and Visual RGB.
  • CLI Command:
    omniearth search --category optical --bbox 77.1 28.5 77.3 28.7 --year 2026 --max-cloud 10.0

3. Hyperspectral Data Cubes (hyperspectral)

Continuous contiguous spectra with 200+ narrow spectral bands (380 nm to 2500 nm) from DLR EnMAP (224 bands) and NASA EMIT (285 bands on the ISS).

Understanding Hyperspectral Asset Structure

When searching EnMAP, the primary image cube is split into two spectrometer files:
• vnir: Visible and Near-Infrared spectrometer (420 nm – 1000 nm, 30m resolution COG)
• swir: Shortwave Infrared spectrometer (900 nm – 2450 nm, 30m resolution COG)
• quality_classes: Pixel-level land/water/cloud classification mask

# Search and filter strictly by year
omniearth search --category hyperspectral --geojson field.geojson --year 2026

# Download only the VNIR spectrometer cube
omniearth download --category hyperspectral --id ENMAP01-____L2A-... --asset vnir

7. Agro-Weather & ET0 Evapotranspiration (weather)

Global high-resolution numerical reanalysis and forecast profiles from ECMWF IFS and GFS via Open-Meteo with zero mandatory API key.

  • Physical & Agricultural Variables: temperature_2m, relative_humidity_2m, precipitation, et0_fao_evapotranspiration (FAO-56 reference crop evapotranspiration), vapour_pressure_deficit (VPD), shortwave_radiation_sum, dew_point_2m, surface_pressure, wind_speed_10m.
  • CLI Command:
    omniearth search --category weather --point 77.209 28.614 --variables temperature_2m,et0_fao_evapotranspiration,vapour_pressure_deficit

5. Frequently Asked Questions & Troubleshooting

Why did my search return only 2 or 5 results?

1. Default Limit: The CLI defaults to --limit 5. Pass --limit 25 or higher if you want to inspect dozens of historical scenes.
2. Hyperspectral Tasking: Sensors like EnMAP and EMIT have a narrow 30 km swath and are targeted on-demand. Unlike Sentinel-2 which maps the entire globe continuously every 5 days, a specific 10 km field might only be acquired 2 to 5 times per year.

Why were older scenes appearing before?

When no date filter is passed, STAC APIs return the most recent available scenes in their catalog. If a field had acquisitions in 2026, 2024, and 2023, passing --year 2026 ensures OmniEarth constrains the search window strictly to 2026-01-01 through 2026-12-31.

How do I download just the visual PNG/GeoTIFF?

Full satellite products often exceed 1 GB because they contain 13 raw 16-bit raster bands. Pass --asset visual to download only the pre-rendered True Color RGB GeoTIFF, saving over 90% in bandwidth and download time.