Bug report #4347

raster and vector rendering mismatched by 1 pixel at some zoom levels

Added by Alister Hood over 12 years ago. Updated over 11 years ago.

Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data:No Copied to github as #:14284


I'm not 100% sure if this counts as a bug:

Depending on the zoom level, a raster image and a vector with the same extent (created using gdaltindex) are not quite rendered in the same location. Usually they are out by 1 pixel, as in the attached screenshot, although the other day I saw 2 pixels.

When I first saw this I decided it was an issue with the raster rendering, not the vector rendering, but I can't remember why. Maybe because sometimes gaps are visible between adjacent raster layers or something.

Radim mentioned on the mailing list the other day that on-the-fly raster reprojection uses rounding if the difference is less than one pixel, so I thought it might be a problem with that, but it still shows up when not using OTF reprojection.

raster_vector_displacement.PNG (4.04 KB) Alister Hood, 2011-10-04 11:16 PM


#1 Updated by Giovanni Manghi over 12 years ago

  • Target version set to Version 1.7.4

#2 Updated by Paolo Cavallini about 12 years ago

  • Crashes QGIS or corrupts data set to No
  • Affected QGIS version set to master
  • Target version changed from Version 1.7.4 to Version 1.8.0

#3 Updated by Paolo Cavallini over 11 years ago

  • Target version changed from Version 1.8.0 to Version 2.0.0

#4 Updated by Giovanni Manghi over 11 years ago

  • Resolution set to invalid
  • Status changed from Open to Closed

It does not seems a qgis issue as also on other gis sw it looks the same.

#5 Updated by Alister Hood over 11 years ago

Which other gis?
I think there is a "bug" in it/them as well.

Also available in: Atom PDF