pyinterp.core.geohash.bounding_boxes#

pyinterp.core.geohash.bounding_boxes(*args, **kwargs)#

Overloaded function.

  1. bounding_boxes(box: Optional[pyinterp.core.geodetic.Box] = None, precision: int = 1) -> numpy.ndarray

Returns all geohash codes contained in the defined bounding box.

Parameters:
  • box – Bounding box. Default to the global bounding box.

  • precision – Required accuracy. Defaults to 1.

Returns:

GeoHash codes.

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

  • MemoryError – If the memory is not sufficient to store the result.

  1. bounding_boxes(polygon: pyinterp.core.geodetic.Polygon, precision: int = 1, num_threads: int = 0) -> numpy.ndarray

Returns all geohash codes contained in the defined polygon.

Parameters:
  • polygon – Polygon.

  • precision – Required accuracy. Defaults to 1.

  • num_threads – The number of threads to use for the computation. If 0 all CPUs are used. If 1 is given, no parallel computing code is used at all, which is useful for debugging. Defaults to 0.

Returns:

GeoHash codes.

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

  • MemoryError – If the memory is not sufficient to store the result.

  1. bounding_boxes(polygons: pyinterp.core.geodetic.MultiPolygon, precision: int = 1, num_threads: int = 0) -> numpy.ndarray

Returns all geohash codes contained in one or more defined polygons.

Parameters:
  • polygons – MultiPolygon.

  • precision – Required accuracy. Defaults to 1.

  • num_threads – The number of threads to use for the computation. If 0 all CPUs are used. If 1 is given, no parallel computing code is used at all, which is useful for debugging. Defaults to 0.

Returns:

GeoHash codes.

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

  • MemoryError – If the memory is not sufficient to store the result.