[Qgis-user] click on raster outline to make it visible

Reginald Reginald.Carlier at ingelmunster.be
Fri May 25 02:43:36 PDT 2018


Found the solution for defining the action:

from PyQt4.QtCore import QFileInfo;
fileName ="[%"Locatie"%]";
fraw = fileName.encode('string_escape').replace('\\\\','\\')
fileInfo = QFileInfo(fileName);
baseName = fileInfo.baseName();
qgis.utils.iface.addRasterLayer(fraw, baseName);

With this code I can click in the combobox in the attributetable and the
rasterlayer loads in the layerpanel.
It would be nice if I could just click on the outline in the map and get the
same result 



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html



More information about the Qgis-user mailing list