4

i've been importing some digital orthophoto geotif files into postgis 2.0.1 via raster2pgsql tool (i also made 3 levels of an overview table - pyramid). Then i tried to import the layer into qgis via the postgis load raster plugin. It works, but the speed seems so slow its unusable at the moment.

I found a post somewhere about this being a GDAL issue, but i couldnt find if a solution has been found yet. Did anyone get across this?

Thanks

underdark
  • 84,148
  • 21
  • 231
  • 413
U2ros
  • 5,117
  • 5
  • 29
  • 51
  • how big are the images you are loading into postgis raster? – Mapperz Aug 30 '12 at 16:10
  • 3000x3000 pixels are the original geotiffs, imported tile size was 128x128 then 256x256px, made no difference. Also i compiled postgis with gsL 1.9.1 if thats any help. Are you getting smooth performance? – U2ros Aug 30 '12 at 18:12
  • U2ros - I am having similar problems. :-( A few tiny tiles (sort of) work. Bigger tiles; suddenly they are appearing in the wrong area of the world, for no reason. With more tiles; they're not displaying at all. 192 rows of 1000x1000 tiles (filled with 1) -> postgres grinds to a halt, qgis locks up. This is on a very fast computer. Outputting one of those tiles to PNG is almost instantaneous. :-| –  Dec 04 '12 at 15:07

3 Answers3

3

Is the GDAL driver that is slow, not qgis itself. Anyway the driver is being improved.

Giovanni Manghi
  • 3,907
  • 16
  • 24
  • http://libregis.org/2012/08/25/updating-gdal-postgis-raster-driver/ – Giovanni Manghi Aug 30 '12 at 18:51
  • 1
    Thanks, i ll wait for an official version tho. In the meantime, i ll implement a simple file-based image pyramid – U2ros Aug 31 '12 at 11:52
  • Blah, file based pyramid wont cut it. Too slow – U2ros Sep 01 '12 at 05:55
  • Okay, i tried with a latest stable build, successfully built it, rebuilt postgis extension with it, and installed it. Performance is unchanged – U2ros Sep 01 '12 at 06:37
  • Then let the driver developers know about the lack of improvements. – Giovanni Manghi Sep 01 '12 at 14:01
  • I ve posted a message on his blog. anyway, after a day of testing on a clean machine with the latest GDAL (31.8.2012): It only works if i store 1 raster in the database - 1 original tile... and if i use DB manager, not the plugin to add it into qgis table of contents. Any other combination (multiple rasters, db manager or plugin) does not work – U2ros Sep 01 '12 at 17:03
2

I am the GDAL PostGIS Raster driver developer. I know this question is old, but with the last version of the driver commited to GDAL trunk, data visualization with QGIS should be much faster. You may want to give it a try.

Jorge Arévalo
  • 1,739
  • 2
  • 16
  • 32
0

The PostGIS raster driver in GDAL does not support overviews. Also, go for smaller tile sizes. In your case, 30x30 or 50x50 is better than 128x128 or 256x256.

dustymugs
  • 1,186
  • 6
  • 5