NETGeographicLib
1.43
|
.NET wrapper for GeographicLib::GeodesicLineExact. More...
#include <NETGeographicLib/GeodesicLineExact.h>
Public Types | |
enum | mask { mask::NONE, mask::LATITUDE, mask::LONGITUDE, mask::AZIMUTH, mask::DISTANCE, mask::DISTANCE_IN, mask::REDUCEDLENGTH, mask::GEODESICSCALE, mask::AREA, mask::LONG_UNROLL, mask::LONG_NOWRAP = LONG_UNROLL, mask::ALL } |
Public Member Functions | |
~GeodesicLineExact () | |
Constructors | |
GeodesicLineExact (GeodesicExact^ g, double lat1, double lon1, double azi1, NETGeographicLib::Mask caps) | |
GeodesicLineExact (double lat1, double lon1, double azi1, NETGeographicLib::Mask caps) | |
Position in terms of distance | |
double | Position (double s12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% m12, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21, [System::Runtime::InteropServices::Out] double% S12) |
double | Position (double s12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2) |
double | Position (double s12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2) |
double | Position (double s12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% m12) |
double | Position (double s12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21) |
double | Position (double s12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% m12, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21) |
Position in terms of arc length | |
void | ArcPosition (double a12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% s12, [System::Runtime::InteropServices::Out] double% m12, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21, [System::Runtime::InteropServices::Out] double% S12) |
void | ArcPosition (double a12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2) |
void | ArcPosition (double a12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2) |
void | ArcPosition (double a12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% s12) |
void | ArcPosition (double a12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% s12, [System::Runtime::InteropServices::Out] double% m12) |
void | ArcPosition (double a12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% s12, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21) |
void | ArcPosition (double a12, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% s12, [System::Runtime::InteropServices::Out] double% m12, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21) |
The general position function. | |
double | GenPosition (bool arcmode, double s12_a12, GeodesicLineExact::mask outmask, [System::Runtime::InteropServices::Out] double% lat2, [System::Runtime::InteropServices::Out] double% lon2, [System::Runtime::InteropServices::Out] double% azi2, [System::Runtime::InteropServices::Out] double% s12, [System::Runtime::InteropServices::Out] double% m12, [System::Runtime::InteropServices::Out] double% M12, [System::Runtime::InteropServices::Out] double% M21, [System::Runtime::InteropServices::Out] double% S12) |
Inspector functions | |
double | Latitude [get] |
double | Longitude [get] |
double | Azimuth [get] |
double | EquatorialAzimuth [get] |
double | EquatorialArc [get] |
double | MajorRadius [get] |
double | Flattening [get] |
NETGeographicLib::Mask | Capabilities () |
bool | Capabilities (NETGeographicLib::Mask testcaps) |
.NET wrapper for GeographicLib::GeodesicLineExact.
This class allows .NET applications to access GeographicLib::GeodesicLineExact.
GeodesicLineExact facilitates the determination of a series of points on a single geodesic. This is a companion to the GeodesicExact class. For additional information on this class see the documentation on the GeodesicLine class.
C# Example:
Managed C++ Example:
Visual Basic Example:
INTERFACE DIFFERENCES:
A constructor has been provided that assumes WGS84 parameters.
The following functions are implemented as properties: Latitude, Longitude, Azimuth, EquatorialAzimuth, EquatorialArc, MajorRadius, and Flattening.
The constructors, GenPosition, and Capabilities functions accept the "capabilities mask" as a NETGeographicLib::Mask rather than an unsigned. The Capabilities function returns a NETGeographicLib::Mask rather than an unsigned.
Definition at line 46 of file GeodesicLineExact.h.
|
strong |
Bit masks for what calculations to do. These masks do double duty. They signify to the GeodesicLineExact::GeodesicLineExact constructor and to GeodesicExact::Line what capabilities should be included in the GeodesicLineExact object. They also specify which results to return in the general routines GeodesicExact::GenDirect and GeodesicExact::GenInverse routines. GeodesicLineExact::mask is a duplication of this enum.
Enumerator | |
---|---|
NONE |
No capabilities, no output. |
LATITUDE |
Calculate latitude lat2. (It's not necessary to include this as a capability to GeodesicLineExact because this is included by default.) |
LONGITUDE |
Calculate longitude lon2. |
AZIMUTH |
Calculate azimuths azi1 and azi2. (It's not necessary to include this as a capability to GeodesicLineExact because this is included by default.) |
DISTANCE |
Calculate distance s12. |
DISTANCE_IN |
Allow distance s12 to be used as input in the direct geodesic problem. |
REDUCEDLENGTH |
Calculate reduced length m12. |
GEODESICSCALE |
Calculate geodesic scales M12 and M21. |
AREA |
Calculate area S12. |
LONG_UNROLL |
Unroll lon2 in the direct calculation. (This flag used to be called LONG_NOWRAP.) |
LONG_NOWRAP | |
ALL |
All capabilities, calculate everything. (LONG_UNROLL is not included in this mask.) |
Definition at line 76 of file GeodesicLineExact.h.
NETGeographicLib::GeodesicLineExact::GeodesicLineExact | ( | GeodesicExact^ | g, |
double | lat1, | ||
double | lon1, | ||
double | azi1, | ||
NETGeographicLib::Mask | caps | ||
) |
Constructor for a geodesic line staring at latitude lat1, longitude lon1, and azimuth azi1 (all in degrees).
[in] | g | A GeodesicExact object used to compute the necessary information about the GeodesicLineExact. |
[in] | lat1 | latitude of point 1 (degrees). |
[in] | lon1 | longitude of point 1 (degrees). |
[in] | azi1 | azimuth at point 1 (degrees). |
[in] | caps | bitor'ed combination of NETGeographicLib::Mask values specifying the capabilities the GeodesicLineExact object should possess, i.e., which quantities can be returned in calls to GeodesicLine::Position. |
lat1 should be in the range [−90°, 90°]; lon1 and azi1 should be in the range [−540°, 540°).
The NETGeographicLib::Mask values are
If the point is at a pole, the azimuth is defined by keeping lon1 fixed, writing lat1 = ±(90° − ε), and taking the limit ε → 0+.
Referenced by ~GeodesicLineExact().
NETGeographicLib::GeodesicLineExact::GeodesicLineExact | ( | double | lat1, |
double | lon1, | ||
double | azi1, | ||
NETGeographicLib::Mask | caps | ||
) |
A default constructor which assumes the WGS84 ellipsoid. See constructor comments for details.
|
inline |
The destructor calls the finalizer
Definition at line 198 of file GeodesicLineExact.h.
References GeodesicLineExact().
double NETGeographicLib::GeodesicLineExact::Position | ( | double | s12, |
[System::Runtime::InteropServices::Out] double% | lat2, | ||
[System::Runtime::InteropServices::Out] double% | lon2, | ||
[System::Runtime::InteropServices::Out] double% | azi2, | ||
[System::Runtime::InteropServices::Out] double% | m12, | ||
[System::Runtime::InteropServices::Out] double% | M12, | ||
[System::Runtime::InteropServices::Out] double% | M21, | ||
[System::Runtime::InteropServices::Out] double% | S12 | ||
) |
Compute the position of point 2 which is a distance s12 (meters) from point 1.
[in] | s12 | distance between point 1 and point 2 (meters); it can be signed. |
[out] | lat2 | latitude of point 2 (degrees). |
[out] | lon2 | longitude of point 2 (degrees); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::LONGITUDE. |
[out] | azi2 | (forward) azimuth at point 2 (degrees). |
[out] | m12 | reduced length of geodesic (meters); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::REDUCEDLENGTH. |
[out] | M12 | geodesic scale of point 2 relative to point 1 (dimensionless); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::GEODESICSCALE. |
[out] | M21 | geodesic scale of point 1 relative to point 2 (dimensionless); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::GEODESICSCALE. |
[out] | S12 | area under the geodesic (meters2); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::AREA. |
The values of lon2 and azi2 returned are in the range [−180°, 180°).
The GeodesicLineExact object must have been constructed with caps |= GeodesicLineExact::DISTANCE_IN; otherwise Math::NaN() is returned and no parameters are set. Requesting a value which the GeodesicLineExact object is not capable of computing is not an error; the corresponding argument will not be altered.
The following functions are overloaded versions of GeodesicLineExact::Position which omit some of the output parameters. Note, however, that the arc length is always computed and returned as the function value.
double NETGeographicLib::GeodesicLineExact::Position | ( | double | s12, |
[System::Runtime::InteropServices::Out] double% | lat2, | ||
[System::Runtime::InteropServices::Out] double% | lon2 | ||
) |
See the documentation for GeodesicLineExact::Position.
double NETGeographicLib::GeodesicLineExact::Position | ( | double | s12, |
[System::Runtime::InteropServices::Out] double% | lat2, | ||
[System::Runtime::InteropServices::Out] double% | lon2, | ||
[System::Runtime::InteropServices::Out] double% | azi2 | ||
) |
See the documentation for GeodesicLineExact::Position.
double NETGeographicLib::GeodesicLineExact::Position | ( | double | s12, |
[System::Runtime::InteropServices::Out] double% | lat2, | ||
[System::Runtime::InteropServices::Out] double% | lon2, | ||
[System::Runtime::InteropServices::Out] double% | azi2, | ||
[System::Runtime::InteropServices::Out] double% | m12 | ||
) |
See the documentation for GeodesicLineExact::Position.
double NETGeographicLib::GeodesicLineExact::Position | ( | double | s12, |
[System::Runtime::InteropServices::Out] double% | lat2, | ||
[System::Runtime::InteropServices::Out] double% | lon2, | ||
[System::Runtime::InteropServices::Out] double% | azi2, | ||
[System::Runtime::InteropServices::Out] double% | M12, | ||
[System::Runtime::InteropServices::Out] double% | M21 | ||
) |
See the documentation for GeodesicLineExact::Position.
double NETGeographicLib::GeodesicLineExact::Position | ( | double | s12, |
[System::Runtime::InteropServices::Out] double% | lat2, | ||
[System::Runtime::InteropServices::Out] double% | lon2, | ||
[System::Runtime::InteropServices::Out] double% | azi2, | ||
[System::Runtime::InteropServices::Out] double% | m12, | ||
[System::Runtime::InteropServices::Out] double% | M12, | ||
[System::Runtime::InteropServices::Out] double% | M21 | ||
) |
See the documentation for GeodesicLineExact::Position.
void NETGeographicLib::GeodesicLineExact::ArcPosition | ( | double | a12, |
[System::Runtime::InteropServices::Out] double% | lat2, | ||
[System::Runtime::InteropServices::Out] double% | lon2, | ||
[System::Runtime::InteropServices::Out] double% | azi2, | ||
[System::Runtime::InteropServices::Out] double% | s12, | ||
[System::Runtime::InteropServices::Out] double% | m12, | ||
[System::Runtime::InteropServices::Out] double% | M12, | ||
[System::Runtime::InteropServices::Out] double% | M21, | ||
[System::Runtime::InteropServices::Out] double% | S12 | ||
) |
Compute the position of point 2 which is an arc length a12 (degrees) from point 1.
[in] | a12 | arc length between point 1 and point 2 (degrees); it can be signed. |
[out] | lat2 | latitude of point 2 (degrees). |
[out] | lon2 | longitude of point 2 (degrees); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::LONGITUDE. |
[out] | azi2 | (forward) azimuth at point 2 (degrees). |
[out] | s12 | distance between point 1 and point 2 (meters); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::DISTANCE. |
[out] | m12 | reduced length of geodesic (meters); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::REDUCEDLENGTH. |
[out] | M12 | geodesic scale of point 2 relative to point 1 (dimensionless); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::GEODESICSCALE. |
[out] | M21 | geodesic scale of point 1 relative to point 2 (dimensionless); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::GEODESICSCALE. |
[out] | S12 | area under the geodesic (meters2); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::AREA. |
The values of lon2 and azi2 returned are in the range [−180°, 180°).
Requesting a value which the GeodesicLineExact object is not capable of computing is not an error; the corresponding argument will not be altered.
The following functions are overloaded versions of GeodesicLineExact::ArcPosition which omit some of the output parameters.
void NETGeographicLib::GeodesicLineExact::ArcPosition | ( | double | a12, |
[System::Runtime::InteropServices::Out] double% | lat2, | ||
[System::Runtime::InteropServices::Out] double% | lon2 | ||
) |
See the documentation for GeodesicLineExact::ArcPosition.
void NETGeographicLib::GeodesicLineExact::ArcPosition | ( | double | a12, |
[System::Runtime::InteropServices::Out] double% | lat2, | ||
[System::Runtime::InteropServices::Out] double% | lon2, | ||
[System::Runtime::InteropServices::Out] double% | azi2 | ||
) |
See the documentation for GeodesicLineExact::ArcPosition.
void NETGeographicLib::GeodesicLineExact::ArcPosition | ( | double | a12, |
[System::Runtime::InteropServices::Out] double% | lat2, | ||
[System::Runtime::InteropServices::Out] double% | lon2, | ||
[System::Runtime::InteropServices::Out] double% | azi2, | ||
[System::Runtime::InteropServices::Out] double% | s12 | ||
) |
See the documentation for GeodesicLineExact::ArcPosition.
void NETGeographicLib::GeodesicLineExact::ArcPosition | ( | double | a12, |
[System::Runtime::InteropServices::Out] double% | lat2, | ||
[System::Runtime::InteropServices::Out] double% | lon2, | ||
[System::Runtime::InteropServices::Out] double% | azi2, | ||
[System::Runtime::InteropServices::Out] double% | s12, | ||
[System::Runtime::InteropServices::Out] double% | m12 | ||
) |
See the documentation for GeodesicLineExact::ArcPosition.
void NETGeographicLib::GeodesicLineExact::ArcPosition | ( | double | a12, |
[System::Runtime::InteropServices::Out] double% | lat2, | ||
[System::Runtime::InteropServices::Out] double% | lon2, | ||
[System::Runtime::InteropServices::Out] double% | azi2, | ||
[System::Runtime::InteropServices::Out] double% | s12, | ||
[System::Runtime::InteropServices::Out] double% | M12, | ||
[System::Runtime::InteropServices::Out] double% | M21 | ||
) |
See the documentation for GeodesicLineExact::ArcPosition.
void NETGeographicLib::GeodesicLineExact::ArcPosition | ( | double | a12, |
[System::Runtime::InteropServices::Out] double% | lat2, | ||
[System::Runtime::InteropServices::Out] double% | lon2, | ||
[System::Runtime::InteropServices::Out] double% | azi2, | ||
[System::Runtime::InteropServices::Out] double% | s12, | ||
[System::Runtime::InteropServices::Out] double% | m12, | ||
[System::Runtime::InteropServices::Out] double% | M12, | ||
[System::Runtime::InteropServices::Out] double% | M21 | ||
) |
See the documentation for GeodesicLineExact::ArcPosition.
double NETGeographicLib::GeodesicLineExact::GenPosition | ( | bool | arcmode, |
double | s12_a12, | ||
GeodesicLineExact::mask | outmask, | ||
[System::Runtime::InteropServices::Out] double% | lat2, | ||
[System::Runtime::InteropServices::Out] double% | lon2, | ||
[System::Runtime::InteropServices::Out] double% | azi2, | ||
[System::Runtime::InteropServices::Out] double% | s12, | ||
[System::Runtime::InteropServices::Out] double% | m12, | ||
[System::Runtime::InteropServices::Out] double% | M12, | ||
[System::Runtime::InteropServices::Out] double% | M21, | ||
[System::Runtime::InteropServices::Out] double% | S12 | ||
) |
The general position function. GeodesicLineExact::Position and GeodesicLineExact::ArcPosition are defined in terms of this function.
[in] | arcmode | boolean flag determining the meaning of the second parameter; if arcmode is false, then the GeodesicLineExact object must have been constructed with caps |= GeodesicLineExact::DISTANCE_IN. |
[in] | s12_a12 | if arcmode is false, this is the distance between point 1 and point 2 (meters); otherwise it is the arc length between point 1 and point 2 (degrees); it can be signed. |
[in] | outmask | a bitor'ed combination of GeodesicLineExact::mask values specifying which of the following parameters should be set. |
[out] | lat2 | latitude of point 2 (degrees). |
[out] | lon2 | longitude of point 2 (degrees); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::LONGITUDE. |
[out] | azi2 | (forward) azimuth at point 2 (degrees). |
[out] | s12 | distance between point 1 and point 2 (meters); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::DISTANCE. |
[out] | m12 | reduced length of geodesic (meters); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::REDUCEDLENGTH. |
[out] | M12 | geodesic scale of point 2 relative to point 1 (dimensionless); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::GEODESICSCALE. |
[out] | M21 | geodesic scale of point 1 relative to point 2 (dimensionless); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::GEODESICSCALE. |
[out] | S12 | area under the geodesic (meters2); requires that the GeodesicLineExact object was constructed with caps |= GeodesicLineExact::AREA. |
The GeodesicLineExact::mask values possible for outmask are
Requesting a value which the GeodesicLineExact object is not capable of computing is not an error; the corresponding argument will not be altered. Note, however, that the arc length is always computed and returned as the function value.
With the LONG_UNROLL bit set, the quantity lon2 − lon1 indicates how many times and in what sense the geodesic encircles the ellipsoid. Because lon2 might be outside the normal allowed range for longitudes, [−540°, 540°), be sure to normalize it with Math::AngNormalize2 before using it in other GeographicLib calls.
NETGeographicLib::Mask NETGeographicLib::GeodesicLineExact::Capabilities | ( | ) |
bool NETGeographicLib::GeodesicLineExact::Capabilities | ( | NETGeographicLib::Mask | testcaps | ) |
[in] | testcaps | a set of bitor'ed GeodesicLineExact::mask values. |
|
get |
Definition at line 492 of file GeodesicLineExact.h.
|
get |
Definition at line 497 of file GeodesicLineExact.h.
|
get |
Definition at line 502 of file GeodesicLineExact.h.
|
get |
Definition at line 508 of file GeodesicLineExact.h.
|
get |
Definition at line 514 of file GeodesicLineExact.h.
|
get |
Definition at line 521 of file GeodesicLineExact.h.
|
get |
Definition at line 527 of file GeodesicLineExact.h.