Open hugolpz opened 9 years ago
Results are buggy. Need to create a test project to find the right parameters:
mkdir -p ./scripts
curl -L -C - 'http://www.cs.cf.ac.uk/meshfiltering/index_files/Doc/mdsource.zip' -o './scripts/mdsource.zip'
unzip -n ./scripts/mdsource.zip -d ./scripts/
g++ -Wno-write-strings -o ./scripts/mdenoise/mdenoise ./scripts/mdenoise/mdenoise.cpp ./scripts/mdenoise/triangle.c
# ln -s `pwd`/mdenoise /some/directory/on/the/$PATH
and
gdal_translate -of AAIGrid hillshades.tmp.tif hillshades.tmp.asc # convert to .asc
./scripts/mdenoise/mdenoise -i hillshades.tmp.asc -n 20 -t 0.99 -o hillshades_denoised.tmp.asc # denoise
gdal_translate -of GTiff hillshades_denoised.tmp.asc hillshades_denoised_xs.tmp.tif # convert back to .tif
See How to smooth a DEM? :