Render geotagged acoustic measurements into north-up JPEG heatmaps. More...


Go to the source code of this file.
Data Structures | |
| struct | ear_heatmap_georef |
| Validated geographic placement metadata shared by heatmap consumers. More... | |
Macros | |
| #define | EAR_HEATMAP_NO_DATA_RED 18U |
| #define | EAR_HEATMAP_NO_DATA_GREEN 18U |
| #define | EAR_HEATMAP_NO_DATA_BLUE 24U |
Functions | |
| int | ear_heatmap_read_georef (const char *filename, struct ear_heatmap_georef *georef) |
| Read the georeference sidecar emitted by the heatmap renderer. | |
| int | ear_heatmap_write (const char *filename, const struct ear_sample *samples, size_t count, const struct ear_loudest_spot *spot) |
| Write a decorated north-up JPEG of relative measured acoustic intensity. | |
| int | ear_heatmap_write_field (const char *filename, const struct ear_sample *samples, size_t count, const struct ear_loudest_spot *spot) |
| Write the same field without track dots, source marker or scale bar. | |
Detailed Description
Render geotagged acoustic measurements into north-up JPEG heatmaps.
Definition in file ear_heatmap.h.
Macro Definition Documentation
◆ EAR_HEATMAP_NO_DATA_BLUE
| #define EAR_HEATMAP_NO_DATA_BLUE 24U |
Blue channel identifying uncovered field pixels.
Definition at line 31 of file ear_heatmap.h.
◆ EAR_HEATMAP_NO_DATA_GREEN
| #define EAR_HEATMAP_NO_DATA_GREEN 18U |
Green channel identifying uncovered field pixels.
Definition at line 30 of file ear_heatmap.h.
◆ EAR_HEATMAP_NO_DATA_RED
| #define EAR_HEATMAP_NO_DATA_RED 18U |
Red channel identifying uncovered field pixels.
Definition at line 29 of file ear_heatmap.h.
Function Documentation
◆ ear_heatmap_read_georef()
| int ear_heatmap_read_georef | ( | const char * | filename, |
| struct ear_heatmap_georef * | georef ) |
Read the georeference sidecar emitted by the heatmap renderer.
- Parameters
-
filename Path to the .geo sidecar. georef Receives validated dimensions, projection and optional spot.
- Returns
- 0 on success; -1 for invalid arguments, malformed data or I/O error.
Required dimensions, scale and edge/origin coordinates are validated before publication to the caller; partial parses never replace its struct. Duplicate fields, oversized lines and incomplete optional spot pairs fail.
Definition at line 642 of file ear_heatmap.c.
◆ ear_heatmap_write()
| int ear_heatmap_write | ( | const char * | filename, |
| const struct ear_sample * | samples, | ||
| size_t | count, | ||
| const struct ear_loudest_spot * | spot ) |
Write a decorated north-up JPEG of relative measured acoustic intensity.
- Parameters
-
filename Output path; an adjacent .geo sidecar is attempted after JPEG success. samples Borrowed, immutable geotagged windows; not retained after the call. count Window count; at least three usable finite, unclipped windows are required. spot Optional borrowed estimate; only valid estimates receive a marker.
- Returns
- 0 for a successfully written JPEG, -1 for insufficient data or file/codec failure.
Track dots, an estimated-source marker and a scale bar aid interpretation. Calls serialize on bounded shared scratch storage. Grid cells are roughly AGL/4; bilinear upsampling adds visual smoothness, not measurement resolution.
- Warning
- Sidecar write failure does not change the return status. Neither the smoothed field nor the marker demonstrates localization accuracy or alarm presence.
Definition at line 574 of file ear_heatmap.c.
◆ ear_heatmap_write_field()
| int ear_heatmap_write_field | ( | const char * | filename, |
| const struct ear_sample * | samples, | ||
| size_t | count, | ||
| const struct ear_loudest_spot * | spot ) |
Write the same field without track dots, source marker or scale bar.
- Parameters
-
filename JPEG path; a best-effort .geo sidecar supplies overlay placement. samples Borrowed immutable acoustic windows. count Number of supplied windows, with the same usable-data gate as ear_heatmap_write(). spot Optional estimate retained in sidecar metadata, not drawn into pixels.
- Returns
- 0 for JPEG success, -1 for insufficient usable data or file/codec failure.
Use the same interpolation and shared workspace as the decorated renderer, keeping annotation pixels out of the field used for overlays.
- See also
- ear_heatmap_write for locking, resolution and sidecar-status caveats.
Definition at line 580 of file ear_heatmap.c.