API¶
- class gravel.raster.Raster(array: ndarray | None = None)¶
- __init__(array: ndarray | None = None)¶
Create Raster object from 2D array
- to_numpy() ndarray ¶
Returns pixel values as 2D numpy ndarray
- property profile: RasterProfile¶
Return a Raster’s metadata as a Profile object
- property crs: CRS | None¶
Returns raster’s CRS as a pyproj.crs.CRS object
- property nodata: float | None¶
Returns raster’s nodata value
- property shape: Tuple[int, int]¶
Returns raster’s height and width as pixel number
- plot()¶
- class gravel.profiles.Profile(crs: pyproj.crs.crs.CRS | None = None)¶
- crs: CRS | None = None¶
- __init__(crs: CRS | None = None) None ¶
- class gravel.profiles.RasterProfile(crs: CRS | None = None, nodata: float | None = None, transform: Affine = Affine(1.0, 0.0, 0.0, 0.0, -1.0, 0.0))¶
RasterProfile(crs: Optional[pyproj.crs.crs.CRS] = None, nodata: Optional[float] = None, transform: affine.Affine = Affine(1.0, 0.0, 0.0, 0.0, -1.0, 0.0))
- nodata: float | None = None¶
- transform: Affine = Affine(1.0, 0.0, 0.0, 0.0, -1.0, 0.0)¶
- __init__(crs: CRS | None = None, nodata: float | None = None, transform: Affine = Affine(1.0, 0.0, 0.0, 0.0, -1.0, 0.0)) None ¶