selectcb
Overview
selectcb extracts, spatially/temporally filters, and optionally Mercator-projects bathymetric soundings from University of Rhode Island (URI) SeaBeam 19-beam binary records (sb_urirec) or 3-column ASCII sounding files.
Syntax & CLI Options
selectcb [-v] [-just_dump] [-justfilt] [-ascii] [-skip <N>] [-lola] <outfilename> <infilename(s)...>
| Flag | Description |
|---|---|
-v | Verbose progress logging. |
-just_dump | Bypass interactive area/time prompts and dump all valid SeaBeam soundings (depth > 0) as lon lat depth. |
-justfilt | Filter soundings by the interactive geographic/time bounds, but output unprojected lat lon depth instead of Mercator x y depth. |
-ascii | Read 3-column ASCII input (lat lon depth by default) instead of binary URI SeaBeam records. |
-lola | When used with -ascii, interpret the first two input columns as lon lat instead of lat lon. |
-skip <N> | Subsample every N-th ping/record (default: 1, process every record). |
<outfilename> | Output ASCII file. |
<infilename(s)...> | One or more input URI SeaBeam binary or ASCII sounding files. |
How It Works
- Interactive Area & Time Window Selection (
get_area):- Unless
-just_dumpis specified, promptsstdininteractively for:- Geographic bounding box (
bottom_lat,top_lat,left_lon,right_lonin decimal degrees) and Mercator reference latitude (proj_lat). - Whether to filter by time (
y/n), and if so, start and end times (year julian_day hour minute).
- Geographic bounding box (
- Unless
- URI SeaBeam Decoding (
process_cb_data):- Reads 100-byte
sb_urirecrecords (containing date/time, heading, center lat/lon, and 19 depth + cross-track distance pairs). - For each valid beam (
depth[i] > 0), resolves the beam’s true geographic position from the vessel heading and cross-track offsetxtrack[i], tests against the bounding box, and writes either Mercatorx y depth(mercat), geographiclat lon depth(-justfilt), orlon lat depth(-just_dump).
- Reads 100-byte
- ASCII Filtering (
process_ascii_data):- With
-ascii, reads 3-column text lines, swaps columns if-lolais set, filters against the bounding box, and writes Mercatorx y depthor unprojectedlat lon depth(-justfilt).
- With
Examples
Dump all valid beams from URI SeaBeam files to ASCII lon lat depth
selectcb -just_dump seabeam_all.xyz cruise91_01.cb cruise91_02.cb
Interactively filter and Mercator-project an ASCII lon lat depth file
selectcb -ascii -lola region_merc.xyz raw_soundings.xyz
Workflow Context
- Downstream:
weigh_grid,surface. - Related Tools:
project,dump_merged.