GeoTessera
# Install AerEO and any required plugins for this notebook (Google Colab)
!pip install -q "aereo[viz]" aereo-search-tessera aereo-read-tessera
# Download config files and AOIs from the GitHub repository so this
# notebook can run outside the repo (e.g. Google Colab).
import os
import urllib.request
GITHUB_RAW = "https://raw.githubusercontent.com/frandorr/aereo/main"
os.makedirs("config/aoi", exist_ok=True)
# Config files
urllib.request.urlretrieve(
f"{GITHUB_RAW}/examples/config/job_tessera.yaml",
"config/job_tessera.yaml",
)
# AOI files
urllib.request.urlretrieve(
f"{GITHUB_RAW}/examples/config/aoi/oxford.geojson",
"config/aoi/oxford.geojson",
)
Config used in this notebook¶
This notebook loads the job from examples/config/job_tessera.yaml:
name: tessera_sample
grid_dist: 10_000
grid_cells_margin: 10
target_aoi: config/aoi/oxford.geojson
output_uri: /tmp/aereo_extraction
overwrite: false
search:
_target_: aereo.search_tessera.search_tessera
_partial_: true
collections:
geotessera: []
intersects: ${target_aoi}
start_datetime: "2025-01-01T00:00:00Z"
end_datetime: "2025-12-31T00:00:00Z"
tessera_version: v1.1
tessera_variant: cambridge
read:
_target_: aereo.read_tessera.read_tessera
_partial_: true
bands: [1,2,3]
reproject:
_target_: aereo.builtins.reproject_odc
_partial_: true
reproject_mode: grid
resolution: 10
write:
_target_: aereo.builtins.write.write_geotiff
from aereo.cache import TaskResultCache
from aereo.executors import LocalExecutor
from aereo.pipeline import ExtractionJob
job = ExtractionJob.load_from_config(
config_dir="config",
config_name="job_tessera",
)
assets = job.search()
tasks = job.build_tasks(assets)
artifacts = job.execute(
tasks,
executor=LocalExecutor(workers=-1, use_threads=True, cache=TaskResultCache()),
)
print(f"✓ Extracted {len(artifacts)} artifacts")
from aereo.viz import plot_artifact_patches
fig, ax = plot_artifact_patches(
artifacts, bands=[1, 2, 3], ds_factor=1, stretch="percentile", aoi=job.target_aoi
)