Skip to content

Instantly share code, notes, and snippets.

@aprossi
aprossi / hillshade-transparent-overlay.md
Created June 18, 2019 09:43 — forked from cquest/hillshade-transparent-overlay.md
transparent hillshade cooking guide using gdal

Ingredients

  • a decent DEM
  • gdal
  • some computer

compute grayscale hillshade using gdaldem

gdaldem hillshade -compute_edges your_dem_file hillshade.tif

color-ramp to compute transparency (alpha channel)

In another bowl, prepare the following shade.ramp file:

@aprossi
aprossi / rename_multiple_files.md
Created May 24, 2019 06:36
Rename multiple files with prefix or suffix in Linux console

Add a suffix

for file in *; do mv "$file" "$(basename "$file")yourSuffix"; done;

Exmpale to add an underscore "_" at the end each text file:

for file in *.txt; do mv "$file" "$(basename "$file")_"; done;

Add a prefix