Calculates a geohash value given two fields representing latitude and longitude.

ParameterTypeRequiredDefaultDescription
asstringfalse_geohashThe name of the field that is produced by the function.
latstringfalseip.latThe field to use for latitude.
lonstringfalseip.lonThe field to use for longitude.
precisionnumberfalse12The precision to use in the calculation. Usually 12 is enough.

Examples

Calculate the geohash value of a set of coordinates.

humio
geohash(lat=myLatField, lon=myLonField)

This example computes the geohash for Greenwich:

humio
lat:=51.477928 | lon:=0.0 | g:=geohash(lat=lat, lon=lon)

The result is gcpuzgrbxvrc.