pyinterp.geohash.bounding_boxes#
- pyinterp.geohash.bounding_boxes(*args, **kwargs)#
Overloaded function.
bounding_boxes(box: pyinterp.core.geodetic.Box | None = None, precision: typing.SupportsInt = 1) -> numpy.ndarray
Get all geohash codes within a bounding box.
This function returns all geohash codes contained in the defined bounding box at the specified precision level.
- Parameters:
box – Bounding box defining the region. Defaults to the global bounding box.
precision – Required accuracy level. Defaults to 1.
- Returns:
Array of GeoHash codes.
- Raises:
ValueError – If the given precision is not within [1, 12].
MemoryError – If the memory is not sufficient to store the result.
bounding_boxes(polygon: pyinterp.core.geodetic.Polygon, precision: typing.SupportsInt = 1, num_threads: typing.SupportsInt = 0) -> numpy.ndarray
Get all geohash codes within a polygon.
This function returns all geohash codes contained in the defined polygon at the specified precision level. Supports parallel computation using multiple threads.
- Parameters:
polygon – Polygon defining the region.
precision – Required accuracy level. Defaults to 1.
num_threads – Number of threads to use for computation. If 0, all CPUs are used. If 1, no parallel computing is used (useful for debugging). Defaults to 0.
- Returns:
Array of GeoHash codes.
- Raises:
ValueError – If the given precision is not within [1, 12].
MemoryError – If the memory is not sufficient to store the result.
bounding_boxes(polygons: pyinterp.core.geodetic.MultiPolygon, precision: typing.SupportsInt = 1, num_threads: typing.SupportsInt = 0) -> numpy.ndarray
Get all geohash codes within one or more polygons.
This function returns all geohash codes contained in one or more defined polygons at the specified precision level. Supports parallel computation using multiple threads.
- Parameters:
polygons – MultiPolygon defining one or more regions.
precision – Required accuracy level. Defaults to 1.
num_threads – Number of threads to use for computation. If 0, all CPUs are used. If 1, no parallel computing is used (useful for debugging). Defaults to 0.
- Returns:
Array of GeoHash codes.
- Raises:
ValueError – If the given precision is not within [1, 12].
MemoryError – If the memory is not sufficient to store the result.