I am trying to export a PostgreSQL table containing raster data to a GeoTIFF file using gdal_translate.
I am looking for assistance on how to specify the subdataset in the gdal_translate command when dealing with raster data stored in a PostgreSQL database.
My command is as follows:
gdal_translate -of GTiff PG:"host=dem-db port=5432 dbname=dem user=postgres password=passwd" output.tif
However, I encountered the following error: “Input file contains subdatasets. Please, select one of them for reading.” Could someone please guide me on how to select one subdataset for exporting to the GeoTIFF file?
I also tried the solution in this link that they recommended sds
but it seems one of the datasets is corrupted and as the result this command doesn’t work at all. [ I can not delete this dataset ]
Also I couldn’t find anything useful in the Gdal doc .
Thank you in advance!
Alireza sherkatmaesum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.