dotnet/examples/ManagedCPP/example-AzimuthalEquidistant.cpp
Go to the documentation of this file.
1 using namespace System;
2 using namespace NETGeographicLib;
3 
5 {
6  try {
7  Geodesic^ geod = gcnew Geodesic(); // WGS84
8  const double lat0 = 48 + 50/60.0, lon0 = 2 + 20/60.0; // Paris
9  AzimuthalEquidistant^ proj = gcnew AzimuthalEquidistant(geod);
10  {
11  // Sample forward calculation
12  double lat = 50.9, lon = 1.8; // Calais
13  double x, y;
14  proj->Forward(lat0, lon0, lat, lon, x, y);
15  Console::WriteLine( String::Format("X: {0} Y: {1}", x, y ) );
16  }
17  {
18  // Sample reverse calculation
19  double x = -38e3, y = 230e3;
20  double lat, lon;
21  proj->Reverse(lat0, lon0, x, y, lat, lon);
22  Console::WriteLine( String::Format("Latitude: {0} Longitude: {1}", lat, lon ) );
23  }
24  }
25  catch (GeographicErr^ e) {
26  Console::WriteLine( String::Format( "Caught exception: {0}", e->Message ) );
27  return -1;
28  }
29  return 0;
30 }
Scalar * y
static const double lat
Exception class for NETGeographicLib.
Definition: numpy.h:680
const double lat0
.NET wrapper for GeographicLib::Geodesic.
Definition: Geodesic.h:170
int main(array< System::String ^> ^)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
const double lon0
.NET wrapper for GeographicLib::AzimuthalEquidistant.
void Forward(double lat0, double lon0, double lat, double lon, [System::Runtime::InteropServices::Out] double% x, [System::Runtime::InteropServices::Out] double% y, [System::Runtime::InteropServices::Out] double% azi, [System::Runtime::InteropServices::Out] double% rk)
void Reverse(double lat0, double lon0, double x, double y, [System::Runtime::InteropServices::Out] double% lat, [System::Runtime::InteropServices::Out] double% lon, [System::Runtime::InteropServices::Out] double% azi, [System::Runtime::InteropServices::Out] double% rk)
static const double lon
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:34:12