pyinterp.geohash.index.GeoHash.encode

GeoHash.encode(lon: numpy.ndarray, lat: numpy.ndarray, normalize: bool = True, unicode: bool = False) numpy.ndarray[source]

Encode points into geohash with the given precision

Parameters
  • lon (numpy.ndarray) – Longitudes in degrees of the positions to be encoded.

  • lat (numpy.ndarray) – Latitudes in degrees of the positions to be encoded.

  • normalize (bool) – If true, normalize longitude between [-180, 180[

  • unicode (bool) – If true, transforms GeoHash codes into unicode strings.

Returns

geohash code for each coordinates of the points read from the vectors provided.

Return type

numpy.ndarray