9

I am using the following command to load a raster into a postgres database:

raster2pgsql -I -C -e -Y -F -s 3086 -I -C -M myraster.tif myraster -F -t 30x30 | psql -U postgres -d database -h localhost -p 5432 

myraster.tif is 155M. When I try to use the raster plugin in QGIS, it takes a very long time to load (15-20 minutes). I'm not sure if there is anything that I can do to speed up this, or if there is an alternative approach to viewing rasters. All I want to be able to do is to quickly view the raster and check that it lines up properly with the vector data stored in the database. (The vector data displays very quickly in contrast.) At the moment, QGIS freezes up and when it displays the raster. It just shows a black square and changing the colorscale is not feasible due to the fact that any interaction causes the program to freeze.

I'm not familiar with the subtleties associated with loading a raster, so perhaps there are different flags and arguments that I should be using. I realize that this is a large raster so I'm happy to resample it or similar just for display purposes (though I don't know exactly what I should do).

I'm using the latest version of the plugin wktraster in QGIS. I am connecting to a remote server to display the data. I'm using OSX with QGIS 1.8. I'm open to using any program to view the raster on any OS.

1 Answer 1

4

At the moment, postgis raster driver, part of gdal 1.9.1 stable doesn't work well, except when displaying a single raster from the table, which is not usefull for me. The developer has trunk versions with supposedly improved performance which i didn't have time to test yet, but see this post:

How to speed up Postgis raster layer display in QGIS?

2
  • Thanks for the link - the gdal driver on the server is installed from the branch; I assumes that it uses this and not the one on my laptop?
    – djq
    Commented Oct 7, 2012 at 13:17
  • 1
    It should probably be using the one thats on the server, not the one that is installed along your qgis client. I dont think that changes to raster driver have been merged to the source, which means you have to build from source found when following links from this site: libregis.org (developers blog)
    – U2ros
    Commented Oct 7, 2012 at 16:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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