[Qgis-user] Save Paths Relative to the .qgs project file

Greg Coats gregcoats at mac.com
Fri Sep 4 10:13:08 PDT 2009


It is common to develop a GIS on one powerful computer, and then  
deploy it on many less powerful computers. For example, a GIS might  
be developed on a Mac Pro desktop with 8 GB RAM and 2000 GB disk, and  
then be deployed for use in the field with MacBook notebooks with 2  
GB RAM and 250 GB disk. The desktop and notebook computers usually  
have different directory structures. For example, the GIS on the  
desktop computer might be on a large capacity, external RAID hard  
drive, while the GIS on the notebook computer might be a small  
capacity, internal hard drive, on a DVD-ROM, or a flash drive.

ESRI ArcGIS has for years supported this environment by offering the  
option to Save Relative Paths, that allows the path to a  
georeferenced raster file to be specified relative to the location of  
the GIS project file. For example, the absolute path on the desktop / 
Users/gregcoats/GIS/dcua_96to1/GeoJPEG2000/18stj/18stj940125.jp2  
would be saved as the relative path ../GeoJPEG2000/18stj/ 
18stj940125.jp2, and then the same identical GIS project file will  
work with the GIS stored on a desktop external hard drive, a notebook  
internal hard drive, on a flash drive, on a DVD-ROM disc, and on a  
Blu-ray BD-ROM disc.

The 1 June 2009 posting to https://trac.osgeo.org/qgis/ticket/1211  
indicated that a request posted a year ago for QGIS to support Save  
Relative Paths had been fulfilled. QGIS version 1.2.0 Daphnis is  
supposed to include the Save Relative Paths feature in Qgis -> File - 
 > Project Properties... -> General -> save absolute paths. However,  
a look at the .qgs project file shows that both when save absolute  
paths in checked and when save absolute paths is not checked the .qgs  
project file continues to save the full absolute path to the raster  
file, for example,
<datasource>/Users/gregcoats/GIS/dcua_96to1/GeoJPEG2000/18stj/ 
18stj940125.jp2</datasource>
rather than storing the path relative to where the .qgs project file  
is stored
<datasource>../GeoJPEG2000/18stj/18stj940125.jp2</datasource>

The ability to Save Relative Paths was originally promised to be  
included in QGIS version 1.0. It appears the function of Save  
Relative Paths is not included in QGIS version 1.2, thus preventing  
the use of QGIS where the GIS is distributed on DVD-ROMs, and flash  
drives. We have been waiting two years for the ability to Save  
Relative Paths. It is unclear if QGIS has any plans to include the  
ability to Save Relative Paths.
Greg



More information about the Qgis-user mailing list