0

I tried to use Sun's denoise algorithm for elevation data via the RCP project from Jake but I cannot observe any changes to the TIF file:

python raster_chunk_processing.py -m mdenoise -t 0.9 -n 10 -v 50 -s 1500 -o 25 srtm_39_03.tif srtm_39_03_denoise.tif

I downloaded the elevation TIF file from CGIAR (download it here and unzip). I visualized the file using gdaldem:

gdaldem color-relief srtm_39_03.tif color-relief.txt srtm_39_03_color.tif

Where color-relief.txt is:

-32767,100,0,0
0,0,20,255
100,60,70,250
200,122,255,160
500,0,170,52
900,240,255,63
1200,255,195,63
1500,255,130,63
1800,255,98,63
2100,255,72,63
2600,255,63,203
3000,180,180,180
3600,white

Now when I compare the original TIF file with the produced TIF file (using gdaldem color-relief) I cannot see any differences, i.e. it has no effect!? And using a different method like -m blur_gauss I can see a difference. Also using the mdenoise tool directly does not lead to a difference. And I had the same problem that nothing changes with a completely different implementation of mdenoise.

What did I do wrong for -m mdenoise? Maybe I use a wrong projection like described here? But not sure yet how to fix this.

1 Answer 1

0

I somehow have to convert the lat,lon into the same unit as the elevation, i.e. into meters as written here:

you don’t need to re-project your DEMs before making shaded relief. Instead, I said, you can just use the magic scaling number 111120 to convert from degrees to metres.

and also indicated here:

Note that the input DEM should be in a projected coordinate system (e.g. UTM) and in a Whitebox GAT or ArcGIS ASCII raster format.

But I couldn't get it working with gdal_translate or gdalwarp. Maybe someone can still solve this mystery for me :)

Instead I used yet another implementation from the whitebox repository successfully:

./target/release/whitebox_tools -r=FeaturePreservingSmoothing -i srtm_39_03.tif -o ./out/srtm_39_03_whitebox.tif

See documentation and video.

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.