odc.geo.gridspec.GridSpec
- class odc.geo.gridspec.GridSpec(crs, tile_shape, resolution, origin=None, flipx=False, flipy=False)[source]
Definition for a regular spatial grid.
- Parameters:
crs (
Union[str,int,CRS,CRS,Dict[str,Any]]) – Coordinate System used to define the gridtile_shape (
Union[Tuple[int,int],XY[int],Shape2d,Index2d]) – Size of each tile in pixelsresolution (
Union[float,int,Resolution]) – Size of each data point in the grid, in CRS units.Ywill usually be negative.origin (
Optional[XY[float]]) – Coordinate of a bottom-left corner of the(0,0)tile in CRS units. Default isxy_(0.0, 0.0)flipx (
bool) – whenTruegrid index for X axis increments left to rightflipy (
bool) – whenTruegrid index for Y axis increments top to bottom
Methods
__init__(crs, tile_shape, resolution[, ...])from_sample_tile(box, *[, shape, idx, ...])Construct
odc.geo.gridspec.GridSpecfrom a sample tile.geojson(*[, bbox, geopolygon])Render to GeoJSON.
idx_bounds(bounds)Convert bounds from CRS to index space.
pt2idx(x, y)Compute tile index from a point.
tile_geobox(tile_index)Tile geobox.
tiles(bounds[, geobox_cache])Query tiles overlapping with bounding box.
tiles_from_geopolygon(geopolygon[, geobox_cache])Query tiles overlapping with a given polygon.
web_tiles(zoom[, npix])Construct
GridSpecthat matches slippy tiles.Attributes
Pixel boundary alignment.
List of dimension names of the grid spec.
Tile shape in pixels (Y,X order, like numpy).