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 aResolution
object.crs (
Union
[str
,CRS
,CRS
,Dict
[str
,Any
],None
]) – CRS to use, if different from the geopolygonanchor (
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