Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I do not understand the command line when I try to work with gdal_translate in QGIS. I found this at the forum: Normalize raster values to 0-255

And tried this:

*"If not, from within QGIS choose Raster -> Conversion - > Translate. Choose your files and options. At the bottom of the window the full gdal_translate command will be displayed. Click edit and add the -scale option."*

When I type the following command into the line I get an error message "wrong parameters"??? Maby the commands are wrong.

enter image description here

My current grid file has a range from 1 to 9. I need to have a range from 1 to 5 (5 classes).

share|improve this question
have you tried running it without the brackets and commas, i.e. -scale 1 9 1 5 ? In general, try running it from the command line as it should give you more descriptive error messages. – dmci Mar 27 '13 at 8:18
Looks like the closing quotation marks are missing, as well as the input layer. This must be a file. – AndreJ Mar 27 '13 at 8:34
yes, as Andre Joost mentions you are also missing the input layer. the command should read as follows: gdal_translate "C:/Tempordner/Your/Input/Image.tif -scale 1 9 1 5 -of GTiff "C:/Tempordener_GIS/QGIS_test/Normalised_Grid.tif" – dmci Mar 27 '13 at 11:13
Still one quotation mark too much or missing ;-) – AndreJ Mar 27 '13 at 12:12
:-) good point - unaccustomed to using them! gdal_translate "C:/Tempordner/Your/Input/Image.tif" -scale 1 9 1 5 -of GTiff "C:/Tempordener_GIS/QGIS_test/Normalised_Grid.tif" – dmci Mar 27 '13 at 12:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.