dotnet/examples/ManagedCPP/example-PolarStereographic.cpp
Go to the documentation of this file.
1 using namespace System;
2 using namespace NETGeographicLib;
3 
5 {
6  try {
7  PolarStereographic^ proj = gcnew PolarStereographic(); // WGS84
8  bool northp = true;
9  {
10  // Sample forward calculation
11  double lat = 61.2, lon = -149.9; // Anchorage
12  double x, y;
13  proj->Forward(northp, lat, lon, x, y);
14  Console::WriteLine(String::Format("{0} {1}", x, y));
15  }
16  {
17  // Sample reverse calculation
18  double x = -1637e3, y = 2824e3;
19  double lat, lon;
20  proj->Reverse(northp, x, y, lat, lon);
21  Console::WriteLine(String::Format("{0} {1}", lat, lon));
22  }
23  }
24  catch (GeographicErr^ e) {
25  Console::WriteLine(String::Format("Caught exception: {0}", e->Message));
26  return -1;
27  }
28  return 0;
29 }
int main(array< System::String^>^)
Scalar * y
static const double lat
Exception class for NETGeographicLib.
Definition: numpy.h:543
void Forward(bool northp, double lat, double lon, [System::Runtime::InteropServices::Out] double%x, [System::Runtime::InteropServices::Out] double%y, [System::Runtime::InteropServices::Out] double%gamma, [System::Runtime::InteropServices::Out] double%k)
void Reverse(bool northp, double x, double y, [System::Runtime::InteropServices::Out] double%lat, [System::Runtime::InteropServices::Out] double%lon, [System::Runtime::InteropServices::Out] double%gamma, [System::Runtime::InteropServices::Out] double%k)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
.NET wrapper for GeographicLib::PolarStereographic.
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 Sat May 8 2021 02:42:02