[Qgis-user] rasters on different hard drive become unavailable, paths not saved properly?

Tyler Smith tyler at plantarum.ca
Fri Feb 7 07:23:05 PST 2020


Thanks Mike,

I guess that's reassuring - it would be weird if QGIS users just accepted that they'd need to re-add their layers every time.

But it doesn't help me ;) I have completed that particular project, by loading all the external maps, creating and saving the derivatives in the local directory, and then removing the external maps, in a single session. All the maps in the local directory remain accessible between sessions, so  for now I'm set.

Best,

Tyler

-- 
plantarum.ca

On Fri, Feb 7, 2020, at 6:46 AM, Mike Flannigan wrote:
> 
> I can't reproduce that on Linux Mint 19.2 and QGIS 3.10.1.
> Everything works fine when I include a shape file and a
> geotiff from another drive:
> /media/mike/main1/DDrive/GIS/Shape Files/MO
> 
> I reopen the project and it opens fine every time.
> 
> 
> Mike
> 
> 
> 
> On 2/5/20 2:00 PM, qgis-user-request at lists.osgeo.org wrote:
> > Date: Tue, 04 Feb 2020 17:02:09 -0500
> > From: "Tyler Smith"<tyler at plantarum.ca>
> > To:qgis-user at lists.osgeo.org
> > Subject: [Qgis-user] rasters on different hard drive become
> > 	unavailable, paths not saved properly?
> > Message-ID:<418d7732-a785-4cb3-9fa2-6beb9cb184ae at www.fastmail.com>
> > Content-Type: text/plain
> >
> > Hello,
> >
> > I'm just getting (re)started with QGIS (version 3.10.2, on Ubuntu 18.04). I have some big raster files that I will be using for several projects. I have a second 2TB hard drive on my computer where I store them. I put symbolic links to them in the folder for a QGIS project. This worked fine - I was able to add them to the project, complete some analyses (merge, ruggedness, align etc), and save the resulting rasters.
> >
> > However, when I re-opened the project, all the symbolic linked rasters appeared as unavailable layers. It looks like the paths to the symbolic links were replaced by relative paths to the linked files themselves (e.g., ../../../enm/worldclim/na/wcna_01.tif). This path is not correct, the actual file is at /media/data/enm/worldclim/na/wcna_01.tif, and the symbolic link is at ./data/wcna_01.tif, relative to the QGIS .qgz project file.
> >
> > I thought that the problem was using symbolic links, so I added one of the rasters using the full path to the file on the second hard drive. When I saved the project, closed and re-opened it, this layer was also listed as unavailable, with the same path listed for the corresponding symbolic linked file.
> >
> > Then I discovered that projects can be set to use absolute or relative paths. This project had been set to relative (the default). So I changed it to absolute, and corrected the datasource for one of my unavailable layers. That worked for the session, but after saving and reloading, the path had been stored as /home/tws/enm/worldclim/na/wcna_01.tif, which is an absolute path, but not the correct one (see above).
> >
> > The rasters and shapefiles that I created as part of this project, saved in the same directory as the .qgz file, work fine, and are available between QGIS sessions.
> >
> > Is it not possible to have files on different physical hard drives in the same project? Have I done something wrong here?
> >
> > Best,
> >
> > Tyler
> 
>


More information about the Qgis-user mailing list