Re: [Qgis-user] qgis python script, add raster to bottom of map

2021-11-02 Thread Richard Duivenvoorde
Maybe this helps: https://github.com/rduivenvoorde/pdokservicesplugin/commit/176d090f82dff6eeb754371095681135de4ef8e6 This was a Pull Request in which somebody make our WMS plugin always put the reference layer to the bottom. Regards, Richard Duivenvoorde On 11/2/21 6:20 AM, tim dunlevie wrot

Re: [Qgis-user] qgis python script, add raster to bottom of map

2021-11-02 Thread WhereGroup
Hi Tim, there are multiple options: You can consult the QGIS PyQGIS cookbook for an example: https://docs.qgis.org/3.16/en/docs/pyqgis_developer_cookbook/loadlayer.html#qgsproject-instance Or when you google for "pyqgis add layer" plus "order", "bottom" or "specific index", those terms shoul

[Qgis-user] qgis python script, add raster to bottom of map

2021-11-01 Thread tim dunlevie
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_Aeria