pyinterp.geohash.encode#
- pyinterp.geohash.encode(lon: numpy.ndarray[dtype=float64, shape=(*), writable=False], lat: numpy.ndarray[dtype=float64, shape=(*), writable=False], precision: int = 12) object#
Encode geographic coordinates into geohash strings.
This function encodes the given longitude and latitude coordinates into geohash strings with the specified precision.
- Parameters:
lon – Longitudes in degrees.
lat – Latitudes in degrees.
precision – Number of characters used to encode the geohash code. Defaults to 12.
- Returns:
Geohash codes as numpy string array (dtype
S{precision}).- Raises:
ValueError – If the given precision is not within [1, 12].
ValueError – If the lon and lat vectors have different sizes.