datacube.utils.geometry.GeoBox#
- class datacube.utils.geometry.GeoBox(width, height, affine, crs)[source]#
Defines the location and resolution of a rectangular grid of data, including it’s
CRS
.- Parameters:
Methods
__init__
(width, height, affine, crs)buffered
(ybuff, xbuff)Produce a tile buffered by ybuff, xbuff (in CRS units)
from_geopolygon
(geopolygon, resolution[, ...])is_empty
()xr_coords
([with_crs])Dictionary of Coordinates in xarray format
Attributes
Alignment of pixel boundaries in Y,X dimensions
dict of coordinate labels
dict of coordinate labels
crs
List of dimension names of the GeoBox
List of dimension names of the GeoBox
GeoBox extent in EPSG:4326
Resolution in Y,X dimensions
shape
transform
- property coordinates: Dict[str, Coordinate]#
dict of coordinate labels
- property coords: Dict[str, Coordinate]#
dict of coordinate labels
- xr_coords(with_crs=False)[source]#
Dictionary of Coordinates in xarray format
- Parameters:
with_crs (
Union
[bool
,str
]) – If True include netcdf/cf style CRS Coordinate with default name ‘spatial_ref’, if with_crs is a string then treat the string as a name of the coordinate.- Return type:
Returns#
OrderedDict name:str -> xr.DataArray
where names are either y,x for projected or latitude, longitude for geographic.