.NET wrapper for GeographicLib::Geohash. More...
#include <Geohash.h>
Static Public Member Functions | |
static int | DecimalPrecision (int len) |
static void | Forward (double lat, double lon, int len, [System::Runtime::InteropServices::Out] System::String^%geohash) |
static int | GeohashLength (double res) |
static int | GeohashLength (double latres, double lonres) |
static double | LatitudeResolution (int len) |
static double | LongitudeResolution (int len) |
static void | Reverse (System::String^geohash, [System::Runtime::InteropServices::Out] double%lat, [System::Runtime::InteropServices::Out] double%lon, [System::Runtime::InteropServices::Out] int%len, bool centerp) |
Private Member Functions | |
Geohash () | |
.NET wrapper for GeographicLib::Geohash.
Geohashes are described in
They provide a compact string representation of a particular geographic location (expressed as latitude and longitude), with the property that if trailing characters are dropped from the string the geographic location remains nearby.
C# Example:
Managed C++ Example:
Visual Basic Example:
The decimal geographic precision required to match a given geohash length. This is the number of digits needed after decimal point in a decimal degrees representation.
[in] | len | the length of the geohash. |
Internally, len is first put in the range [0, 18]. The returned decimal precision is in the range [−2, 12].
Definition at line 81 of file dotnet/NETGeographicLib/Geohash.cpp.
|
static |
Convert from geographic coordinates to a geohash.
[in] | lat | latitude of point (degrees). |
[in] | lon | longitude of point (degrees). |
[in] | len | the length of the resulting geohash. |
[out] | geohash | the geohash. |
GeographicErr | if lat is not in [−90°, 90°]. |
std::bad_alloc | if memory for geohash can't be allocated. |
Internally, len is first put in the range [0, 18].
If lat or lon is NaN, the returned geohash is "nan".
Definition at line 19 of file dotnet/NETGeographicLib/Geohash.cpp.
|
static |
The geohash length 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, 18].
Definition at line 69 of file dotnet/NETGeographicLib/Geohash.cpp.
|
static |
The geohash length required to meet a given geographic resolution.
[in] | latres | the resolution in latitude (degrees). |
[in] | lonres | the resolution in longitude (degrees). |
The returned length is in the range [0, 18].
Definition at line 75 of file dotnet/NETGeographicLib/Geohash.cpp.
|
static |
The latitude resolution of a geohash.
[in] | len | the length of the geohash. |
Internally, len is first put in the range [0, 18].
Definition at line 57 of file dotnet/NETGeographicLib/Geohash.cpp.
|
static |
The longitude resolution of a geohash.
[in] | len | the length of the geohash. |
Internally, len is first put in the range [0, 18].
Definition at line 63 of file dotnet/NETGeographicLib/Geohash.cpp.
|
static |
Convert from a geohash to geographic coordinates.
[in] | geohash | the geohash. |
[out] | lat | latitude of point (degrees). |
[out] | lon | longitude of point (degrees). |
[out] | len | the length of the geohash. |
[in] | centerp | if true (the default) return the center of the geohash location, otherwise return the south-west corner. |
GeographicErr | if geohash contains illegal characters. |
Only the first 18 characters for geohash are considered. The case of the letters in geohash is ignored.
If the first three characters in geohash are "nan", then lat and lon are set to NaN.
Definition at line 34 of file dotnet/NETGeographicLib/Geohash.cpp.