dotnet/NETGeographicLib/Georef.cpp
Go to the documentation of this file.
1 
11 #include "stdafx.h"
12 #include "GeographicLib/Georef.hpp"
13 #include "Georef.h"
14 #include "NETGeographicLib.h"
15 
16 using namespace NETGeographicLib;
17 
18 //*****************************************************************************
19 void Georef::Forward(double lat, double lon, int prec, System::String^% georef)
20 {
21  try
22  {
23  std::string l;
24  GeographicLib::Georef::Forward( lat, lon, prec, l );
25  georef = gcnew System::String( l.c_str() );
26  }
27  catch ( const std::exception& xcpt )
28  {
29  throw gcnew GeographicErr( xcpt.what() );
30  }
31 }
32 
33 //*****************************************************************************
34 void Georef::Reverse( System::String^ georef, double% lat, double% lon,
35  int% prec, bool centerp)
36 {
37  try
38  {
39  double llat, llon;
40  int lprec;
42  llat, llon, lprec, centerp );
43  lat = llat;
44  lon = llon;
45  prec = lprec;
46  }
47  catch ( const std::exception& err )
48  {
49  throw gcnew GeographicErr( err.what() );
50  }
51 }
52 
53 //*****************************************************************************
54 double Georef::Resolution(int prec) { return GeographicLib::Georef::Resolution(prec); }
55 
56 //*****************************************************************************
static void Reverse(System::String^georef, [System::Runtime::InteropServices::Out] double%lat, [System::Runtime::InteropServices::Out] double%lon, [System::Runtime::InteropServices::Out] int%prec, bool centerp)
Header for GeographicLib::Georef class.
static Math::real Resolution(int prec)
Definition: Georef.hpp:121
Header for NETGeographicLib::NETGeographicLib objects.
static const double lat
Exception class for NETGeographicLib.
Header for NETGeographicLib::Georef class.
static std::string ManagedToUnmanaged(System::String^s)
static void Forward(double lat, double lon, int prec, [System::Runtime::InteropServices::Out] System::String^%georef)
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
static const Line3 l(Rot3(), 1, 1)
static void Forward(real lat, real lon, int prec, std::string &georef)
Definition: src/Georef.cpp:22
static void Reverse(const std::string &georef, real &lat, real &lon, int &prec, bool centerp=true)
Definition: src/Georef.cpp:63
static const double lon
static int Precision(real res)
Definition: Georef.hpp:142


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:42:08