10

I have imported a raster tif image into PostgreSQL with this command:

raster2pgsql -s 32643 -I -M filepath.tif -F -t 100x100 public.databassename > filepath.sql

And imported the output SQL file inside the PostgreSQL database running this:

psql -U postgres -d databasename -f filepath.sql

After connecting to this database in QGIS, I am not able to visualise the tif image due to missing geometry content. Please help me out to visualise the tif raster imagery in QGIS.

23

In QGIS 2.6.1, go to menu Database->DB Manager->DB Manager, set the database connection and you will see the raster table. You can drag and drop it or right click and select Add to canvas.

From your description of the problem, you are using the regular "Add PostGIS Layers", which will not show your raster table, since it is for vectors and alphanumeric tables.

  • What about Leaflet ? Do you know a way to add postgres rasters to Leaflet Map ? – Capan Jul 15 '18 at 9:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.