Is it possible to change the directory of a layer's source file without deleting and re-importing the layer?
Asked
Active
Viewed 477 times
-1
-
Are you after any method (GUI/programmatically), and any version of QGIS? – nmtoken Jun 18 '19 at 10:09
-
Preferably GUI and latest version. I'll try romainbh's answer next time the issue presents itself. – ChameleonScales Jun 18 '19 at 12:32
1 Answers
3
Yes, with the plugin Change datasource, it's the easiest way to change the path of a layer in QGIS.
Copy the layer file (or multiples files in the case of a shapefile) into the new directory and then open your project and change the source with the plugin.
romainbh
- 1,045
- 7
- 13
-
The plugin is a bit opaque to me. It asks for a string to be replaced with another string, but that does not seem to work. Any suggestions? Do I need to really use this in QGIS.3.22? The Bad Layers handler launches in the beginning but does not seem to work for me, hence I went to this plugin... – Sharad Feb 27 '22 at 11:19
-
UPDATE: I figured out that if I ignore QGIS' native "Handle Missing Layers" dialogue (click "Keep unavailable layers") and then go and 'fix' one of the layers that has a 'bad data source', the others also get fixed automatically. Rather counter-intuitive, but worked. (I did not use the plugin at all) – Sharad Feb 27 '22 at 11:52