healpix_geo.auto.box_coverage#

healpix_geo.auto.box_coverage(center, size, angle, grid, *, flat=True)#

Search the cells covering the given box.

Parameters:
  • center (numpy.ndarray or tuple of float) – The center of the box, either as a 2-sized array or as a 2-tuple of float.

  • size (numpy.ndarray or tuple of float) – The size of the box, in degree.

  • angle (float) – The angle by which the box is rotated, in degree.

  • grid (Grid) – The definition of the HEALPix grid.

  • flat (bool, default: True) – If True, the cells returned will all be at the passed depth.

Returns:

  • cell_ids (numpy.ndarray) – The rasterized cell ids.

  • levels (numpy.ndarray) – The refinement levels of the cell ids. If flat is True, these will all have the same value. Only returned for nested and ring.

  • fully_covered (numpy.ndarray) – Boolean array marking whether the cells are fully covered by the box.