Hello, I have defined an action with the following python code:
from PyQt4.QtCore import QFileInfo fileName ="[%"Locatie"%]"; fileInfo = QFileInfo(fileName); baseName = fileInfo.baseName(); qgis.utils.iface.addRasterLayer(fileName, baseName); The problem that I’m having is that the string stored in the Locatie field gets interpreted. In a path name like F:\Ingelmunster\riolering\infraxscans\tif2/331-Meulebekestraat_Leon_Bekaertstraat_Mandesweg_GP_deel2.tif \t creates a tab spacing and \r removes a character. Ongeldige Laag: GDAL provider Cannot open GDAL dataset F:\Ingelmunster iolering\infraxscans if2/335-Meulebekestraat_Lammekensknokstraat_Bollewerpstraat_Bekaertstraat_Ringlaan_GP_deel3.tif: `F:\Ingelmunster iolering\infraxscans if2/335-Meulebekestraat_Lammekensknokstraat_Bollewerpstraat_Bekaertstraat_Ringlaan_GP_deel3.tif' does not exist in the file system, and is not recognized as a supported dataset name. How can I load the rasterfile with the filename that is stored in the Locatie field into qgis? Is there any comprehensive tutorial on actions? Regards, -- Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html _______________________________________________ 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