21 const char BADALLOC[] =
"Failed to allocate memory for a GeographicLib::PolygonArea";
26 if ( m_pPolygonArea !=
NULL )
28 delete m_pPolygonArea;
29 m_pPolygonArea =
NULL;
41 m_pPolygonArea =
new GeographicLib::PolygonArea( *pGeodesic, polyline );
43 catch (std::bad_alloc)
57 catch (std::bad_alloc)
80 [System::Runtime::InteropServices::Out]
double% perimeter,
81 [System::Runtime::InteropServices::Out]
double% area)
83 double lperimeter, larea;
85 perimeter = lperimeter;
92 [System::Runtime::InteropServices::Out]
double% perimeter,
93 [System::Runtime::InteropServices::Out]
double% area)
95 double lperimeter, larea;
96 unsigned out =
m_pPolygonArea->TestPoint( lat, lon, reverse, sign, lperimeter, larea );
97 perimeter = lperimeter;
104 [System::Runtime::InteropServices::Out]
double% perimeter,
105 [System::Runtime::InteropServices::Out]
double% area)
107 double lperimeter, larea;
108 unsigned out =
m_pPolygonArea->TestEdge( azi, s, reverse, sign, lperimeter, larea );
109 perimeter = lperimeter;
116 [System::Runtime::InteropServices::Out]
double%
lat,
117 [System::Runtime::InteropServices::Out]
double%
lon)
152 m_pPolygonArea =
new GeographicLib::PolygonAreaExact( *pGeodesic, polyline );
154 catch (std::bad_alloc)
168 catch (std::bad_alloc)
191 [System::Runtime::InteropServices::Out]
double% perimeter,
192 [System::Runtime::InteropServices::Out]
double% area)
194 double lperimeter, larea;
196 perimeter = lperimeter;
203 [System::Runtime::InteropServices::Out]
double% perimeter,
204 [System::Runtime::InteropServices::Out]
double% area)
206 double lperimeter, larea;
207 unsigned out =
m_pPolygonArea->TestPoint( lat, lon, reverse, sign, lperimeter, larea );
208 perimeter = lperimeter;
215 [System::Runtime::InteropServices::Out]
double% perimeter,
216 [System::Runtime::InteropServices::Out]
double% area)
218 double lperimeter, larea;
219 unsigned out =
m_pPolygonArea->TestEdge( azi, s, reverse, sign, lperimeter, larea );
220 perimeter = lperimeter;
227 [System::Runtime::InteropServices::Out]
double%
lat,
228 [System::Runtime::InteropServices::Out]
double%
lon)
264 m_pPolygonArea =
new GeographicLib::PolygonAreaRhumb( *pGeodesic, polyline );
266 catch (std::bad_alloc)
280 catch (std::bad_alloc)
303 [System::Runtime::InteropServices::Out]
double% perimeter,
304 [System::Runtime::InteropServices::Out]
double% area)
306 double lperimeter, larea;
308 perimeter = lperimeter;
315 [System::Runtime::InteropServices::Out]
double% perimeter,
316 [System::Runtime::InteropServices::Out]
double% area)
318 double lperimeter, larea;
319 unsigned out =
m_pPolygonArea->TestPoint( lat, lon, reverse, sign, lperimeter, larea );
320 perimeter = lperimeter;
327 [System::Runtime::InteropServices::Out]
double% perimeter,
328 [System::Runtime::InteropServices::Out]
double% area)
330 double lperimeter, larea;
331 unsigned out =
m_pPolygonArea->TestEdge( azi, s, reverse, sign, lperimeter, larea );
332 perimeter = lperimeter;
339 [System::Runtime::InteropServices::Out]
double%
lat,
340 [System::Runtime::InteropServices::Out]
double%
lon)
void AddPoint(double lat, double lon)
unsigned TestPoint(double lat, double lon, bool reverse, bool sign, [System::Runtime::InteropServices::Out] double% perimeter, [System::Runtime::InteropServices::Out] double% area)
Header for NETGeographicLib::NETGeographicLib objects.
static const Geodesic & WGS84()
Exception class for NETGeographicLib.
std::ofstream out("Result.txt")
void CurrentPoint([System::Runtime::InteropServices::Out] double% lat, [System::Runtime::InteropServices::Out] double% lon)
.NET wrapper for GeographicLib::PolygonArea and PolygonAreaExact.
PolygonAreaExact(GeodesicExact^ earth, bool polyline)
void AddPoint(double lat, double lon)
void CurrentPoint([System::Runtime::InteropServices::Out] double% lat, [System::Runtime::InteropServices::Out] double% lon)
void CurrentPoint([System::Runtime::InteropServices::Out] double% lat, [System::Runtime::InteropServices::Out] double% lon)
PolygonArea(Geodesic^ earth, bool polyline)
void AddPoint(double lat, double lon)
PolygonAreaRhumb(Rhumb^ earth, bool polyline)
unsigned TestEdge(double azi, double s, bool reverse, bool sign, [System::Runtime::InteropServices::Out] double% perimeter, [System::Runtime::InteropServices::Out] double% area)
System::IntPtr GetUnmanaged()
Header for NETGeographicLib::PolygonArea class.
static const Rhumb & WGS84()
.NET wrapper for GeographicLib::Geodesic.
void AddEdge(double azi, double s)
EIGEN_DEVICE_FUNC const SignReturnType sign() const
unsigned TestEdge(double azi, double s, bool reverse, bool sign, [System::Runtime::InteropServices::Out] double% perimeter, [System::Runtime::InteropServices::Out] double% area)
Header for NETGeographicLib::Rhumb and NETGeographicLib::RhumbLine classes.
unsigned Compute(bool reverse, bool sign, [System::Runtime::InteropServices::Out] double% perimeter, [System::Runtime::InteropServices::Out] double% area)
unsigned TestPoint(double lat, double lon, bool reverse, bool sign, [System::Runtime::InteropServices::Out] double% perimeter, [System::Runtime::InteropServices::Out] double% area)
GeographicLib::PolygonArea * m_pPolygonArea
Exact geodesic calculations.
unsigned Compute(bool reverse, bool sign, [System::Runtime::InteropServices::Out] double% perimeter, [System::Runtime::InteropServices::Out] double% area)
Header for GeographicLib::PolygonAreaT class.
void reverse(const MatrixType &m)
Solve of the direct and inverse rhumb problems.
void AddEdge(double azi, double s)
.NET wrapper for GeographicLib::Rhumb.
.NET wrapper for GeographicLib::GeodesicExact.
System::IntPtr GetUnmanaged()
Header for NETGeographicLib::GeodesicExact class.
Container::iterator get(Container &c, Position position)
Header for NETGeographicLib::Geodesic class.
void AddEdge(double azi, double s)
unsigned TestPoint(double lat, double lon, bool reverse, bool sign, [System::Runtime::InteropServices::Out] double% perimeter, [System::Runtime::InteropServices::Out] double% area)
unsigned Compute(bool reverse, bool sign, [System::Runtime::InteropServices::Out] double% perimeter, [System::Runtime::InteropServices::Out] double% area)
System::IntPtr GetUnmanaged()
static const GeodesicExact & WGS84()
unsigned TestEdge(double azi, double s, bool reverse, bool sign, [System::Runtime::InteropServices::Out] double% perimeter, [System::Runtime::InteropServices::Out] double% area)