Tuesday 22 August 2017

Updating file locations in QGIS projects?


I have about 30 different QGIS Project files for 30 different clients. Each is saved onto my computer and all their relevant vector and raster files are all saved locally.


We are now in the process of moving office and upgrading our computers.



As a result, I need to move all my files from my computer onto the network drive, thus destroying any previous file references.


Aside from manually clicking on each file and looking for each ones new location, is there any other way around this.


(Each project could have a few hundred links to update)



Answer



I'm not sure what version of QGIS you are using, however in v>2.0.1 you may use the "Handle bad layers" dialog like this:


enter image description here



  1. Select all layers in common directory while holding Ctrl key

  2. Double click on last one you select

  3. Re-path one of the layers and select Open


  4. Repeat process for additional directories


This will batch update file based layers by directory (not database layers):


enter image description here


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...