.NET wrapper for GeographicLib::OSGB. More...
#include <OSGB.h>
Static Public Member Functions | |
static void | Forward (double lat, double lon, [System::Runtime::InteropServices::Out] double%x, [System::Runtime::InteropServices::Out] double%y, [System::Runtime::InteropServices::Out] double%gamma, [System::Runtime::InteropServices::Out] double%k) |
static void | Forward (double lat, double lon, [System::Runtime::InteropServices::Out] double%x, [System::Runtime::InteropServices::Out] double%y) |
static void | GridReference (double x, double y, int prec, [System::Runtime::InteropServices::Out] System::String^%gridref) |
static void | GridReference (System::String^gridref, [System::Runtime::InteropServices::Out] double%x, [System::Runtime::InteropServices::Out] double%y, [System::Runtime::InteropServices::Out] int%prec, bool centerp) |
static void | Reverse (double x, double y, [System::Runtime::InteropServices::Out] double%lat, [System::Runtime::InteropServices::Out] double%lon, [System::Runtime::InteropServices::Out] double%gamma, [System::Runtime::InteropServices::Out] double%k) |
static void | Reverse (double x, double y, [System::Runtime::InteropServices::Out] double%lat, [System::Runtime::InteropServices::Out] double%lon) |
Inspector functions | |
static double | MajorRadius () |
static double | Flattening () |
static double | CentralScale () |
static double | OriginLatitude () |
static double | OriginLongitude () |
static double | FalseNorthing () |
static double | FalseEasting () |
Private Member Functions | |
OSGB (void) | |
.NET wrapper for GeographicLib::OSGB.
This class allows .NET applications to access GeographicLib::OSGB.
The class implements the coordinate system used by the Ordnance Survey for maps of Great Britain and conversions to the grid reference system.
See
WARNING: the latitudes and longitudes for the Ordnance Survey grid system do not use the WGS84 datum. Do not use the values returned by this class in the UTMUPS, MGRS, or Geoid classes without first converting the datum (and vice versa).
C# Example:
Managed C++ Example:
Visual Basic Example:
|
static |
Definition at line 121 of file dotnet/NETGeographicLib/OSGB.cpp.
|
static |
Definition at line 134 of file dotnet/NETGeographicLib/OSGB.cpp.
|
static |
Definition at line 131 of file dotnet/NETGeographicLib/OSGB.cpp.
|
static |
For the Airy 1830 ellipsoid, a = 20923713 ft and b = 20853810 ft; thus the flattening = (20923713 − 20853810)/20923713 = 7767/2324857 = 1/299.32496459... (The Airy 1830 value is returned because the OSGB projection is based on this ellipsoid.)
Definition at line 118 of file dotnet/NETGeographicLib/OSGB.cpp.
|
static |
Forward projection, from geographic to OSGB coordinates.
[in] | lat | latitude of point (degrees). |
[in] | lon | longitude of point (degrees). |
[out] | x | easting of point (meters). |
[out] | y | northing of point (meters). |
[out] | gamma | meridian convergence at point (degrees). |
[out] | k | scale of projection at point. |
lat should be in the range [−90°, 90°].
Definition at line 19 of file dotnet/NETGeographicLib/OSGB.cpp.
|
static |
OSGB::Forward without returning the convergence and scale.
Definition at line 49 of file dotnet/NETGeographicLib/OSGB.cpp.
|
static |
Convert OSGB coordinates to a grid reference.
[in] | x | easting of point (meters). |
[in] | y | northing of point (meters). |
[in] | prec | precision relative to 100 km. |
[out] | gridref | National Grid reference. |
GeographicErr | if prec, x, or y is outside its allowed range. |
std::bad_alloc | if the memory for gridref can't be allocatied. |
prec specifies the precision of the grid reference string as follows:
The easting must be in the range [−1000 km, 1500 km) and the northing must be in the range [−500 km, 2000 km). These bounds are consistent with rules for the letter designations for the grid system.
If x or y is NaN, the returned grid reference is "INVALID".
Definition at line 71 of file dotnet/NETGeographicLib/OSGB.cpp.
|
static |
Convert OSGB coordinates to a grid reference.
[in] | gridref | National Grid reference. |
[out] | x | easting of point (meters). |
[out] | y | northing of point (meters). |
[out] | prec | precision relative to 100 km. |
[in] | centerp | if true (default), return center of the grid square, else return SW (lower left) corner. |
GeographicErr | if gridref is illegal. |
The grid reference must be of the form: two letters (not including I) followed by an even number of digits (up to 22).
If the first 2 characters of gridref are "IN", then x and y are set to NaN and prec is set to −2.
Definition at line 91 of file dotnet/NETGeographicLib/OSGB.cpp.
|
static |
This is 20923713 ft converted to meters using the rule 1 ft = 109.48401603−10 m. (The Airy 1830 value is returned because the OSGB projection is based on this ellipsoid.)
Definition at line 115 of file dotnet/NETGeographicLib/OSGB.cpp.
|
static |
Definition at line 124 of file dotnet/NETGeographicLib/OSGB.cpp.
|
static |
Definition at line 127 of file dotnet/NETGeographicLib/OSGB.cpp.
|
static |
Reverse projection, from OSGB coordinates to geographic.
[in] | x | easting of point (meters). |
[in] | y | northing of point (meters). |
[out] | lat | latitude of point (degrees). |
[out] | lon | longitude of point (degrees). |
[out] | gamma | meridian convergence at point (degrees). |
[out] | k | scale of projection at point. |
The value of lon returned is in the range [−180°, 180°).
Definition at line 34 of file dotnet/NETGeographicLib/OSGB.cpp.
|
static |
OSGB::Reverse without returning the convergence and scale.
Definition at line 60 of file dotnet/NETGeographicLib/OSGB.cpp.