C Hamilton wrote > path = path_to_the_image > rlayer = QgsRasterLayer(path, name_of_image)
Hi C Hamilton, are you sure the path_to_the_image is correct? Have you tried to execute the code in the Python console? Does QgsRasterLayer(path, name_of_image) and QgsProject.instance().addMapLayer(rlayer, True) return a valid <QgsRasterLayer: name_of_image (gdal)> object? I usually use the same code without issue: the layer is correctly added to the map and it is listed in the layer tree. Regards. Andrea -- Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html _______________________________________________ QGIS-Developer mailing list [email protected] List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
