Definition at line 720 of file lwalgorithm.c.
729 size_t hashlen = strlen(geohash);
737 char c = tolower(geohash[i]);
740 char *base32_pos = strchr(
base32, c);
743 lwerror(
"%s: Invalid character '%c'", __func__, geohash[i]);
746 char cd = base32_pos -
base32;
748 for (
size_t j = 0; j < 5; j++)
750 const char bits[] = {16, 8, 4, 2, 1};
754 lon[!(cd & mask)] = (lon[0] + lon[1]) / 2;
758 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().