-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Summary
Add persistence for GeoMapSheet draft tiles so that accumulated real-time CUBE data survives between sessions. Currently, GeoMapSheet is entirely in-memory — if the process or vehicle restarts mid-survey, all accumulated CUBE data is lost.
Motivation
During a survey, the real-time CUBE algorithm accumulates depth estimates in GeoMapSheet grids organized by GGGS tiles. This data serves collision avoidance, coverage monitoring, and planning. Losing it on restart means:
- Coverage gaps until the area is re-surveyed
- Loss of accumulated uncertainty reduction from multiple passes
- Navigation operating without recent depth data in already-surveyed areas
The bag_to_geotiff utility already demonstrates serializing GeoMapSheet to GeoTIFF via GDAL. The persistence mechanism can build on this pattern, but needs to work incrementally (save dirty tiles as they update) rather than as a batch export at the end.
Proposed Approach
Save
- Track which GGGS grid tiles have been modified since last save (dirty flag per
GridIndex) - Periodically write dirty tiles to disk
- Each tile stored as an individual file (keyed by level/row/column) for incremental updates
- Format options: GeoTIFF per tile (GDAL already a dependency), or a simpler binary format with a GGGS cell array
Load
- On startup, scan the persistence directory and load existing tiles into
GeoMapSheet - Tiles loaded as draft data — they'll be superseded if/when processed grids are imported into the bathymetric store
File Organization
- Directory structure based on GGGS hierarchy:
<level>/<row>/<column>.tiff(or similar) - A manifest file tracking tile versions and timestamps for sync purposes
Integration with Bathymetric Store
The planned bathymetric store (rolker/unh_marine_autonomy#86) will consume CUBE's draft tiles. Two integration approaches:
- Store reads CUBE's persisted files directly — the store knows where CUBE saves tiles and imports them
- CUBE publishes to the store via ROS interface — CUBE pushes new/updated tiles to the store, which handles its own persistence
Either way, CUBE-level persistence ensures data survives restarts independent of the store.
Scope
- Add save/load capability to
GeoMapSheet(or a wrapper) - Track dirty tiles for incremental persistence
- Configurable persistence directory and save interval
- Data format that preserves depth, uncertainty, and per-cell metadata
Related Issues
- rolker/unh_marine_autonomy#86 — Persistent multi-source bathymetric data store (consumer of persisted draft tiles)
Authored-By: Claude Code Agent
Model: Claude Opus 4.6