You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: