dotnet/examples/ManagedCPP/example-GeoCoords.cpp
Go to the documentation of this file.
1 using namespace System;
2 using namespace NETGeographicLib;
3 
5 {
6  try {
7  // Miscellaneous conversions
8  double lat = 33.3, lon = 44.4;
9  GeoCoords^ c = gcnew GeoCoords(lat, lon, -1);
10  Console::WriteLine(c->MGRSRepresentation(-3));
11  c->Reset("18TWN0050", true, false);
12  Console::WriteLine(c->DMSRepresentation(0, false, 0));
13  Console::WriteLine(String::Format("Latitude: {0} Longitude: {1}", c->Latitude, c->Longitude));
14  c->Reset("1d38'W 55d30'N", true, false);
15  Console::WriteLine(c->GeoRepresentation(0, false));
16  }
17  catch (GeographicErr^ e) {
18  Console::WriteLine(String::Format("Caught exception: {0}", e->Message));
19  return -1;
20  }
21  return 0;
22 }
e
Array< double, 1, 3 > e(1./3., 0.5, 2.)
c
Scalar Scalar * c
Definition: benchVecAdd.cpp:17
NETGeographicLib::GeographicErr
Exception class for NETGeographicLib.
Definition: NETGeographicLib.h:132
main
int main(array< System::String ^> ^)
Definition: dotnet/examples/ManagedCPP/example-GeoCoords.cpp:4
array
Definition: numpy.h:821
NETGeographicLib::GeoCoords
.NET wrapper for GeographicLib::GeoCoords.
Definition: GeoCoords.h:55
lon
static const double lon
Definition: testGeographicLib.cpp:34
NETGeographicLib
Definition: Accumulator.h:13
lat
static const double lat
Definition: testGeographicLib.cpp:34


gtsam
Author(s):
autogenerated on Thu Jul 4 2024 03:01:20