.NET Wrapper for GeographicLib::GARS More...
#include <GARS.h>
| Public Member Functions | |
| GARS () | |
| Static Public Member Functions | |
| static void | Forward (double lat, double lon, int prec, [System::Runtime::InteropServices::Out] System::String^% gars) | 
| static int | Precision (double res) | 
| static double | Resolution (int prec) | 
| static void | Reverse (System::String^ gars, [System::Runtime::InteropServices::Out] double% lat, [System::Runtime::InteropServices::Out] double% lon, [System::Runtime::InteropServices::Out] int% prec, bool centerp) | 
.NET Wrapper for GeographicLib::GARS
This class allows .NET applications to access GeographicLib::GARS.
The Global Area Reference System is described in
It provides a compact string representation of a geographic area (expressed as latitude and longitude). The classes Georef and Geohash implement similar compact representations.
C# Example:
Managed C++ Example:
Visual Basic Example:
| 
 | static | 
Convert from geographic coordinates to GARS.
| [in] | lat | latitude of point (degrees). | 
| [in] | lon | longitude of point (degrees). | 
| [in] | prec | the precision of the resulting GARS. | 
| [out] | gars | the GARS string. | 
| GeographicErr | if lat is not in [−90°, 90°] or if memory for gars can't be allocated. | 
prec specifies the precision of gars as follows:
If lat or lon is NaN, then gars is set to "INVALID".
Definition at line 19 of file dotnet/NETGeographicLib/GARS.cpp.
| 
 | static | 
The GARS precision required to meet a given geographic resolution.
| [in] | res | the minimum of resolution in latitude and longitude (degrees). | 
The returned length is in the range [0, 2].
Definition at line 57 of file dotnet/NETGeographicLib/GARS.cpp.
| 
 | static | 
The angular resolution of a GARS.
| [in] | prec | the precision of the GARS. | 
Internally, prec is first put in the range [0, 2].
Definition at line 54 of file dotnet/NETGeographicLib/GARS.cpp.
| 
 | static | 
Convert from GARS to geographic coordinates.
| [in] | gars | the GARS. | 
| [out] | lat | latitude of point (degrees). | 
| [out] | lon | longitude of point (degrees). | 
| [out] | prec | the precision of gars. | 
| [in] | centerp | if true (the default) return the center of the gars, otherwise return the south-west corner. | 
| GeographicErr | if gars is illegal. | 
The case of the letters in gars is ignored. prec is in the range [0, 2] and gives the precision of gars as follows:
If the first 3 characters of gars are "INV", then lat and lon are set to NaN and prec is unchanged.
Definition at line 34 of file dotnet/NETGeographicLib/GARS.cpp.