Offline Processing
Data Pipeline Scripts.
While the Mission Portal handles real-time IDW rendering, OMEGA also provides a suite of offline Python scripts for generating publishable scientific assets directly from raw CSV exports.
csv_to_png_depth_contours.py: Generates high-resolution, static 2D heatmaps with distinct topological contour lines using matplotlib. These static PNGs are designed for inclusion in formal academic papers.
csv_to_kmz_depth_overlay.py: Takes the interpolated depth arrays and projects them over satellite imagery, packaging the result into a compressed KMZ file. This allows marine biologists to drag-and-drop the 3D bathymetric overlay directly into Google Earth Pro for geospatial fusion with historical coral reef datasets.
scripts/csv_to_png_depth_contours.py
import numpy as np
import matplotlib.pyplot as plt
def build_grid(points, grid_size, power):
lats = np.array([p["lat"] for p in points], dtype=float)
lons = np.array([p["lon"] for p in points], dtype=float)
depths = np.array([p["depth_m"] for p in points], dtype=float)
lon_min, lon_max = lons.min(), lons.max()
lat_min, lat_max = lats.min(), lats.max()
# Generate the empty raster meshgrid
xi_vals = np.linspace(lon_min, lon_max, grid_size)
yi_vals = np.linspace(lat_min, lat_max, grid_size)
xi, yi = np.meshgrid(xi_vals, yi_vals)
# Execute IDW Math
zi = idw_interpolation(lons, lats, depths, xi, yi, power=power)
return lons, lats, depths, xi, yi, zi, lon_min, lon_max, lat_min, lat_max
def render_contours(xi, yi, zi, lons, lats, levels=12, output_path="map.png"):
plt.figure(figsize=(9, 7))
# Render the base color heatmap
filled = plt.contourf(xi, yi, zi, levels=levels)
# Overlay crisp contour lines on top of the heatmap
plt.contour(xi, yi, zi, levels=levels)
plt.colorbar(filled, label="Depth (m)")
# Scatter plot the actual raw sonar ping locations
# to show where the interpolation occurred
plt.scatter(lons, lats, s=6.0)
plt.xlabel("Longitude")
plt.ylabel("Latitude")
plt.title("Bathymetric Contour Map")
plt.tight_layout()
plt.savefig(output_path, dpi=300)
plt.close()
bathymetry-sounding.example.json{
"spec": "omega-wave.observation-envelope/1",
"message_id": "bathymetry-example-0001",
"message_type": "observation",
"origin": {
"node_id": "urn:omega-wave:node:survey-a:vessel-01",
"device_id": "multibeam-sonar-main",
"capability_ref": "https://example.invalid/omega-wave/things/survey-a-vessel-01-multibeam.td.json",
"firmware_version": "0.2.0"
},
"routing": {
"priority": "normal",
"ttl_s": 86400,
"ack_mode": "gateway",
"max_hops": 8
},
"sample": {
"sampled_at": "2026-04-18T19:00:00Z",
"sequence": 1,
"location": {
"lat": 36.801,
"lon": -121.79
}
},
"tags": {
"site": "survey-a",
"platform": "survey-vessel",
"medium": "water",
"station_name": "Survey Vessel 01"
},
"payload": {
"mode": "senml",
"content_type": "application/senml+json",
"schema_ref": "urn:ietf:rfc:8428",
"records": [
{
"bn": "urn:omega-wave:thing:survey-a:vessel-01:multibeam/",
"bt": 1776548400
},
{
"n": "bathymetry-depth",
"u": "m",
"v": 12.4
}
]
}
}