1

I recently set up an Ubuntu Server as a Postgres/PostGIS database server. In an effort to serve a collection of aerial photos to my colleagues, I loaded 608 GeoTiffs (non-overlapping 1km tiles each ~60mb) into a Postgres/PostGIS (Postgres version 9.3) using raster2pgsql. Six overview levels were selected using the -l switch to speed up rendering in QGIS. The following was used to load the rasters into the dbase:

raster2pgsql -s 26917 -I -C -M -l 2,4,8,16,32,64 *.tif -F -t 100x100 imagery.aerials | psql -d GISDB postgres

The process ran successfully without any errors. Using DB Manager in QGIS (version 2.8.1), the resulting raster dataset (imagery.aerials) loads. However, when zoomed out to the maximum extent (or anything beyond 1:30,000), white lines appear on the imagery. These are presumably NoData areas, but there are absolutely no gaps in the raster dataset. Furthermore, when zoomed in those lines do not appear. For example, see this image (1:38,000).

enter image description here

Here is the gdalinfo for one of the rasters (if that helps):

enter image description here

Can anyone explain what causes the appearance of these lines, and how to either remove them or prevent them from appearing?

Furthermore, is this a QGIS issue or a Postgres/Postgis issue?

  • Interesting. I ran the raster2pgsql again with only a few overview selected, and no lines are rendered in QGIS. However, this makes it very sluggish in QGIS. raster2pgsql -s 26917 -I -C -M -l 2,4,8,16 *.tif -F -t 100x100 imagery.swoop2010_2 | psql -d GISDB postgres – Cliff Aug 13 '15 at 12:51
3

If the lines "go away" when you zoom in, this isn't a data loss problem, it's a rendering problem, so the issue is in QGIS.

  • You're probably correct. Any possible workaround or settings to adjust in QGIS so that the data render properly at max extent? Note that I also tried it on QGIS version 2.10 and had the same problem, so this issue (if it is a QGIS issue) has not been resolved in the latest release. – Cliff Aug 12 '15 at 22:40
  • Just a thought, do the original rasters need to be internally tiled, compressed, and/or have external overviews computed prior to being loaded into the DB? Check the gdalinfo output added to OP. – Cliff Aug 13 '15 at 12:54
0

Could it be that QGIS is displaying the img pyramids instead of the actual rasters? I had the same problem in ArcGis and in my case the lines were there only when I loaded pyramids, but disappeared when zooming because, in doing so, arcgis switched to the original, full resolution, image.

  • Were you loading rasters from PosGIS? QGIS is loading the PostGIS raster, which then calls up the overview tables. I now suspect that I may need to compress/internal tile/overview original images, though not sure. – Cliff Aug 13 '15 at 13:07

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.