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;
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 //*****************************************************************************
GeographicLib::Georef::Resolution
static Math::real Resolution(int prec)
Definition: Georef.hpp:121
Georef.hpp
Header for GeographicLib::Georef class.
NETGeographicLib::Georef::Precision
static int Precision(double res)
Definition: dotnet/NETGeographicLib/Georef.cpp:57
res
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
Definition: PartialRedux_count.cpp:3
NETGeographicLib::GeographicErr
Exception class for NETGeographicLib.
Definition: NETGeographicLib.h:132
NETGeographicLib::Georef::Resolution
static double Resolution(int prec)
Definition: dotnet/NETGeographicLib/Georef.cpp:54
NETGeographicLib::Georef::Forward
static void Forward(double lat, double lon, int prec, [System::Runtime::InteropServices::Out] System::String^% georef)
Definition: dotnet/NETGeographicLib/Georef.cpp:19
GeographicLib::Georef::Forward
static void Forward(real lat, real lon, int prec, std::string &georef)
Definition: src/Georef.cpp:22
NETGeographicLib::Georef::Reverse
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)
Definition: dotnet/NETGeographicLib/Georef.cpp:34
l
static const Line3 l(Rot3(), 1, 1)
GeographicLib::Georef::Reverse
static void Reverse(const std::string &georef, real &lat, real &lon, int &prec, bool centerp=true)
Definition: src/Georef.cpp:63
stdafx.h
NETGeographicLib.h
Header for NETGeographicLib::NETGeographicLib objects.
Georef.h
Header for NETGeographicLib::Georef class.
GeographicLib::Georef::Precision
static int Precision(real res)
Definition: Georef.hpp:142
lon
static const double lon
Definition: testGeographicLib.cpp:34
NETGeographicLib
Definition: Accumulator.h:13
NETGeographicLib::StringConvert::ManagedToUnmanaged
static std::string ManagedToUnmanaged(System::String^ s)
Definition: NETGeographicLib.cpp:20
lat
static const double lat
Definition: testGeographicLib.cpp:34


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:11:37