gdal icon indicating copy to clipboard operation
gdal copied to clipboard

Add Texture Shading to gdaldam

Open arenol opened this issue 10 months ago • 3 comments

Feature description

Anyone bother to add texture shading to the gdaldem app?

command line argunments would be something like

gdaldem texture [-Z <Zfactor , default =1.0>] [-T <texture_amount: 0-200>] ... <inputdem> <outputfile>

See https://www.textureshading.com/ for reference.

Additional context

No response

arenol avatar Feb 10 '25 12:02 arenol

Anyone bother to add texture shading to the gdaldem app?

Unlikely to happen by magic. Someone will have to code that.

rouault avatar Feb 10 '25 13:02 rouault

Precompute all of your derivatives and use gdal_calc.py to create this. No reason to add this special feature to gdaldem IMO.

hobu avatar Feb 10 '25 15:02 hobu

Just came across this by accident and I have to say I like the style very much. ❤

It seems to be implemented already in e.g. QGIS Terrain shading plugin and rayshader.

Just to mention it, I would love to see additional terrain metrics (e.g. texture-shading, openness, curvature, ...) in the future with the new gdal cli. There is already things such as Terrain Ruggedness Index implemented and in my opinion it would be great to advance capabilities here.

Possibly also worth considering grouping everything mainly related to terrain/elevation in a sublevel of gdal raster, such as e.g.:

  • gdal raster terrain aspect / gdal raster elevation aspect
  • gdal raster terrain slope
  • gdal raster terrain hillshade
  • gdal raster terrain roughness
  • gdal raster terrain position-index
  • gdal raster terrain ruggedness-index

wiesehahn avatar May 23 '25 14:05 wiesehahn