Definition at line 718 of file lwalgorithm.c.
727 size_t hashlen = strlen(geohash);
735 char c = tolower(geohash[i]);
738 char *base32_pos = strchr(
base32, c);
741 lwerror(
"%s: Invalid character '%c'", __func__, geohash[i]);
744 char cd = base32_pos -
base32;
746 for (
size_t j = 0; j < 5; j++)
748 const char bits[] = {16, 8, 4, 2, 1};
752 lon[!(cd & mask)] = (lon[0] + lon[1]) / 2;
756 lat[!(cd & mask)] = (lat[0] + lat[1]) / 2;
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
References base32, lwerror(), and precision.
Referenced by parse_geohash(), and test_geohash_bbox().