FireSTARR
Loading...
Searching...
No Matches
UTM.h
1/* Copyright (c) Queen's Printer for Ontario, 2020. */
2/* Copyright (c) His Majesty the King in Right of Canada as represented by the Minister of Natural Resources, 2025. */
3
4/* SPDX-License-Identifier: AGPL-3.0-or-later */
5
6#pragma once
7
8#include <proj.h>
9#include "stdafx.h"
10#include "Util.h"
11namespace fs::topo
12{
13class Point;
19[[nodiscard]] constexpr MathSize meridian_to_zone(const MathSize meridian) noexcept
20{
21 return (meridian + 183.0) / 6.0;
22}
28[[nodiscard]] constexpr MathSize utm_central_meridian(const MathSize zone) noexcept
29{
30 return -183.0 + zone * 6.0;
31}
32void from_lat_long(
33 const string& proj4,
34 const fs::topo::Point& point,
35 MathSize* x,
36 MathSize* y);
37fs::topo::Point to_lat_long(
38 const string& proj4,
39 const MathSize x,
40 const MathSize y);
41string&& try_fix_meridian(string&& proj4);
42}
A geographic location in lat/long coordinates.
Definition Point.h:13