showError
Overview
showError reads the geographic/Mercator dimensions from a reference .r4 mapsheet and scans one or more OMG HDCS .merged multibeam survey files to produce an 8-bit raster (<out_count.8bit>) counting the number of rejected/flagged beams (status != 0) that fall within each grid cell.
Syntax & CLI Options
showError [-low <val>] <ref_merc.r4> <out_count.8bit> <merged_files...>
| Flag / Argument | Description |
|---|---|
-low <val> | Optional minimum value parameter (parsed as float). |
<ref_merc.r4> | Reference .r4 mapsheet defining the Mercator (projection == 1, ellipsoid == 1) grid geometry. |
<out_count.8bit> | Output 8-bit raster file recording the per-cell count of flagged/rejected soundings (0..255). |
<merged_files...> | One or more OMG HDCS .merged multibeam files to scan. |
How It Works
- Reference Grid Initialization:
- Reads the
JHC_headerfrom<ref_merc.r4>and verifies that it uses a Mercator projection (projection == 1) on the WGS84 ellipsoid (ellipsoid == 1). - Allocates a zero-initialized
Dx * Dybyte buffer (bbuf) and setshead.data_type = 1(8-bit unsigned) withzmin = 0.0andzmax = 255.0.
- Reads the
- Flagged Sounding Accumulation:
- Loops through every supplied
.mergedfile (get_merged_summary,get_merged_Nav,read_merged_file,unpack_merged_record). - For every ping with valid navigation (
nav_status == 0) and valid soundings (beams_ok), inspects each beamj. - Whenever a beam is flagged as rejected (
beams[j].status != 0), projects its geographic position to Mercator(X, Y)grid indices viamercatand increments the corresponding cell (*(bbuf + Y * Dx + X) += 1).
- Loops through every supplied
- Output:
- Writes the updated
JHC_headerand 8-bit hit-count array to<out_count.8bit>.
- Writes the updated
Examples
Generate an 8-bit density map of rejected multibeam soundings across a survey sheet
showError sheet01.r4 sheet01_rejected_counts.8bit line01.merged line02.merged line03.merged
Workflow Context
- Upstream:
swathEd(interactive swath editor that sets beam rejection flags in.mergedfiles) andweigh_grid. - Downstream:
jview(to visualize spatial concentrations of noisy or over-edited beams).