pyinterp.core.geohash.int64.encode

pyinterp.core.geohash.int64.encode(lon: Annotated[numpy.typing.NDArray[numpy.float64], '[m, 1]'], lat: Annotated[numpy.typing.NDArray[numpy.float64], '[m, 1]'], precision: SupportsInt = 64) Annotated[numpy.typing.NDArray[numpy.uint64], '[m, 1]']

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.

Returns:

Geohash codes.

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

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