1

I have a DEM with a spatial resolution of 2 meters with a lot of areas with no data. I want to fill those gaps in order to use the whole DEM. I used the 'close gaps' tool in QGIS (it's a SAGA tool) after resampling (because I don't need a 2 meters resolution). I tried the various methods to close gaps that the software offers but I always have the same result.

For every image I get, I have some artefacts appearing (see image below in the red circle). I know that those artefacts are due to sparse pixels.

Picture number 1 is my raw DEM, number 2 is after resampling and closing gaps and number 3 is the same with after hillshading. The artefacts look like volcanoes.

Picture number 1 is my raw DEM, number 2 is after resampling and closing gaps and number 3 is the same with after hillshading. The artefacts look like volcanoes.

My question is, do you know any filter that could remove those small pixels or if there is any way that I get a DEM without the artefacts ? So far I didn't get anything with the filters that I used ('Gaussian filter', 'Remove small pixel clumps'...).

Edit

Here is my data : class : RasterLayer dimensions : 7740, 7228, 55944720 (nrow, ncol, ncell) resolution : 2, 2 (x, y) extent : 312798, 327254, 5072488, 5087968 (xmin, xmax, ymin, ymax) coord. ref. : +proj=utm +zone=32 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0 data source : C:\Users\charlie.serrano\Desktop\Cartographie_risques\MNT_Alpes\Test\mnt_test.tif names : mnt_test values : 582.6512, 3323.351 (min, max) No data values : nan

I have no error messages, the filter works to the end but nothing has been filtered.

My workflow is quite simple I load the raster into QGIS and then apply directly the filter on it before resempling it.

My aim is to fill the blank areas with data without big artefacts.

  • If you have not done so yet, will you try Erosion, before closing gaps? I think you can find it in SAGA - Morphological Filter (there are several variations according to which project that algorithm came from). Erosion is originally for binary (b/w) data to remove salt noise, and when it is applied to grey-scale image it is (sometimes) called minimum filter. – Kazuhito Oct 15 '18 at 10:02
  • First I should have said that I am applying the filter before any resampling or anything else. So I tried also the 'Erosion' tool and it is not changing anything. My output raster is exaclty the same as my input raster. – C.Serrano Oct 15 '18 at 15:26
  • Your question was relatively simple and straightforward: you requested potentially capable filters. But as far as I can see, none of those you had tried had any appreciable effect on the data. As you can surmise, it would not be an issue of filter selection. Please edit your question and add information; need to fully examine your data, error messages (if any), and your workflow. – Kazuhito Oct 16 '18 at 12:13
  • Thanks! Could you also add nodata setting? – Kazuhito Oct 17 '18 at 10:50
  • I edited it with the no data. – C.Serrano Oct 17 '18 at 11:44

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.