Bug report #16550

Virtual layer path is not relative

Added by Thomas Gratier almost 7 years ago. Updated almost 7 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Data Provider
Affected QGIS version:2.18.7 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:duplicate
Crashes QGIS or corrupts data:No Copied to github as #:24456

Description

I've set the configuration in my project to use relative path.
If I rename the directory I use in my project, then reopen it, QGIS asks me for providing path as it's not relative in fact.

I would expect for portability to use virtual layer with relative path whereas it's absolute in fact.
It seems this behaviour is what was initially planned (https://gis.stackexchange.com/questions/200620/qgis-virtual-layer-path-never-saved-as-relative) but from a end user, it's annoying.


Related issues

Duplicates QGIS Application - Bug report #16242: QGIS 2.18.4 saves always with absolute paths Closed 2017-02-27

History

#1 Updated by Giovanni Manghi almost 7 years ago

  • Status changed from Open to Feedback

It is the path to the datasource within the QGIS project that is wrong (absolute and not relative) or the path within the dataset (VRT) that is wrong?

#2 Updated by Thomas Gratier almost 7 years ago

It's the path to the datasource that is not relative. You can see the demo project at https://gist.github.com/ThomasG77/6d3373b9024a6179fc3a6b092dd6d03d to reproduce the behaviour.
I've put some instructions to hopefully help you sort out the "issue".

I'm not sure what you mean when you mentioned VRT. I know it's a file in the GDAL context to abstract datasource but I do not fully understand the relationship in the QGIS context as I do not see any created VRT file when using "QGIS Virtual Layer" (or maybe it's under the hood).

#3 Updated by Giovanni Manghi almost 7 years ago

  • Resolution set to duplicate
  • Status changed from Feedback to Closed

solved in #16242

#4 Updated by Jürgen Fischer almost 7 years ago

Also available in: Atom PDF