Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symlinks added as layer sources: QGIS unexpectedly rewrites source location as target rather than symlink #19524

Closed
qgib opened this issue Sep 16, 2014 · 2 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Project

Comments

@qgib
Copy link
Contributor

qgib commented Sep 16, 2014

Author Name: Adam Colligan (Adam Colligan)
Original Redmine Issue: 11214
Affected QGIS version: 2.4.0
Redmine category:project_loading/saving


Behavior:

A symlink to a source file (such as a raster image) can easily be added as a layer to a QGIS project. In layer properties, the location of the symlink appears as the data source.

If another program or script rewrites the symlink file to give it a different target, QGIS updates smoothly. Refreshing the map display results in the new target appearing with the same properties/symbology applied. This is true whether the project has been saved or not.

However, qgis does not write the symlink location as the layer's data source in the .qgis file that is saved. Rather, it writes the target file name. Therefore, when the project is closed and reopened, the symlink is cut out of the process. The layer properties dialog is now changed to show the data source as a back-end target file (not sure if the original one or the last one referenced by the symlink).

Expected behavior:
QGIS should save the location of a symlink file if the symlink file is what was added as the layer source.

Alternately, if QGIS is going to continue to write target locations rather than symlink locations to the .qgis file, the target location should immediately appear in layer properties. However, this will also be deceptive during the current session while the map is continuing to update from the symlink.

Use case:
I have a large set of radar imagery whose filenames are timestamps. A script creates a folder of symlinks such that a symlink called "0" references the newest radar image, "1" references the image 5 minutes older than that, and so forth.

As long as QGIS is reading from the symlinks, it will dynamically update with the latest radar image. I can also very easily create loops of, say, the last hour or the last 24 hours of radar without having to alter anything manually.

Unfortunately, this currently is only possible if I either (a) never close and reopen the .qgis file, or (b) continuously delete and create duplicate copies of underlying data files with dynamically-changing names.

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2017

Author Name: Giovanni Manghi (@gioman)


  • easy_fix was configured as 0
  • regression was configured as 0

@qgib
Copy link
Contributor Author

qgib commented Mar 9, 2019

Author Name: Giovanni Manghi (@gioman)


End of life notice: QGIS 2.18 LTR

Source:
http://blog.qgis.org/2019/03/09/end-of-life-notice-qgis-2-18-ltr/


  • resolution was changed from to end of life
  • status_id was changed from Open to Closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Project
Projects
None yet
Development

No branches or pull requests

1 participant