[OSGeo Africa] Loading a Raster to PostGIS

Chris Smit gis at geostratics.co.za
Tue Apr 29 02:35:00 PDT 2014


Hi all,

I am having difficulties with loading a DEM file to PostGIS via the 
raster2pgsql tool. Could someone shed some light on how to do this?
Some additional information, I have used the following syntax to add the 
DEM to PostGIS:

raster2pgsql -s 2048 -f rast -I -C -Y C:\Users\GIS\Desktop\Project\DEM.tif > DEM.sql
psql -h localhost -U postgres -d Topography -f DEM.sql


After running the above syntax in the command line, I receive "COMMIT". 
This creates a new table in the default Public schema (have tried to add 
it to another schema using the /someschema.sometable/ syntax, but this 
returns an error stating the schema does not exist). In PostGIS, the 
table is created but does not seem to contain information. Also, I am 
unable to open or view the DEM in QGIS.

Thanks in advance
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/africa/attachments/20140429/68e40b10/attachment.html>


More information about the Africa mailing list