odc.geo.geobox.GeoBox.from_geopolygon

static GeoBox.from_geopolygon(geopolygon, resolution, crs=None, anchor=AnchorEnum.EDGE, tol=0.01)[source]

Construct GeoBox from a polygon.

Parameters
  • resolution (Union[float, int, Resolution]) – Either a single number or a Resolution object.

  • crs (Union[str, CRS, CRS, Dict[str, Any], None]) – CRS to use, if different from the geopolygon

  • anchor (Union[AnchorEnum, XY[float]]) –

    By default snaps grid such that pixel edges fall on X/Y axis.

    param tol

    Fraction of a pixel that can be ignored, defaults to 1/100. Bounding box of the output geobox is allowed to be smaller than supplied bounding box by that amount.

Return type

GeoBox