10 #if !defined(GEOGRAPHICLIB_OSGB_HPP)
11 #define GEOGRAPHICLIB_OSGB_HPP 1
18 # pragma warning (push)
19 # pragma warning (disable: 4251)
22 namespace GeographicLib {
47 static const std::string letters_;
48 static const std::string digits_;
50 static real northoffset_;
57 tileoffx_ = 2 * tilegrid_,
58 tileoffy_ = 1 * tilegrid_,
59 minx_ = - tileoffx_ * tile_,
60 miny_ = - tileoffy_ * tile_,
61 maxx_ = (tilegrid_*tilegrid_ - tileoffx_) * tile_,
62 maxy_ = (tilegrid_*tilegrid_ - tileoffy_) * tile_,
66 static real computenorthoffset()
throw();
67 static void CheckCoords(real x, real y);
85 real& x, real& y, real& gamma, real& k)
throw() {
86 OSGBTM_.Forward(OriginLongitude(), lat, lon, x, y, gamma, k);
88 y += computenorthoffset();
106 real& lat, real& lon, real& gamma, real& k)
throw() {
108 y -= computenorthoffset();
109 OSGBTM_.Reverse(OriginLongitude(), x, y, lat, lon, gamma, k);
115 static void Forward(real lat, real lon, real& x, real& y)
throw() {
117 Forward(lat, lon, x, y, gamma, k);
123 static void Reverse(real x, real y, real& lat, real& lon)
throw() {
125 Reverse(x, y, lat, lon, gamma, k);
155 static void GridReference(
real x,
real y,
int prec, std::string& gridref);
171 static void GridReference(
const std::string& gridref,
173 bool centerp =
true);
187 {
return real(20923713) * std::pow(
real(10),
real(0.48401603L) - 1); }
198 {
return real(20923713 - 20853810) /
real(20923713); }
205 static Math::real InverseFlattening() throw() {
return 1/Flattening(); }
215 {
return std::pow(
real(10),
real(9998268 - 10000000) /
real(10000000)); }
243 #if defined(_MSC_VER)
244 # pragma warning (pop)
247 #endif // GEOGRAPHICLIB_OSGB_HPP
static void Forward(real lat, real lon, real &x, real &y, real &gamma, real &k)
#define GEOGRAPHICLIB_EXPORT
GeographicLib::Math::real real
static Math::real Flattening()
static Math::real FalseEasting()
static Math::real OriginLatitude()
Transverse Mercator projection.
Header for GeographicLib::TransverseMercator class.
static Math::real CentralScale()
static Math::real FalseNorthing()
static Math::real OriginLongitude()
static Math::real MajorRadius()
static void Reverse(real x, real y, real &lat, real &lon, real &gamma, real &k)
Ordnance Survey grid system for Great Britain.
Header for GeographicLib::Constants class.
static void Forward(real lat, real lon, real &x, real &y)
static void Reverse(real x, real y, real &lat, real &lon)