[Qgis-user] Python script for QGIS

LE LAMER Romain rlelamer at hotmail.fr
Fri Dec 27 02:55:00 PST 2019


Hi,
Is it possible via gdal_translate, or other gdal program, to binarize a tile?

I would like the colors RGB 59,89,95,255 & 60,89,96,255  change to white (color entry 0) and that the other colors 109,178,200,255; 138,193,212,255 & 161,205,220,255 change to black (color entry 1)

I don't understand how to use the -b and / or -mask arguments in this code
l = 'gdal_translate -a_srs EPSG:4326 -a_ullr ' + ullr + f_in + f_out + '\n'

Thanks


More information about the Qgis-user mailing list