This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#standardSQL | |
CREATE TEMPORARY FUNCTION geohashEncode(latitude FLOAT64, logitude FLOAT64, precision FLOAT64) | |
RETURNS STRING | |
LANGUAGE js | |
AS """ | |
var Geohash = {}; | |
/* (Geohash-specific) Base32 map */ | |
Geohash.base32 = '0123456789bcdefghjkmnpqrstuvwxyz'; | |
lat = Number(latitude); |