1

I export portions of a height map from Qgis using the command line. The options are path, resolution and extents, but it exports an 8 bit image. I am getting terracing because of this. Is there a way to export a 16bit image or a plugin to overcome this?

C:\PROGRA~1\QGIS-2~1.1\bin\qgis --project Z:\Projects\Glacier\QGIS\Glacier.qgs --snapshot Z:\Projects\Glacier\Images\Glacier_32km_02.png --width 4096 --height 4096 --extent 280500,5380000,312500,5412000

2

The --snapshot command line option is a kind of screenshot of the canvas, delivering a 24-bit (3x8) RGB image. Since greyscales are displayed in RGB with R=G=B value, you only get 255 shades of grey. I'm not sure if pseudocolour rendering is able to use more values.

The only way to export images with finer values is to use GDAL with

gdal_translate -ot Int16 -srcwin xoff yoff xsize ysize -outsize xsize ysize src_dataset dst_dataset

on the datasource.

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.