NETGeographicLib 1.52
Loading...
Searching...
No Matches
AzimuthalEquidistant.h
Go to the documentation of this file.
1/**
2 * \file NETGeographicLib/AzimuthalEquidistant.h
3 * \brief Header for NETGeographicLib::AzimuthalEquidistant class
4 *
5 * NETGeographicLib is copyright (c) Scott Heiman (2013)
6 * GeographicLib is Copyright (c) Charles Karney (2010-2012)
7 * <charles@karney.com> and licensed under the MIT/X11 License.
8 * For more information, see
9 * https://geographiclib.sourceforge.io/
10 **********************************************************************/
11#pragma once
12#include "Geodesic.h"
13
14namespace NETGeographicLib
15{
16 /**
17 * \brief .NET wrapper for GeographicLib::AzimuthalEquidistant.
18 *
19 * This class allows .NET applications to access GeographicLib::AzimuthalEquidistant.
20 *
21 * Azimuthal equidistant projection centered at an arbitrary position on the
22 * ellipsoid. For a point in projected space (\e x, \e y), the geodesic
23 * distance from the center position is hypot(\e x, \e y) and the azimuth of
24 * the geodesic from the center point is atan2(\e x, \e y). The Forward and
25 * Reverse methods also return the azimuth \e azi of the geodesic at (\e x,
26 * \e y) and reciprocal scale \e rk in the azimuthal direction which,
27 * together with the basic properties of the projection, serve to specify
28 * completely the local affine transformation between geographic and
29 * projected coordinates.
30 *
31 * The conversions all take place using a Geodesic object (by default
32 * Geodesic::WGS84). For more information on geodesics see \ref geodesic.
33 *
34 * C# Example:
35 * \include example-AzimuthalEquidistant.cs
36 * Managed C++ Example:
37 * \include example-AzimuthalEquidistant.cpp
38 * Visual Basic Example:
39 * \include example-AzimuthalEquidistant.vb
40 *
41 * <B>INTERFACE DIFFERENCES:</B><BR>
42 * A default constructor is provided that assumes a WGS84 ellipsoid.
43 *
44 * The EquatorialRadius and Flattening functions are implemented as
45 * properties.
46 **********************************************************************/
47 public ref class AzimuthalEquidistant
48 {
49 private:
50 // Pointer to the unmanaged GeographicLib::AzimuthalEquidistant
51 const GeographicLib::AzimuthalEquidistant* m_pAzimuthalEquidistant;
52
53 // Frees the unmanaged memory when the object is destroyed.
55 public:
56 /**
57 * Default Constructor for AzimuthalEquidistant.
58 * Assumes WGS84 Geodesic
59 **********************************************************************/
61
62 /**
63 * Constructor for AzimuthalEquidistant.
64 *
65 * @param[in] earth the Geodesic object to use for geodesic calculations.
66 **********************************************************************/
68
69 /**
70 * Destructor
71 *
72 * frees unmanaged memory.
73 **********************************************************************/
75 { this->!AzimuthalEquidistant(); }
76
77 /**
78 * Forward projection, from geographic to azimuthal equidistant.
79 *
80 * @param[in] lat0 latitude of center point of projection (degrees).
81 * @param[in] lon0 longitude of center point of projection (degrees).
82 * @param[in] lat latitude of point (degrees).
83 * @param[in] lon longitude of point (degrees).
84 * @param[out] x easting of point (meters).
85 * @param[out] y northing of point (meters).
86 * @param[out] azi azimuth of geodesic at point (degrees).
87 * @param[out] rk reciprocal of azimuthal scale at point.
88 *
89 * \e lat0 and \e lat should be in the range [&minus;90&deg;, 90&deg;].
90 * The scale of the projection is 1 in the "radial" direction, \e azi
91 * clockwise from true north, and is 1/\e rk in the direction
92 * perpendicular to this. A call to Forward followed by a call to
93 * Reverse will return the original (\e lat, \e lon) (to within
94 * roundoff).
95 **********************************************************************/
96 void Forward(double lat0, double lon0, double lat, double lon,
97 [System::Runtime::InteropServices::Out] double% x,
98 [System::Runtime::InteropServices::Out] double% y,
99 [System::Runtime::InteropServices::Out] double% azi,
100 [System::Runtime::InteropServices::Out] double% rk);
101
102 /**
103 * Reverse projection, from azimuthal equidistant to geographic.
104 *
105 * @param[in] lat0 latitude of center point of projection (degrees).
106 * @param[in] lon0 longitude of center point of projection (degrees).
107 * @param[in] x easting of point (meters).
108 * @param[in] y northing of point (meters).
109 * @param[out] lat latitude of point (degrees).
110 * @param[out] lon longitude of point (degrees).
111 * @param[out] azi azimuth of geodesic at point (degrees).
112 * @param[out] rk reciprocal of azimuthal scale at point.
113 *
114 * \e lat0 should be in the range [&minus;90&deg;, 90&deg;]. \e lat
115 * will be in the range [&minus;90&deg;, 90&deg;] and \e lon will be in
116 * the range [&minus;180&deg;, 180&deg;). The scale of the projection
117 * is 1 in the "radial" direction, \e azi clockwise from true north,
118 * and is 1/\e rk in the direction perpendicular to this. A call to
119 * Reverse followed by a call to Forward will return the original (\e
120 * x, \e y) (to roundoff) only if the geodesic to (\e x, \e y) is a
121 * shortest path.
122 **********************************************************************/
123 void Reverse(double lat0, double lon0, double x, double y,
124 [System::Runtime::InteropServices::Out] double% lat,
125 [System::Runtime::InteropServices::Out] double% lon,
126 [System::Runtime::InteropServices::Out] double% azi,
127 [System::Runtime::InteropServices::Out] double% rk);
128
129 /**
130 * AzimuthalEquidistant::Forward without returning the azimuth and scale.
131 **********************************************************************/
132 void Forward(double lat0, double lon0, double lat, double lon,
133 [System::Runtime::InteropServices::Out] double% x,
134 [System::Runtime::InteropServices::Out] double% y);
135
136 /**
137 * AzimuthalEquidistant::Reverse without returning the azimuth and scale.
138 **********************************************************************/
139 void Reverse(double lat0, double lon0, double x, double y,
140 [System::Runtime::InteropServices::Out] double% lat,
141 [System::Runtime::InteropServices::Out] double% lon);
142
143 /** \name Inspector functions
144 **********************************************************************/
145 ///@{
146 /**
147 * @return \e a the equatorial radius of the ellipsoid (meters). This is
148 * the value inherited from the Geodesic object used in the constructor.
149 **********************************************************************/
150 property double EquatorialRadius { double get(); }
151
152 /**
153 * @return \e f the flattening of the ellipsoid. This is the value
154 * inherited from the Geodesic object used in the constructor.
155 **********************************************************************/
156 property double Flattening { double get(); }
157 ///@}
158 };
159} // namespace NETGeographicLib
Header for NETGeographicLib::Geodesic class.
.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)
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)
.NET wrapper for GeographicLib::Geodesic.
Definition: Geodesic.h:171