pyinterp.core.geohash.encode¶
- pyinterp.core.geohash.encode(lon: Annotated[numpy.typing.NDArray[numpy.float64], '[m, 1]'], lat: Annotated[numpy.typing.NDArray[numpy.float64], '[m, 1]'], precision: SupportsInt = 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.