Re: Issue with bounds2raster (contextily) using rasterio


geoterraimage1@...
 

You can try the following:

from rasterio.crs import CRS

raster = rio.open(
        path,
        "w",
        driver="GTiff",
        height=h,
        width=w,
        count=b,
        dtype=str(Z.dtype.name),
        crs=CRS.from_user_input('EPSG:3857'),
        transform=transform,
    )

Join main@rasterio.groups.io to automatically receive all group messages.