Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I tried to load a raster GeoTIFF image to a PostGIS database using "raster2pgsql" following the OpenGeo Suite Manual. The command I used is:

C:\>raster2pgsql -s 4283 -I -C -M "C:\Program Files\GeoServer 2.2.5\data_dir\data\gcur\interp_clipped.tif" -F public.myraster | psql -d MyPostGISDB -h localhost -p 5432 -U postgres

The table was successfully created and found in "pgAdmin III" but not accessible through QGIS. When I tried to load PostGIS layers in QGIS, it only showed "raster_columns" and not the "myraster" table. In the PostGIS Manager window in QGIS, this table is marked as plain table and with "No Geometry".

Can anyone give me some hints about it?

share|improve this question
    
It didn't work either with ERDAS IMG converted from the original .tif file through GDAL_TRANSLATE command. –  alextc Mar 22 '13 at 3:27
1  
Did you use "Add PostGIS raster layer" selection, that other one works only with vectors ("Add Postgis layer") –  simplexio Mar 22 '13 at 13:45

1 Answer 1

Do not use the regular "Add PostGIS Layers", it will not show your raster table. The plugin "Load Postgis Raster to QGIS" was not updated to QGIS v.2.0, so it won't work either.

In QGIS v.2.6 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.

Note: There was a bug on loading PostGIS raster layers to QGIS, which was solved in v.2.6: http://hub.qgis.org/issues/8628 So, update your QGIS to v. >= 2.6

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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