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()
|
inlinestatic |
Return the two sidecar paths associated with a map image.
- Parameters
-
[in] path Image 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()
|
inlinestatic |
Publish a world file and GIS projection metadata for one map image.
- Parameters
-
[in] path Destination image path used to derive both sidecar names. [in] map Projected map centre, pixel size, heading, and EPSG code. [in] width Image width in pixels; used to place the grid origin. [in] height Image height in pixels; used to place the grid origin. [in] orthorectified Whether the PAM metadata may describe surface correction; false deliberately labels the output as reference-plane only.
- Exceptions
-
std::runtime_error If 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()
|
inlinestaticprivate |
Write and publish one complete georeferencing sidecar.
- Parameters
-
path Final sidecar path in the caller's working directory. text Serialized world-file or XML content.
- Exceptions
-
std::runtime_error On 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:
- modules/pangea/map_writer.h