[GRASS-user] Export raster to PostGIS

Asim asimrp at lavabit.com
Fri Aug 26 00:47:58 PDT 2022


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20220826/5382a4f8/attachment.htm>


More information about the grass-user mailing list