16 double lat = 57.64911,
lon = 10.40744;
18 int maxlen = Geohash::GeohashLength(1.0
e-5);
21 cout <<
len <<
" " << geohash <<
"\n";
26 string geohash =
"u4pruydqqvj";
29 for (
unsigned i = 0;
i <= geohash.length(); ++
i) {
31 Geohash::Reverse(geohash.substr(0,
i),
lat,
lon,
len);
32 cout << setprecision(
max(0, Geohash::DecimalPrecision(len)))
33 << len <<
" " << lat <<
" " << lon <<
"\n";
37 catch (
const exception&
e) {
38 cerr <<
"Caught exception: " << e.what() <<
"\n";
Namespace for GeographicLib.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
size_t len(handle h)
Get the length of a Python object.
Header for GeographicLib::Geohash class.