Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QGIS not saving relative path correctly #17331

Closed
qgib opened this issue Sep 9, 2013 · 7 comments
Closed

QGIS not saving relative path correctly #17331

qgib opened this issue Sep 9, 2013 · 7 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Project

Comments

@qgib
Copy link
Contributor

qgib commented Sep 9, 2013

Author Name: Admire Nyakudya (@NyakudyaA)
Original Redmine Issue: 8589
Affected QGIS version: master
Redmine category:project_loading/saving


Working with the 1.9 version nightly build when on the project properties I have saved paths to be relative but when I save my project and open it in a text editor It saves the path as absolute.


@qgib
Copy link
Contributor Author

qgib commented Sep 9, 2013

Author Name: Giovanni Manghi (@gioman)


I cannot confirm, tested on both Linux and Windows with qgis master.


  • category_id was configured as Project Loading/Saving
  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Sep 9, 2013

Author Name: Richard Duivenvoorde (@rduivenvoorde)


I do confirm.

I do have a fresh build release_2_0 here, and I'm not able to save relative paths.

BUT: neither with my fresh build 1.8 version???

You should see relative paths in the .qgs file isn't it? I see this in the qgs file:

/home/richard/geodata/world/world.shp

@qgib
Copy link
Contributor Author

qgib commented Sep 9, 2013

Author Name: Giovanni Manghi (@gioman)


fresh .qgis2 folder too?

Richard Duivenvoorde wrote:

I do confirm.

I do have a fresh build release_2_0 here, and I'm not able to save relative paths.

BUT: neither with my fresh build 1.8 version???

You should see relative paths in the .qgs file isn't it? I see this in the qgs file:

/home/richard/geodata/world/world.shp

@qgib
Copy link
Contributor Author

qgib commented Sep 9, 2013

Author Name: Richard Duivenvoorde (@rduivenvoorde)


yes, I removed .qgis2 dir AND .config/QGIS

in properties I set 'relative paths'. In debug I see this:

src/core/qgsprojectproperty.cpp: 321: (dump) 	key: <WFSUrl>  value: 
src/core/qgsprojectproperty.cpp: 329: (dump) 	key: <Paths>  subkey: <Paths>
src/core/qgsprojectproperty.cpp: 299: (dump) 		name: Paths
src/core/qgsprojectproperty.cpp: 321: (dump) 			key: <Absolute>  value: false
src/core/qgsprojectproperty.cpp: 321: (dump) 	key: <WMSServiceTitle>  value: 

but in .qgs file I see:

<id>provincies20130909170042477</id>                                 
<datasource>/home/richard/geodata/nl/provincies.shp</datasource>     
<title></title>  

.qgis file attached


  • 6212 was configured as kaasRelative.qgs

@qgib
Copy link
Contributor Author

qgib commented Sep 9, 2013

Author Name: Richard Duivenvoorde (@rduivenvoorde)


did some further testing, removed also .qgis and .config/QuantumGis dirs

But still absolute paths, if I just open a shp in my home dir, and then save the qgs file in /tmp

BUT if I then copy some data files in /tmp dir, and load those files, THOSE paths are relative in the project file??

Is it possible that QGIS just is not able to 'traverse' all to the right directory or so?

I opened qgis from /home/richard
Open data in /home/richard/geodata/nl
Saved project in /tmp

Then the .qgs file had /home/richard/geodan/nl/data.shp in its xml.
But copying data.shp to /tmp, and (same project) loading the data.shp from /tmp,
the .qgs file had ./data.shp in it's xml (and /home/richard/geodan/nl/data.shp for the other layer which was still in the project)

I wonder if the original issuer can tell us what exact his setup is: Operating System, QGIS version, way of starting and places of data and project saving.


  • 6213 was configured as kaasRelative.qgs

@qgib
Copy link
Contributor Author

qgib commented Sep 9, 2013

Author Name: Matthias Kuhn (@m-kuhn)


If there in no common ancestor as in your setup (i.e. the only common part of the path is root '/') then there is no reason for saving a relative path and it will be saved absolute.

@qgib
Copy link
Contributor Author

qgib commented Jul 28, 2014

Author Name: Matthias Kuhn (@m-kuhn)


Closed due to lack of feedback.
If you are able to provide the feedback required to solve this issue, please reopen it.


  • status_id was changed from Feedback to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Project labels May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Project
Projects
None yet
Development

No branches or pull requests

1 participant