pyinterp.core.GeoHash#

class pyinterp.core.GeoHash(self, latitude: float, longitude: float, precision: int = 12)#

Bases: pybind11_builtins.pybind11_object

Handle GeoHash encoded in base 32.

Parameters
  • longitude – Longitude of the point.

  • latitude – Latitude of the point.

  • precision – Number of characters in the geohash. Default is 12.

Throws:

ValueError: If the precision is not in the range [1, 12].

Public Methods

area(self[, wgs])

Returns the area covered by this.

bounding_box(self)

Returns the bounding box of this GeoHash.

center(self)

Returns the center point of this GeoHash.

error_with_precision([precision])

Returns the accuracy in longitude/latitude and degrees for the given precision.

from_string(code[, round])

GeoHash from its string representation.

grid_properties(box[, precision])

Gets the property of the grid covering the given box.

neighbors(self)

Returns the eight neighbors of this GeoHash.

number_of_bits(self)

Returns the number of bits of this GeoHash.

precision(self)

Returns the precision of this GeoHash.

reduce(self)

Returns the arguments to rebuild this instance.

Special Methods

__str__(self)

Returns the string representation of this GeoHash.