pyinterp.core.geohash.encode

pyinterp.core.geohash.encode(*args, **kwargs)

Overloaded function.

  1. encode(point: pyinterp.core.geodetic.Point, precision: int = 12) -> handle

Encode a point into geohash code with the given precision.

Parameters
Returns

geohash code.

Return type

int

Raises

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

  1. 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
Returns

geohash codes.

Return type

numpy.ndarray

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

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