geohash() Query Function

Important

This feature is not supported within the Humio Community Edition

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

Parameters

Name

Type

Required

Default

Description

lat

string

No

ip.lat

The field to use for latitude.

lon

string

No

ip.lon

The field to use for longitude.

precision

number

No

12

The precision to use in the calculation. Usually 12 is enough.

as

string

No

_geohash

The name of the field that is produced by the function.

The implied parameter is geohash.

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.