pyinterp.core.geohash.int64.decode

pyinterp.core.geohash.int64.decode(hash: Annotated[numpy.typing.NDArray[numpy.uint64], '[m, 1]'], precision: SupportsInt = 64, round: bool = False) tuple[Annotated[numpy.typing.NDArray[numpy.float64], '[m, 1]'], Annotated[numpy.typing.NDArray[numpy.float64], '[m, 1]']]

Decode geohash into geographic coordinates.

This function decodes geohash codes into longitude and latitude coordinates with the specified precision. Optionally rounds the coordinates to the accuracy defined by the geohash.

Parameters:
  • hash – GeoHash code to decode.

  • precision – Required accuracy (bits).

  • round – If true, the coordinates of the point will be rounded to the accuracy defined by the GeoHash.

Returns:

Tuple of (longitudes, latitudes) of the decoded points.

Raises:

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