pyinterp.core.geohash.encode

pyinterp.core.geohash.encode(lon: numpy.ndarray[numpy.float64[m, 1]], lat: numpy.ndarray[numpy.float64[m, 1]], precision: int = 12) numpy.ndarray

Encode coordinates into geohash with the given precision.

Parameters:
  • lon – Longitudes in degrees.

  • lat – Latitudes in degrees.

  • precision – Number of bits used to encode the geohash code. Defaults to 12.

Returns:

Geohash codes.

Raises:
  • ValueError – If the given precision is not within [1, 12].

  • ValueError – If the lon and lat vectors have different sizes.