odc.geo.geobox.GeoBox.from_geopolygon
- static GeoBox.from_geopolygon(geopolygon, resolution=None, crs=None, align=None, *, shape=None, tight=False, anchor='default', tol=0.01)[source]
Construct
GeoBoxfrom a polygon.- Parameters:
resolution (
Union[float,int,Resolution,None]) – Either a single number or aResolutionobject.shape (
Union[Tuple[int,int],XY[int],Shape2d,Index2d,int,None]) – Span that many pixels, if it’s a single number then span that many pixels along the longest dimension, other dimension will be computed to maintain roughly square pixels.crs (
Union[str,int,CRS,CRS,Dict[str,Any],Unset,None]) – CRS to use, if different from the geopolygonalign (
Optional[XY[float]]) – Deprecated: please switch toanchor=anchor (
Union[AnchorEnum,XY[float],float,Literal['center'],Literal['centre'],Literal['edge'],Literal['floating'],Literal['default']]) – By default snaps grid such that pixel edges fall on X/Y axis.tol (
float) – 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.tight (
bool) – Supplyingtight=Trueturns off pixel snapping.
- Return type: