quangsangctim / pythonxy

Automatically exported from code.google.com/p/pythonxy
0 stars 0 forks source link

BandId in gdal_edit.py #761

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

1. What version of Python(x,y) have you installed?
2.7

2. Which components have you installed (Python(x,y) installer:
componentpage):
    b. Have you selected the "Full" component selection?

3. Have you selected the option "Customize installation directories"?
b. No

4. If the answer to 3. is yes, what installation directories have you
chosen?

5. Where did you install Python(x,y) itself?
a. default path

6. Have you installed Python(x,y):
    a. For "Current user only"

7. What is your operating system?
c. Windows 7

8. Is the operating system 64 bit?
a. Yes

9. When you installed Python(x,y), were you logged in as :
a. a regular user
b. an administrator of the machine

10. If you are using Windows Vista/7, have you installed Python(x,y):
a. simply by double-clicking on the installer

------------

What steps will reproduce the problem?
1. Open 
https://code.google.com/p/pythonxy/source/browse/src/python/gdal/DOC/samples/gda
l_edit.py?repo=xy-27&r=d2bf0ff3aaef1b77c7266ebb8671d473e7281938#144
2. Goto line 144
3. There is: ds.GetRasterBand(1).SetNoDataValue(nodata)

What is the expected output? What do you see instead?

There should be i variable instead of 1 constant:
ds.GetRasterBand(i).SetNoDataValue(nodata)
                ===

Please provide any additional information below.

This script works well although there is programming mistake because as I 
belive NoData value is stored in Dataset not in RasterBand.

Original issue reported on code.google.com by kuba.szo...@gmail.com on 28 Jan 2015 at 9:10