Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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
1  
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
1  
Looks like the closing quotation marks are missing, as well as the input layer. This must be a file. –  Andre Joost Mar 27 '13 at 8:34
1  
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 ;-) –  Andre Joost Mar 27 '13 at 12:12
1  
:-) 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

 
discard

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

Browse other questions tagged or ask your own question.