Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jarnaldich/e347943c0288a3d711baa8d906f09985 to your computer and use it in GitHub Desktop.
Save jarnaldich/e347943c0288a3d711baa8d906f09985 to your computer and use it in GitHub Desktop.
RGBIZE DSM with rio calc for use with nextzen DTM tiles #rasterio #rio #dsm #bash
#!/bin/bash
SRC=$1
DST=$2
rio calc --co COMPRESS=LZW --co BIGTIFF=YES -t uint8 "(asarray (/ (+ 3278 (read 1 1)) 256) (mod (+ 3278 (read 1 1)) 256) (* 256 (- (+ 3278 (read 1 1)) (floor (+ 3278 (read 1 1))))))" $SRC $DST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment