Illustrated C/C++ source sheets, symbol index, API relationship graph, compiler console and debug trace

LIVE AI / FLEXIBLE SENSING / FLIGHT CONTEXT

Sensoraia API

Live AI and sensing, connected to the flight.
See, listen, inspect and return supported results while airborne.

Loading...
Searching...
No Matches
pangea_survey::MapWriter Class Reference

Create the georeferencing files paired with a rendered map image. More...

#include <map_writer.h>

Static Public Member Functions

static std::array< fs::path, 2 > mapFiles (const fs::path &path)
 Return the two sidecar paths associated with a map image.
static void writeMap (const fs::path &path, const pangea_survey::MapTile &map, int width, int height, bool orthorectified=false)
 Publish a world file and GIS projection metadata for one map image.

Static Private Member Functions

static void writeMetadata (const fs::path &path, const std::string &text)
 Write and publish one complete georeferencing sidecar.

Detailed Description

Create the georeferencing files paired with a rendered map image.

This writer owns only the .jgw and .aux.xml sidecars; JPEG encoding and publication are handled separately. The sidecars describe the requested grid, not surveyed ground truth, and are not a claim of orthorectified relief.

Definition at line 41 of file map_writer.h.

Member Function Documentation

◆ mapFiles()

std::array< fs::path, 2 > pangea_survey::MapWriter::mapFiles ( const fs::path & path)
inlinestatic

Return the two sidecar paths associated with a map image.

Parameters
[in]pathImage path whose extension is replaced for the world file.
Returns
World-file path followed by the PAM XML path.

Definition at line 74 of file map_writer.h.

◆ writeMap()

void pangea_survey::MapWriter::writeMap ( const fs::path & path,
const pangea_survey::MapTile & map,
int width,
int height,
bool orthorectified = false )
inlinestatic

Publish a world file and GIS projection metadata for one map image.

Parameters
[in]pathDestination image path used to derive both sidecar names.
[in]mapProjected map centre, pixel size, heading, and EPSG code.
[in]widthImage width in pixels; used to place the grid origin.
[in]heightImage height in pixels; used to place the grid origin.
[in]orthorectifiedWhether the PAM metadata may describe surface correction; false deliberately labels the output as reference-plane only.
Exceptions
std::runtime_errorIf either sidecar already exists or cannot be written. If the second file fails, the first is removed to avoid leaving a misleading half-pair.

The world-file origin is the upper-left pixel centre. The PAM GeoTransform starts at the upper-left pixel corner, as required by GDAL; these values differ by half a pixel by design.

Definition at line 96 of file map_writer.h.

◆ writeMetadata()

void pangea_survey::MapWriter::writeMetadata ( const fs::path & path,
const std::string & text )
inlinestaticprivate

Write and publish one complete georeferencing sidecar.

Parameters
pathFinal sidecar path in the caller's working directory.
textSerialized world-file or XML content.
Exceptions
std::runtime_errorOn an existing path or write/publication failure.

Stage under a sibling name before renaming. The caller coordinates exclusive access and any cleanup of the sidecar pair.

Definition at line 48 of file map_writer.h.


The documentation for this class was generated from the following file: