Bug report #15943

Hillshade renderer artifacts

Added by Paolo Cavallini almost 8 years ago. Updated over 6 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:Symbology
Affected QGIS version:3.0.0 Regression?:No
Operating System:Debian Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:23859

Description

Borders of cells are visible. See attached.
Possibly more apparent in master, but present since the beginning.

hillshade.png (221 KB) Paolo Cavallini, 2016-12-06 12:22 PM

nn vs bilinear.png (126 KB) Johannes Kroeger, 2018-01-12 10:56 AM

History

#1 Updated by Giovanni Manghi over 7 years ago

  • Regression? set to No
  • Easy fix? set to No

#2 Updated by Johannes Kroeger almost 7 years ago

That's a highly zoomed-in view (much closer than 1:1 scale) of a hillshaded raster with Nearest Neighbor resampling. I am not sure if this is a bug.

A simple workaround (or solution?) is to set the resampling to Bilinear or Cubic.

#3 Updated by Johannes Kroeger almost 7 years ago

Example image at about 3:1 scale.

#4 Updated by Alister Hood almost 7 years ago

  • Description updated (diff)

Also affects 2.18.16.
I am pretty sure we can call it a bug - there is no reason a hillshade should need cell borders, and if you create an actual hillshade layer (e.g. using the gdal hillshade tool) it won't have them.

#5 Updated by Alister Hood almost 7 years ago

Johannes Kroeger wrote:

A simple workaround (or solution?) is to set the resampling to Bilinear or Cubic.

It is a workaround, not a solution ;)

Also, unless I'm missing something there is no way to get rid of these artefacts in a 3D map in master.

#6 Updated by Alister Hood almost 7 years ago

Alister Hood wrote:

there is no reason a hillshade should need cell borders

Except they aren't borders as such, they are hillshading applied at the edges of the individual raster cells. I haven't looked at how hillshading algorithms work in gdal or wherever - maybe they actually incorporate smoothing, in which case the solution here would probably be to always enable smoothing for the hillshade renderer.

#7 Updated by Giovanni Manghi over 6 years ago

  • Affected QGIS version changed from master to 3.0.0

Also available in: Atom PDF