I am able to retrieve raw raster data from a PostGIS raster in a PostgreSQL database using SQL Alchmey. I can get the raw data directly from the database. Now I would like to create a geoTIFF file from the raw data. Here is the raw raster data from the database.
The above image is a screenshot of the database table that I am accessing through SQL Alchemy. Is there a way that I can create a geotiff from this raw data using gdal in python? I have looked for a similar workflow, but couldn't find any examples on creating a tiff directly from raw raster data.