[QGIS-trac] Re: [Quantum GIS] #2433: Fix relative paths from
absolute-with-symlinks
Quantum GIS
qgis at qgis.org
Fri Feb 12 09:25:35 EST 2010
#2433: Fix relative paths from absolute-with-symlinks
---------------------------------------------+------------------------------
Reporter: strk | Owner: nobody
Type: patch | Status: new
Priority: minor: annoyance | Milestone: Version 1.5.0
Component: Project Loading / Saving | Version: HEAD
Resolution: | Keywords:
Platform_version: | Platform: Debian
Must_fix: No | Status_info: 1
---------------------------------------------+------------------------------
Comment (by strk):
Replying to [comment:3 jef]:
> Replying to [comment:2 strk]:
> > Replying to [comment:1 jef]:
> > > What's the point in using two different paths to the same directory
in one project?
>
> > No point. It was qgis doing that, I just used the "browse" dialog to
select
> > the files, and maybe I started it from my home directory so had to go
find
> > the files somewhere.
>
> I don't understand. Didn't you use two different paths to the same
directory and QGIS merily didn't notice or care, that there was a symlink
involved?
I never used paths *explicitly*. What I did was requesting the load of two
shapefiles.
Most likely the path to the directories containing the two shapefiles were
the same as
IIRC the file browser remembers last location used. In any case the paths
found in the .qgs
file shared the path up to (but not including) the filename, so that part
was fine.
Now, the "problem" (qgis problem, IMHO), is that these paths were reached
using symlinks.
Next, I wanted to convert my "project file" into something I could send to
my client.
A zip file containing the shapefiles AND the qgis project file. Easy thing
shouldnt' it be ?
At this time BOTH the shapefiles AND the project file were already in the
same directory.
So I went to "project options" and specified "save paths as relative".
I expected qgis being able to find them, as BOTH the shapefiles AND the
project file
were in the same *canonical* directory.
> I does just work, doesn't it? It's just that the paths in the project
file aren't the one you expected.
Yes, if you want. It still works for me, but still can't put in the zip
file :)
> For GRASS rasters the "filename" isn't actually a path to a file.
> The referred information is in multiple files in the directories within
the GRASS mapset.
> The path to the mapset is still valid, existing and can be expresses
relatively to
> the project file.
Uhm... ok, what about passing the `dirname` to the canonicalizator
function then ?
Is the dirname expected to exist ? Or, if other kind of "source-
specification" exist,
is there a way to tell what refer to a filesystem path and what not ?
Mind you: I didn't introduce this "relative paths" thing myself in qgis,
so please don't
take the chance to have me rewrite it all :P
--
Ticket URL: <https://trac.osgeo.org/qgis/ticket/2433#comment:4>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats
More information about the QGIS-trac
mailing list