Skip to content

CBGB Benchmarks

CBGB (Cloud-Based Geospatial Benchmarks) is a suite of 43 benchmark problems from Cardille et al. (2025) converted to folia.yaml workspaces. Each problem has a known ground-truth answer, enabling automated validation that the platform produces correct results.

The full benchmark suite lives at workspaces/cbgb/ in the main repository.

Purpose

CBGB validates that folia can:

  1. Express real-world geospatial analyses declaratively in YAML
  2. Execute those analyses and produce correct results
  3. Scale from simple vector queries to multi-year satellite compositing

The cbgb: Block

Each benchmark workspace includes a cbgb: metadata block:

FieldTypeRequiredDescription
problem_idstringYesCanonical problem ID (e.g., FRC_1, EBA_A1.2_A1a)
difficultystringYeseasy, intermediate, or difficult
ground_truthnumberYesExpected answer value
unitsstringYesUnits of the answer (e.g., hectares, NDVI)
tolerance_pctnumberYesAcceptable deviation from ground truth (%)
sourcestringYesCitation for the benchmark
yaml
cbgb:
  problem_id: "FRC_1"
  difficulty: easy
  ground_truth: 3084127.799
  units: hectares
  tolerance_pct: 5
  source: "Cardille et al. (2025)"

Problem Categories

CategoryCountDescriptionExample Problems
Vector-only queries9Attribute filtering, area calculation, spatial intersection, lengthFRC_1, FRC_2, FRC_3, FRC_5, FRC_8, FRC_9
Single-scene band math7Fetch one scene, compute band ratio, extract at pointEBD_F2.0_C1, EBA_F2.0_A1, EBA_F3.1_A1
Small-area raster analysis6Zonal stats, slope, or water occurrence over small AOIFRC_10, FRC_11, FRC_12, EBA_F5.2_A2
Temporal point extraction3Multi-scene value at single pixel, compositing/regressionEBD_F4.1_C2, EBD_F4.6_C1, EBD_F4.2_C1
Pre-computed global COGs3Hansen GFC or similar, zonal stats over parksEBA_F5.1_A1, EBA_F5.1_A2, EBD_F5.1_C1
Annual/multi-year compositing6Large-area temporal compositing (cloud-required)EBD_F4.1_C1, EBD_F4.3_C1, EBD_F4.4_C2
Classification / ML5RF, SVM, KMeans training + classificationEBA_A1.2_A1a, EBD_F2.1_C1, EBD_F2.2_C2
Multi-sensor regression2Cross-sensor calibration + regressionEBD_F3.0_C1, EBD_F3.0_C2
Metadata-only1STAC catalog query countingEBA_F1.3_A3
Pure math1Combinatorial calculation, no geodataFRC_13

Difficulty Distribution

DifficultyCountClient-RunnableCloud-Required
Easy15141
Intermediate17107
Difficult1165
Total4330 (70%)13 (30%)

Example: FRC_1 - Watershed Area Calculation

yaml
name: cbgb-frc-1
version: "1.0"
description: >
  CBGB Benchmark FRC_1 (Easy): Calculate the area of the HUC04
  watershed with code '0707'. Expected: 3,084,127.799 hectares.

settings:
  default_crs: EPSG:4326

cbgb:
  problem_id: "FRC_1"
  difficulty: easy
  ground_truth: 3084127.799
  units: hectares
  tolerance_pct: 5
  source: "Cardille et al. (2025)"

layers:

  source/watersheds:
    uri: gee://USGS/WBD/2017/HUC04
    type: vector
    description: USGS WBD HUC04 level boundaries

  compute/watershed-0707:
    type: vector
    description: HUC04 polygon for code '0707'
    compute:
      op: tabular_filter
      inputs:
        table: { layer: source/watersheds }
      params:
        expression: "huc4 == '0707'"

  result/area:
    type: table
    description: Area of watershed 0707 in hectares
    compute:
      op: vector_area
      inputs:
        features: { layer: compute/watershed-0707 }
      params:
        units: hectares
    style:
      table:
        columns:
          - { field: area_hectares, label: "Area (hectares)", format: ",.3f" }

  compute/watershed-explorer:
    type: vector
    description: Explore any HUC04 watershed by code
    compute:
      op: tabular_filter
      inputs:
        table: { layer: source/watersheds }
      params:
        expression: "huc4 == '0707'"
    style:
      form:
        fields:
          - name: huc_code
            type: text
            default: "0707"
            label: "HUC4 Code"
            description: Enter a 4-digit HUC code to calculate watershed area.

Running Benchmarks

bash
trk bench ls              # list all benchmarks with status
trk bench run FRC_1       # run a specific benchmark
trk bench status          # show latest pass/fail for all benchmarks

A benchmark passes if the computed result is within tolerance_pct of ground_truth.

Reference

  • Cardille, J. A., et al. (2025). Cloud-Based Remote Sensing with Google Earth Engine.
  • Full workspace library: workspaces/cbgb/ (43 problems)
  • Client vs. cloud analysis: workspaces/cbgb/CLIENT_VS_CLOUD.md

Licensed under CC-BY-4.0