Jonathan Capone Technical Portfolio
OMEGA sections How It Works Research Context Data
How It Works chaptersOverviewSensingValidationMapping

How It Works / Mapping

Mapping, interpolation, and geospatial output

How OMEGA turns survey points into maps.

OMEGA does not map every reading it logs. After validation, accepted points are written into a mapping file and used to build bathymetric views, interpolated surfaces, contours, and geographic overlays.

This page focuses on the logic of that step: what the mapping file contains, how inverse distance weighting works, and how the same survey can produce different outputs depending on what kind of surface or visualization you need.

Back to How It Works Previous: Validation Research Context Data
Mapping file

The mapping CSV keeps the measurement context attached.

Every accepted point in OMEGA carries more than a latitude, longitude, and depth. The map file preserves the surrounding measurement conditions so the survey can be inspected later instead of being reduced to anonymous coordinates.

Representative fields
point_index,date_utc,time_utc,lat,lng,depth_m,temp_c,
satellites,hdop,speed_kmph,fix_age_ms,pitch_deg,roll_deg,imu_accuracy
Why this matters

A good map depends on how the point was collected. Satellite count, HDOP, fix age, speed, and orientation all help explain why a point was accepted.

Interpretation

Accepted points are already filtered points.

By the time a record reaches the mapping CSV, it has already passed the logging rules for position quality, motion, timing, and depth validity. The mapping stage is not starting from raw noise. It is starting from a deliberately screened set of measurements.

That separation matters because surface generation is sensitive to bad points. Interpolation can make weak data look deceptively smooth. OMEGA reduces that risk by treating validation as part of mapping, not as an afterthought.

Surface estimation

Inverse distance weighting estimates the surface between measured points.

OMEGA’s interpolation step creates a regular grid over the surveyed footprint and estimates the depth at each cell. Nearby measurements carry more influence than distant ones, which makes the resulting surface follow the sampled geometry without pretending to know more than the survey supports.

From google_earth_overlay.py
def idw_interpolation(x, y, z, xi, yi, power=2.0, epsilon=1e-12):
    zi = np.zeros_like(xi, dtype=float)

    for row in range(xi.shape[0]):
        for col in range(xi.shape[1]):
            dx = x - xi[row, col]
            dy = y - yi[row, col]
            dist = np.sqrt(dx * dx + dy * dy)

            if np.any(dist < epsilon):
                zi[row, col] = z[np.argmin(dist)]
                continue

            weights = 1.0 / np.power(dist, power)
            zi[row, col] = np.sum(weights * z) / np.sum(weights)

    return zi
What the code is doing

For each grid cell, the script measures the distance to every accepted point, converts those distances into weights, and computes a weighted average depth. Close points dominate. Distant points still matter, but less.

Grid setup
def build_grid(points, grid_size, power):
    lats = np.array([p["lat"] for p in points], dtype=float)
    lons = np.array([p["lng"] 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()

    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)
    zi = idw_interpolation(lons, lats, depths, xi, yi, power=power)

    return zi, lon_min, lon_max, lat_min, lat_max
How the parameters matter

grid_size changes output density, while power changes how quickly influence falls off with distance. Higher power makes the surface cling more tightly to nearby points; lower power produces a smoother and broader estimate.

Reading the surface

The interpolated map is an estimate, not a direct measurement.

Interpolation is useful because it helps reveal overall underwater form, but it does not replace soundings. The generated surface depends on point spacing, survey coverage, and the assumptions built into the interpolation method.

Coverage

Gaps stay meaningful

If the survey misses an area, the surface can only infer it from surrounding points. Dense and even coverage produces more trustworthy structure.

Sensitivity

Bad inputs travel

A weak point can influence the surrounding estimate. That is why the validation stage matters so much before mapping begins.

Interpretation

Maps are analytical views

The surface is a way of reading the survey. It helps compare shape, slope, and relative depth, but it should still be interpreted as a model built from samples.

Outputs

One survey can produce several different map products.

OMEGA’s Python scripts use the same accepted mapping dataset to build multiple views. Each output highlights the survey in a different way.

Script Output Use
depth_map.py Point plot Shows accepted survey points directly without surface modeling.
interpolated_map.py Interpolated depth map Builds a continuous estimated surface from accepted points.
contour_map.py Contour map Turns the interpolated surface into lines that emphasize shape and slope.
csv_to_kml.py KML point export Places survey points in geospatial viewers such as Google Earth.
google_earth_overlay.py KMZ overlay Places a rasterized surface over its geographic footprint for spatial comparison.