3

I'm using the Smoothing (gaussian) and Smoothing (mean) tools in the QGIS Orfeo toolbox to blur a hillshade raster I've generated. However, they both come out with a thick black border at the edge of the DEM (essentially at sea level as well as at the edge of the DEM where I clipped it).

What I'd like to know is:

A) Can I prevent this somehow? B) If not, is there a tool I could use to easily remove it?

I've also tried Smoothing (anidif) but it causes a lot of unwanted artifacts within the data - it causes the raster to appear to be divided into slightly discontinuous horizontal strips.

Screenshots: Raw input, and Smoothing (gaussian) output respectively. The black border with smoothing (mean) is a lot thinner, but the results of that are also inferior to the gaussian smoothing.

Raw/input hillshade Smoothing (gaussian) output

  • 2
    I'm not familiar with Orfeo smoothing, but I suspect your 'sea' cells are nodata. What do you see with the Value tool plugin if you hover the mouse over an area of sea? Is it 'No Data' or a number like -32767? That would clarify if the nodata value is not set, or whether the algorithm doesn't handle nodata / voids. – Steven Kay Sep 16 '17 at 20:47
  • Hi Steven. I just had a chance to check, and the black (sea) cells indeed have large negative values. They range from -46 or so near the edge of the hillshaded area, to -9999ish toward the sea. The white cells out to sea all have the value "nodata." Might this be an issue with how I generated the hillshade? I don't recall whether I checked a nodata value when I interpolated this hillshade layer from the coarser, raw SRTM data. If you've got any take on this it would be very helpful! – Jbphilly Sep 18 '17 at 21:33
  • 1
    I don't think that the ITK algorithms used in Orfeo here (MeanImageFilter or anysotropic diffusion handle nodata/voids internally. It would be a good addition to these functions. – Manuel Grizonnet Sep 21 '17 at 13:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.