As r.out.gdal uses GDAL library, it is bound to GDAL limitations.
According to the GDAL PG documentation, PG rasters are read-only:
https://gdal.org/drivers/raster/postgisraster.html#raster-postgisraster
Thus you can read but can not write PG rasters with GDAL.

Māris.

piektd., 2022. g. 26. aug., plkst. 10:48 — lietotājs Asim via
grass-user (<grass-user@lists.osgeo.org>) rakstīja:
>
> Hello
>
> Is it possible to export a raster map created using r.water.outlet to PostGIS 
> in GRASS 78?  The documentation indicates using r.out.gdal with PostGISRaster 
> as format.  The command I'm trying is the following:
>
>    r.out.gdal input=mywatershed format=PostGISRaster output=mywatershed 
> createopt="PG:dbname='mydb'"
>
> The postgresql server is running with locally and the database "mydb" can be 
> accessed without having to enter a password using psql client.  However, this 
> command fails with the error:
>
>    ERROR 6: PostGISRasterDataset::CreateCopy() only works on source datasets 
> that are PostGISRaster
>
> Is something wrong in the command?  The error message seems to suggest that 
> it is impossible to export the raster map created with r.water.outlet to 
> PostGIS because it is not sourced from PostGIS.  Can someone please confirm?
>
> Asim
>
> _______________________________________________
> grass-user mailing list
> grass-user@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to