Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python API provides removed blueBandName() for QgsRasterLayer (returning NULL) #15589

Closed
qgib opened this issue Aug 31, 2012 · 2 comments
Closed
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Plugins

Comments

@qgib
Copy link
Contributor

qgib commented Aug 31, 2012

Author Name: Marco Lechner (Marco Lechner)
Original Redmine Issue: 6291
Affected QGIS version: master
Redmine category:python_plugins


QgsRasterLayer('/myraster.tif',"raster") has .blueBandName() but no redBandName, greenBandName or grayBandName anymore. blueBandName should be removed, because it is not available in RasterdataProvider class (anymore?).

Try thisin python:

from qgis.core import *
QgsApplication.setPrefixPath("/usr",True)
QgsApplication.initQgis()
QgsApplication.registerOgrDrivers()
layer = QgsRasterLayer('/myGeoTIFF.tif',"raster")
print dir(layer)
print layer.blueBandName()
print layer.redBandName() #crashes
for i in range(layer.bandCount()):
print layer.bandName(i)

Btw: I wonder when colorBandName() was removed from API

@qgib
Copy link
Contributor Author

qgib commented Jun 28, 2014

Author Name: Jürgen Fischer (@jef-n)


  • fixed_version_id was changed from Version 2.0.0 to Future Release - Lower Priority

@qgib
Copy link
Contributor Author

qgib commented Dec 13, 2015

Author Name: Médéric RIBREUX (Médéric RIBREUX)


Hello, bug triage...

in QGIS 2.13 master (and probably in earlier versions), there is no blueBandName method for QgsRasterLayer object anymore.

I am closing this bug.


  • resolution was changed from to fixed/implemented
  • done_ratio was changed from 0 to 100
  • status_id was changed from Open to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Plugins labels May 24, 2019
@qgib qgib added this to the Future Release - Lower Priority milestone May 24, 2019
@qgib qgib closed this as completed May 24, 2019
JamesShaeffer pushed a commit to JamesShaeffer/QGIS that referenced this issue Nov 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Plugins
Projects
None yet
Development

No branches or pull requests

1 participant