Definition at line 721 of file lwalgorithm.c.
730 size_t hashlen = strlen(geohash);
738 char c = tolower(geohash[i]);
741 char *base32_pos = strchr(
base32, c);
744 lwerror(
"%s: Invalid character '%c'", __func__, geohash[i]);
747 char cd = base32_pos -
base32;
749 for (
size_t j = 0; j < 5; j++)
751 const char bits[] = {16, 8, 4, 2, 1};
755 lon[!(cd & mask)] = (lon[0] + lon[1]) / 2;
759 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().