.NET wrapper for GeographicLib::LocalCartesian. More...
#include <LocalCartesian.h>
Public Member Functions | |
void | Forward (double lat, double lon, double h, [System::Runtime::InteropServices::Out] double%x, [System::Runtime::InteropServices::Out] double%y, [System::Runtime::InteropServices::Out] double%z) |
void | Forward (double lat, double lon, double h, [System::Runtime::InteropServices::Out] double%x, [System::Runtime::InteropServices::Out] double%y, [System::Runtime::InteropServices::Out] double%z, [System::Runtime::InteropServices::Out] array< double, 2 >^%M) |
LocalCartesian (double lat0, double lon0, double h0, Geocentric^earth) | |
LocalCartesian (double lat0, double lon0, double h0) | |
LocalCartesian (Geocentric^earth) | |
LocalCartesian () | |
void | Reset (double lat0, double lon0, double h0) |
void | Reverse (double x, double y, double z, [System::Runtime::InteropServices::Out] double%lat, [System::Runtime::InteropServices::Out] double%lon, [System::Runtime::InteropServices::Out] double%h) |
void | Reverse (double x, double y, double z, [System::Runtime::InteropServices::Out] double%lat, [System::Runtime::InteropServices::Out] double%lon, [System::Runtime::InteropServices::Out] double%h, [System::Runtime::InteropServices::Out] array< double, 2 >^%M) |
~LocalCartesian () | |
Public Attributes | |
Inspector functions | |
property double | LatitudeOrigin { double get() |
property double | LongitudeOrigin { double get() |
property double | HeightOrigin { double get() |
property double | MajorRadius { double get() |
property double | Flattening { double get() |
Private Member Functions | |
!LocalCartesian (void) | |
Private Attributes | |
GeographicLib::LocalCartesian * | m_pLocalCartesian |
.NET wrapper for GeographicLib::LocalCartesian.
This class allows .NET applications to access GeographicLib::LocalCartesian.
Convert between geodetic coordinates latitude = lat, longitude = lon, height = h (measured vertically from the surface of the ellipsoid) to local cartesian coordinates (x, y, z). The origin of local cartesian coordinate system is at lat = lat0, lon = lon0, h = h0. The z axis is normal to the ellipsoid; the y axis points due north. The plane z = - h0 is tangent to the ellipsoid.
The conversions all take place via geocentric coordinates using a Geocentric object.
C# Example:
Managed C++ Example:
Visual Basic Example:
INTERFACE DIFFERENCES:
Constructors have been provided that assume WGS84 parameters.
The following functions are implemented as properties: LatitudeOrigin, LongitudeOrigin, HeightOrigin, MajorRadius, and Flattening.
The rotation matrices returned by the Forward and Reverse functions are 2D, 3 × 3 arrays rather than vectors.
Definition at line 48 of file LocalCartesian.h.
|
private |
Definition at line 22 of file dotnet/NETGeographicLib/LocalCartesian.cpp.
LocalCartesian::LocalCartesian | ( | double | lat0, |
double | lon0, | ||
double | h0, | ||
Geocentric^ | earth | ||
) |
Constructor setting the origin.
[in] | lat0 | latitude at origin (degrees). |
[in] | lon0 | longitude at origin (degrees). |
[in] | h0 | height above ellipsoid at origin (meters); default 0. |
[in] | earth | Geocentric object for the transformation; default Geocentric::WGS84. |
lat0 should be in the range [−90°, 90°].
Definition at line 32 of file dotnet/NETGeographicLib/LocalCartesian.cpp.
LocalCartesian::LocalCartesian | ( | double | lat0, |
double | lon0, | ||
double | h0 | ||
) |
Constructor setting the origin and assuming a WGS84 ellipsoid.
[in] | lat0 | latitude at origin (degrees). |
[in] | lon0 | longitude at origin (degrees). |
[in] | h0 | height above ellipsoid at origin (meters); default 0. |
lat0 should be in the range [−90°, 90°].
Definition at line 49 of file dotnet/NETGeographicLib/LocalCartesian.cpp.
LocalCartesian::LocalCartesian | ( | Geocentric^ | earth | ) |
Constructor that uses the provided ellipsoid.
[in] | earth | Geocentric object for the transformation; default Geocentric::WGS84. |
Sets lat0 = 0, lon0 = 0, h0 = 0.
Definition at line 63 of file dotnet/NETGeographicLib/LocalCartesian.cpp.
LocalCartesian::LocalCartesian | ( | ) |
The default constructor assumes the WGS84 ellipsoid.
Sets lat0 = 0, lon0 = 0, h0 = 0.
Definition at line 79 of file dotnet/NETGeographicLib/LocalCartesian.cpp.
|
inline |
The destructor calls the finalizer.
Definition at line 103 of file LocalCartesian.h.
void LocalCartesian::Forward | ( | double | lat, |
double | lon, | ||
double | h, | ||
[System::Runtime::InteropServices::Out] double% | x, | ||
[System::Runtime::InteropServices::Out] double% | y, | ||
[System::Runtime::InteropServices::Out] double% | z | ||
) |
Convert from geodetic to local cartesian coordinates.
[in] | lat | latitude of point (degrees). |
[in] | lon | longitude of point (degrees). |
[in] | h | height of point above the ellipsoid (meters). |
[out] | x | local cartesian coordinate (meters). |
[out] | y | local cartesian coordinate (meters). |
[out] | z | local cartesian coordinate (meters). |
lat should be in the range [−90°, 90°].
Definition at line 99 of file dotnet/NETGeographicLib/LocalCartesian.cpp.
void LocalCartesian::Forward | ( | double | lat, |
double | lon, | ||
double | h, | ||
[System::Runtime::InteropServices::Out] double% | x, | ||
[System::Runtime::InteropServices::Out] double% | y, | ||
[System::Runtime::InteropServices::Out] double% | z, | ||
[System::Runtime::InteropServices::Out] array< double, 2 >^% | M | ||
) |
Convert from geodetic to local cartesian coordinates and return rotation matrix.
[in] | lat | latitude of point (degrees). |
[in] | lon | longitude of point (degrees). |
[in] | h | height of point above the ellipsoid (meters). |
[out] | x | local cartesian coordinate (meters). |
[out] | y | local cartesian coordinate (meters). |
[out] | z | local cartesian coordinate (meters). |
[out] | M | a 3 × 3 rotation matrix. |
lat should be in the range [−90°, 90°].
Let v be a unit vector located at (lat, lon, h). We can express v as column vectors in one of two ways
Then we have v0 = M ⋅ v1.
Definition at line 112 of file dotnet/NETGeographicLib/LocalCartesian.cpp.
void LocalCartesian::Reset | ( | double | lat0, |
double | lon0, | ||
double | h0 | ||
) |
Reset the origin.
[in] | lat0 | latitude at origin (degrees). |
[in] | lon0 | longitude at origin (degrees). |
[in] | h0 | height above ellipsoid at origin (meters); default 0. |
lat0 should be in the range [−90°, 90°].
Definition at line 93 of file dotnet/NETGeographicLib/LocalCartesian.cpp.
void LocalCartesian::Reverse | ( | double | x, |
double | y, | ||
double | z, | ||
[System::Runtime::InteropServices::Out] double% | lat, | ||
[System::Runtime::InteropServices::Out] double% | lon, | ||
[System::Runtime::InteropServices::Out] double% | h | ||
) |
Convert from local cartesian to geodetic coordinates.
[in] | x | local cartesian coordinate (meters). |
[in] | y | local cartesian coordinate (meters). |
[in] | z | local cartesian coordinate (meters). |
[out] | lat | latitude of point (degrees). |
[out] | lon | longitude of point (degrees). |
[out] | h | height of point above the ellipsoid (meters). |
The value of lon returned is in the range [−180°, 180°).
Definition at line 131 of file dotnet/NETGeographicLib/LocalCartesian.cpp.
void LocalCartesian::Reverse | ( | double | x, |
double | y, | ||
double | z, | ||
[System::Runtime::InteropServices::Out] double% | lat, | ||
[System::Runtime::InteropServices::Out] double% | lon, | ||
[System::Runtime::InteropServices::Out] double% | h, | ||
[System::Runtime::InteropServices::Out] array< double, 2 >^% | M | ||
) |
Convert from local cartesian to geodetic coordinates and return rotation matrix.
[in] | x | local cartesian coordinate (meters). |
[in] | y | local cartesian coordinate (meters). |
[in] | z | local cartesian coordinate (meters). |
[out] | lat | latitude of point (degrees). |
[out] | lon | longitude of point (degrees). |
[out] | h | height of point above the ellipsoid (meters). |
[out] | M | a 3 × 3 rotation matrix. |
Let v be a unit vector located at (lat, lon, h). We can express v as column vectors in one of two ways
Then we have v1 = MT ⋅ v0, where MT is the transpose of M.
Definition at line 144 of file dotnet/NETGeographicLib/LocalCartesian.cpp.
property double NETGeographicLib::LocalCartesian::Flattening { double get() |
Definition at line 242 of file LocalCartesian.h.
property double NETGeographicLib::LocalCartesian::HeightOrigin { double get() |
Definition at line 229 of file LocalCartesian.h.
property double NETGeographicLib::LocalCartesian::LatitudeOrigin { double get() |
Definition at line 219 of file LocalCartesian.h.
property double NETGeographicLib::LocalCartesian::LongitudeOrigin { double get() |
Definition at line 224 of file LocalCartesian.h.
|
private |
Definition at line 52 of file LocalCartesian.h.
property double NETGeographicLib::LocalCartesian::MajorRadius { double get() |
Definition at line 236 of file LocalCartesian.h.