dotnet/examples/ManagedCPP/example-Ellipsoid.cpp
Go to the documentation of this file.
1 using namespace System;
2 using namespace NETGeographicLib;
3 
5 {
6  try {
7  Ellipsoid^ wgs84 = gcnew Ellipsoid( Constants::WGS84::MajorRadius,
8  Constants::WGS84::Flattening );
9  // Alternatively: Ellipsoid^ wgs84 = gcnew Ellipsoid();
10  Console::WriteLine( String::Format(
11  "The latitude half way between the equator and the pole is {0}",
12  wgs84->InverseRectifyingLatitude(45)) );
13  Console::WriteLine( String::Format(
14  "Half the area of the ellipsoid lies between latitudes +/- {0}",
15  wgs84->InverseAuthalicLatitude(30))); ;
16  Console::WriteLine( String::Format(
17  "The northernmost edge of a square Mercator map is at latitude {0}",
18  wgs84->InverseIsometricLatitude(180)));
19  }
20  catch (GeographicErr^ e) {
21  Console::WriteLine( String::Format( "Caught exception: {0}", e->Message ) );
22  return -1;
23  }
24  return 0;
25 }
Exception class for NETGeographicLib.
Definition: numpy.h:543
Array< double, 1, 3 > e(1./3., 0.5, 2.)
.NET wrapper for GeographicLib::Ellipsoid.
Definition: Ellipsoid.h:47
int main(array< System::String^>^)


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