<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 5, 2019 at 11:58 AM Yann Voté <<a href="mailto:ygversil@lilo.org">ygversil@lilo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
I can't find a solution to the following issue, or a way to work around <br>
it: I have created a project with some PostgreSQL layers to edit and <br>
some raster layers on local filesystem. I work on a Linux computer and <br>
have put the local layers into the pkg data path resources folder <br>
(/usr/share/qgis/resources/local/raster.gpkg).<br>
<br></blockquote><div><br></div><div>Sorry but this is not a good idea, that path is usually not user-writeable and should not be used to store any user related information.</div><div><br></div><div>But if I understand correctly what you were trying to do I'm afraid there is not a solution: the concept of "relative path" means relative to the project's storage path but that path does not make any sense in case of a POSTGRES storage (because POSTGRES is not a local filesystem-based DB in the same sense as GPKG or SPATIALITE are), so your file-system based asset paths are not (and cannot be) converted to relative paths because there is no project path we can relate to.</div><div><br></div><div>This makes portability an issue if the project has filesystem-based layers (rasters in your case).</div><div><br></div><div>There is no solution I'm aware of, storing rasters into PG is also not a viable option at the moment because support is currently buggy (see: <a href="https://github.com/qgis/QGIS/issues/30392">https://github.com/qgis/QGIS/issues/30392</a>).</div><div></div><div><br></div><div>Cheers<br></div><div></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I have also saved the project into PostgreSQL so that it can be shared <br>
easily. Other users work on Windows computers and have the same rasters <br>
under pkg data path resources folder <br>
(C:/PROGRAM~1/QGIS3~1.8/apps/qgis/resources/local/raster.gpkg). But when <br>
they open the project, Postgis layers are loaded fine, but QGIS says <br>
that raster.gpkg cannot be found under the /usr/share/... path.<br>
<br>
I would expect that layers in the pkg data path resources folder are <br>
saved with the inbuilt: prefix, but in fact they are not. Moreover, it <br>
seems that one cannot select "Relative" for saving layer paths, in <br>
project properties, when project is saved to PostgreSQL. Looks sensible <br>
(what is the relative path to a PostgreSQL table ?), but then what can I <br>
do to share a PostgreSQL project with local layers ?<br>
<br>
We all use QGIS 3.8.3.<br>
<br>
Thank you for any advice !<br>
<br>
Cheers<br>
<br>
Yann<br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">Alessandro Pasotti<br>w3:   <a href="http://www.itopen.it" target="_blank">www.itopen.it</a></div></div>