Thursday, 17 March 2016

QGIS html annotation relative paths



I find the QGIS html annotation tool is very useful for quickly accessing a combination of key data attributes and photos. I am having trouble using relative paths for images.


This doesn't work:


 

a.k.a.




I'm wondering if it's possible to employ a QgsProject.instance() in the QGIS Macro option under project properties. I don't know html very well, so I'm wondering how I could link the relative pathname to the project path using something like this:


proj = QgsProject.instance()
UriFile = str(proj.fileName())

pathname = str(os.path.dirname(UriFile))

How can I concatenate this in the html display option?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...