Hi all,

I have an index of rasters.
I have added an action to the QGIS dataset which will open the raster
directly into QGIS.

The script I use is this:

from qgis.utils import iface
qgis.utils.iface.addRasterLayer('[% path %]')
index =
QgsProject.instance().mapLayersByName('Catalogue_Raster_Aerial_Photography')[0]
iface.setActiveLayer(index)

It works well, except the raster loads to the 'top' of the layer list.
Is there a command to use so that the image loads to the bottom of the map?
I prefer to have my index always on top of the list.

thanks
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to