Wednesday 21 August 2019

Relative path not working in QGIS with Google Drive?


I have a qgis file, referring to a few shp files, saved on a google drive folder which is synced across two computers using different OS, one is Mac OS X, the other Windows 8. So, the absolute path of this qgis file on different operating systems is different. But the location of this qgis project file in relation to the shp files it refers to is the same.



E.g: On the Mac OS X computer, the locations of the project file and the shp file are:


/Users/David/GoogleDrive/GIS/Project/project_01.qgs


and


/Users/David/GoogleDrive/GIS/Project/data/road.shp


On the Windows 8 computer, the locations of the project file and the shp file are:


C:\Users\David\GoogleDrive\GIS\Project\project_01.qgs


and


C:\Users\David\GoogleDrive\GIS\Project\data\road.shp


I setup this qgis project file as using relative path, following the suggestion from the following post: relative path


This project works file in Mac OS X, even if I move the qgis file and the associated shp files to different directory.



However, I got a window popping out when opening it Windows 8, saying "Handle bad layers" and asking me to re-specify the locations of all the shp files again.


Isn't the relative path supposed to deal with this kind of situation?


May I ask how to solve this problem related to qgis project file saved in Google Drive folder that is synced across different operation systems?




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