Skip to main content
replaced http://gis.stackexchange.com/ with https://gis.stackexchange.com/
Source Link

I'm exploring QGIS python functions to set all raster layers with a custom transparency, i.e 0,0,0,100 .

Looking at some previous questions. There is a way to loop all the layers, but the aspect to set transparency value on RGB values, I've been having difficulties understanding the documentation.

How to set the transparency for multiple layers or add a global transparancy preference?How to set the transparency for multiple layers or add a global transparancy preference?

for layer in iface.legendInterface().layers():
   layer.renderer().setOpacity(0.2)

How do I set layer transparency in QGIS 2.0 with Python? The example here uses TransparentSingleValuePixel but i notice there is a TransparentThreevaluePixel

x = QgsRasterTransparency.TransparentSingleValuePixel()
x.pixelValue = 123
x.transparencyPercent = 50
rt.setTransparentSingleValuePixelList( [ x ] )

I'm exploring QGIS python functions to set all raster layers with a custom transparency, i.e 0,0,0,100 .

Looking at some previous questions. There is a way to loop all the layers, but the aspect to set transparency value on RGB values, I've been having difficulties understanding the documentation.

How to set the transparency for multiple layers or add a global transparancy preference?

for layer in iface.legendInterface().layers():
   layer.renderer().setOpacity(0.2)

How do I set layer transparency in QGIS 2.0 with Python? The example here uses TransparentSingleValuePixel but i notice there is a TransparentThreevaluePixel

x = QgsRasterTransparency.TransparentSingleValuePixel()
x.pixelValue = 123
x.transparencyPercent = 50
rt.setTransparentSingleValuePixelList( [ x ] )

I'm exploring QGIS python functions to set all raster layers with a custom transparency, i.e 0,0,0,100 .

Looking at some previous questions. There is a way to loop all the layers, but the aspect to set transparency value on RGB values, I've been having difficulties understanding the documentation.

How to set the transparency for multiple layers or add a global transparancy preference?

for layer in iface.legendInterface().layers():
   layer.renderer().setOpacity(0.2)

How do I set layer transparency in QGIS 2.0 with Python? The example here uses TransparentSingleValuePixel but i notice there is a TransparentThreevaluePixel

x = QgsRasterTransparency.TransparentSingleValuePixel()
x.pixelValue = 123
x.transparencyPercent = 50
rt.setTransparentSingleValuePixelList( [ x ] )
deleted 7 characters in body; edited title
Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

QuantumGIS QGIS set all layers with custom transparency with python?

I'm exploring Quantum GISQGIS python functions to set all raster layers with a custom transparency, i.e 0,0,0,100 .

Looking at some previous questions. There is a way to loop all the layers, but the aspect to set transparency value on RGB values, I've been having difficulties understanding the documentation.

How to set the transparency for multiple layers or add a global transparancy preference?

for layer in iface.legendInterface().layers():
   layer.renderer().setOpacity(0.2)

How do I set layer transparency in QGIS 2.0 with Python? The example here uses TransparentSingleValuePixel but i notice there is a TransparentThreevaluePixel

x = QgsRasterTransparency.TransparentSingleValuePixel()
x.pixelValue = 123
x.transparencyPercent = 50
rt.setTransparentSingleValuePixelList( [ x ] )

QuantumGIS set all layers with custom transparency with python

I'm exploring Quantum GIS python functions to set all raster layers with a custom transparency, i.e 0,0,0,100 .

Looking at some previous questions. There is a way to loop all the layers, but the aspect to set transparency value on RGB values, I've been having difficulties understanding the documentation.

How to set the transparency for multiple layers or add a global transparancy preference?

for layer in iface.legendInterface().layers():
   layer.renderer().setOpacity(0.2)

How do I set layer transparency in QGIS 2.0 with Python? The example here uses TransparentSingleValuePixel but i notice there is a TransparentThreevaluePixel

x = QgsRasterTransparency.TransparentSingleValuePixel()
x.pixelValue = 123
x.transparencyPercent = 50
rt.setTransparentSingleValuePixelList( [ x ] )

QGIS set all layers with custom transparency with python?

I'm exploring QGIS python functions to set all raster layers with a custom transparency, i.e 0,0,0,100 .

Looking at some previous questions. There is a way to loop all the layers, but the aspect to set transparency value on RGB values, I've been having difficulties understanding the documentation.

How to set the transparency for multiple layers or add a global transparancy preference?

for layer in iface.legendInterface().layers():
   layer.renderer().setOpacity(0.2)

How do I set layer transparency in QGIS 2.0 with Python? The example here uses TransparentSingleValuePixel but i notice there is a TransparentThreevaluePixel

x = QgsRasterTransparency.TransparentSingleValuePixel()
x.pixelValue = 123
x.transparencyPercent = 50
rt.setTransparentSingleValuePixelList( [ x ] )
Source Link
Pat
  • 193
  • 7

QuantumGIS set all layers with custom transparency with python

I'm exploring Quantum GIS python functions to set all raster layers with a custom transparency, i.e 0,0,0,100 .

Looking at some previous questions. There is a way to loop all the layers, but the aspect to set transparency value on RGB values, I've been having difficulties understanding the documentation.

How to set the transparency for multiple layers or add a global transparancy preference?

for layer in iface.legendInterface().layers():
   layer.renderer().setOpacity(0.2)

How do I set layer transparency in QGIS 2.0 with Python? The example here uses TransparentSingleValuePixel but i notice there is a TransparentThreevaluePixel

x = QgsRasterTransparency.TransparentSingleValuePixel()
x.pixelValue = 123
x.transparencyPercent = 50
rt.setTransparentSingleValuePixelList( [ x ] )