Tutorial: MicaSense Local-H5 Workflow¶
This tutorial shows the supported path for local drone or MicaSense-style HDF5 exports. The workflow preserves drone-native provenance, discovers HDF5 files recursively, writes ENVI products, extracts polygon Parquet tables when a polygon layer is provided, and renders QA artifacts.
There is no dedicated spectralbridge-micasense-to-landsat CLI today. Use the
Python API shown here.
Inputs¶
Prepare a folder containing local HDF5 exports:
drone_h5_exports/
SPR1-06-28-23 ExportPackage/
*.h5
SPR2-06-28-23 ExportPackage/
*.h5
If you want polygon-level tables, also prepare a polygon layer supported by GeoPandas, such as GeoPackage or GeoJSON.
HDF5 contract¶
SpectralBridge treats the local HDF5 export as the authoritative drone input.
Reflectance and ancillary rasters are expected to already share the same
spatial orientation and (lines, columns) footprint. SpectralBridge validates
that contract during loading and correction, but it does not add TIFF
conversion logic or attempt to repair malformed upstream TIFF-to-HDF5 exports.
Run the drone pipeline¶
from spectralbridge import run_drone_pipeline
results = run_drone_pipeline(
input_h5_dir="drone_h5_exports",
polygon_path="Datasets/niwot_aop_polygons_2023_12_8_23_analysis_ready_half_diam.gpkg",
output_dir="drone_outputs",
apply_topo=True,
apply_brdf=True,
use_ndvi_brdf_bins=False,
apply_brightness_adjustment=False,
)
Set polygon_path=None when you only need ENVI and QA products.
Outputs¶
Each discovered flight gets its own output folder:
drone_outputs/
<flight_stem>/
<flight_stem>__working.h5
<flight_stem>__envi.img
<flight_stem>__envi.hdr
<flight_stem>__corrected.img
<flight_stem>__corrected.hdr
<flight_stem>__polygon_index.parquet
<flight_stem>__polygons.parquet
<flight_stem>__qa.png
<flight_stem>__qa.json
drone_merged.parquet
drone_qa_summary.json
Parquet remains the authoritative tabular output. CSV sidecars, when present in drone workflows, are convenience copies for external tools.
Inspect the run¶
from pathlib import Path
output_dir = Path("drone_outputs")
print(results["qa_summary_path"])
print(results["merged"])
for qa_png in output_dir.glob("*/*__qa.png"):
print(qa_png)
The QA JSON records whether requested topographic or BRDF corrections were applied, skipped because ancillary data were unavailable, or reverted because the corrected product failed quality checks.
Relation to Landsat harmonization¶
The local drone path does not invent NEON-style filenames and does not run the NEON download workflow. Landsat-style products for NEON flightlines are still generated by the standard sensor harmonization stage and use names such as:
*_landsat_tm_envi.img
*_landsat_oli_envi.img
*_micasense_envi.img
*_micasense_to_match_oli_oli2_envi.img
Those NEON outputs are documented in Outputs & file structure.