10#if !defined(GEOGRAPHICLIB_OSGB_HPP)
11#define GEOGRAPHICLIB_OSGB_HPP 1
41 static const char*
const letters_;
42 static const char*
const digits_;
44 static constexpr int base_ = 10;
45 static constexpr int tile_ = 100000;
46 static constexpr int tilelevel_ = 5;
47 static constexpr int tilegrid_ = 5;
48 static constexpr int tileoffx_ = 2 * tilegrid_;
49 static constexpr int tileoffy_ = 1 * tilegrid_;
50 static constexpr int minx_ = - tileoffx_ * tile_;
51 static constexpr int miny_ = - tileoffy_ * tile_;
52 static constexpr int maxx_ = (tilegrid_*tilegrid_ - tileoffx_) * tile_;
53 static constexpr int maxy_ = (tilegrid_*tilegrid_ - tileoffy_) * tile_;
55 static constexpr int maxprec_ = 5 + 6;
56 static real computenorthoffset();
57 static void CheckCoords(real x, real y);
74 real& x, real& y, real& gamma, real& k) {
75 OSGBTM().
Forward(OriginLongitude(), lat, lon, x, y, gamma, k);
77 y += computenorthoffset();
95 real& lat, real& lon, real& gamma, real& k) {
97 y -= computenorthoffset();
98 OSGBTM().
Reverse(OriginLongitude(), x, y, lat, lon, gamma, k);
104 static void Forward(real lat, real lon, real& x, real& y) {
106 Forward(lat, lon, x, y, gamma, k);
112 static void Reverse(real x, real y, real& lat, real& lon) {
114 Reverse(x, y, lat, lon, gamma, k);
146 static void GridReference(
real x,
real y,
int prec, std::string& gridref);
165 static void GridReference(
const std::string& gridref,
167 bool centerp =
true);
185 return pow(
real(10),
real(48401603 - 100000000) / 100000000)
198 {
return real(20923713 - 20853810) /
real(20923713); }
208 return pow(
real(10),
real(9998268 - 10000000) / 10000000);
Header for GeographicLib::Constants class.
#define GEOGRAPHICLIB_EXPORT
GeographicLib::Math::real real
Header for GeographicLib::TransverseMercator class.
Ordnance Survey grid system for Great Britain.
static void Forward(real lat, real lon, real &x, real &y)
static Math::real OriginLongitude()
static Math::real CentralScale()
static Math::real EquatorialRadius()
static Math::real FalseNorthing()
static void Forward(real lat, real lon, real &x, real &y, real &gamma, real &k)
static Math::real Flattening()
static Math::real FalseEasting()
static void Reverse(real x, real y, real &lat, real &lon)
static Math::real OriginLatitude()
static void Reverse(real x, real y, real &lat, real &lon, real &gamma, real &k)
Transverse Mercator projection.
void Reverse(real lon0, real x, real y, real &lat, real &lon, real &gamma, real &k) const
void Forward(real lon0, real lat, real lon, real &x, real &y, real &gamma, real &k) const
Namespace for GeographicLib.