sidescanpy.processing.georeferencing#

Per-sample georeferencing: compute latitude_per_sample and longitude_per_sample from per-ping nav, heading, and the platform-frame offsets (across_track_m, along_track_m) attached by compute_geometric_ranges.

Uses pyproj.Geod for geodetic forward calculations on a specified ellipsoid (WGS84 by default). Vectorized over the entire (ping, channel, sample) array via a single Geod.fwd call.

Bearing convention: compass heading (north = 0, increasing clockwise). Per-sample bearing is heading + atan2(across_track, along_track).

NaN propagation:
  • Any NaN per-ping latitude, longitude, or heading → all samples for that ping are NaN.

  • Any NaN per-sample across_track or along_track → that sample is NaN.

processing_history is appended with a "georef" record.

2026 rshomberg@uri.edu

Contents

compute_georeferencing

Compute per-sample latitude and longitude.

sidescanpy.processing.georeferencing.compute_georeferencing(ds, *, ellipsoid='WGS84')#

Compute per-sample latitude and longitude.

Parameters:
dsxr.Dataset or SideScanSurvey

Validated sidescan dataset with across_track_m and along_track_m already attached (from compute_geometric_ranges). A SideScanSurvey is corrected frequency by frequency with the same arguments; a new survey is returned and the input is not modified.

ellipsoidstr, default “WGS84”

Ellipsoid name passed to pyproj.Geod. Other common values: "GRS80", "clrk66", "intl". Most users want WGS84.

Returns:
xr.Dataset or SideScanSurvey

Same type as ds: a new dataset (input not modified) with two added per-sample data variables:

  • latitude_per_sample (float64, degrees_north)

  • longitude_per_sample (float64, degrees_east)

A "georef" processing_history record is appended.

Raises:
ValueError

If across_track_m or along_track_m are not in the dataset (run compute_geometric_ranges first).