[GRASS-user] Export raster to PostGIS

Markus Neteler neteler at osgeo.org
Sun Aug 28 08:17:00 PDT 2022


Hi,

Stefan Blumentrath <Stefan.Blumentrath at nina.no> schrieb am So., 28. Aug.
2022, 15:27:

> Hi Asim,
>
> You could try to use raster2pgsql after making sure you have the
> GDAL-GRASS plugin installed.
>

FYI:
This GDAL-GRASS driver you find here:

https://github.com/OSGeo/gdal-grass

Markus


> Then you should be able to load GRASS GIS raster maps directly into
> PostGIS by pointing to the header of your GRASS GIS maps. Something like:
> raster2pgsql -s 4326 -C -l 2,4 -I -F -t 2700x2700
> /your_grassdb/location/mapset/cellhd/your_raster_map output_pg_shema_name.
> output_table_name | psql -h your_host -p 5432 -U postgres -d
> your_pg_database
> (obviously you have to adjust options and flags of raster2pgsql to your
> case...).
>
> Hope that helps.
>
> Cheers
> Stefan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20220828/fa62596a/attachment.htm>


More information about the grass-user mailing list