odc.geo.overlap.compute_output_geobox

odc.geo.overlap.compute_output_geobox(gbox, crs, *, resolution='auto', tight=False, round_resolution=None)[source]

Compute output GeoBox.

Find best fitting, axis aligned GeoBox in a different coordinate reference given source GeoBox on input.

Parameters:
  • gbox (Union[GeoBox, GCPGeoBox]) – Source geobox.

  • crs (Union[str, int, CRS, CRS, Dict[str, Any]]) – Desired CRS of the output

  • resolution (Union[float, int, Resolution, Literal['auto', 'fit', 'same']]) –

    • “same” use exactly the same resolution as src

    • ”fit” use center pixel to determine scale change between the two

    • ”auto” is to use the same resolution on the output if CRS units are the same
      between the source and destination and otherwise use “fit”
    • Else resolution in the units of the output crs

  • tight (bool) – By default output pixel grid is adjusted to align pixel edges to X/Y axis, suppling tight=True produces unaligned geobox on the output.

  • round_resolution (Union[None, bool, Callable[[float, str], float]]) – round_resolution(res: float, units: str) -> float

Return type:

GeoBox

Returns:

Similar resolution, axis aligned geobox that fully encloses source one but in a different projection.