<div dir="ltr"><div>Hi Yann, <br></div><div>Sharing reference datasets as files in /usr does not sound like a good idea when you already have a database. I strongly recommend using the database for this, except for rasters.   And yes, offline editing works with database, except fpr rasters :)</div><div>Regards</div><div>Régis</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le jeu. 5 déc. 2019 à 13:43, Yann Voté <<a href="mailto:ygversil@lilo.org">ygversil@lilo.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thank you all for your answers.<br>
<br>
Alessandro: the resources folder contains only read-only data (reference <br>
rasters or vectors from French national geographic institute, not to be <br>
modified). I deploy these layers on every workstation. Is it still a bad <br>
practice for read-only reference data to use this folder ?<br>
<br>
Raymond: indeed I'm currently working on a plugin, and I've seen <br>
QgsPathResolver. But documentation for this class is quite terse. but <br>
I'll continue to investigate and experiment.<br>
<br>
Jorge: interesting setup. Does the offline editing plugin work when <br>
everything is in database ? In other words, are raster layers converted <br>
offline ?<br>
<br>
Cheers.<br>
<br>
Yann<br>
<br>
Le 05/12/2019 à 13:16, Jorge Gustavo Rocha a écrit :<br>
> Hi,<br>
> <br>
> In my setup - using PGSERVICES - all vector, raster, styles and projects <br>
> are stored on database. This is my preferred way to organize the data: <br>
> on a database. QGIS Server also takes advantage of this setup and <br>
> publish the projects directly from the database, using the rasters (in <br>
> db or out of db rasters).<br>
> <br>
> The few things I'm not sharing on the database are SVG, layout images <br>
> and fonts.<br>
> <br>
> There are problems with Postgresql/GDAL access to Postgresql, but if <br>
> using PGSERVICES it works.<br>
> <br>
> Best regards,<br>
> <br>
> Jorge<br>
> <br>
> On 05/12/19 11:18, Alessandro Pasotti wrote:<br>
>><br>
>><br>
>> On Thu, Dec 5, 2019 at 11:58 AM Yann Voté <<a href="mailto:ygversil@lilo.org" target="_blank">ygversil@lilo.org</a> <br>
>> <mailto:<a href="mailto:ygversil@lilo.org" target="_blank">ygversil@lilo.org</a>>> wrote:<br>
>><br>
>>     Hi all,<br>
>><br>
>>     I can't find a solution to the following issue, or a way to work<br>
>>     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<br>
>>     and<br>
>>     have put the local layers into the pkg data path resources folder<br>
>>     (/usr/share/qgis/resources/local/raster.gpkg).<br>
>><br>
>><br>
>> Sorry but this is not a good idea, that path is usually not <br>
>> user-writeable and should not be used to store any user related <br>
>> information.<br>
>><br>
>> But if I understand correctly what you were trying to do I'm afraid <br>
>> there is not a solution: the concept of "relative path" means relative <br>
>> to the project's storage path but that path does not make any sense in <br>
>> case of a POSTGRES storage (because POSTGRES is not a local <br>
>> filesystem-based DB in the same sense as GPKG or SPATIALITE are), so <br>
>> your file-system based asset paths are not (and cannot be) converted <br>
>> to relative paths because there is no project path we can relate to.<br>
>><br>
>> This makes portability an issue if the project has filesystem-based <br>
>> layers (rasters in your case).<br>
>><br>
>> There is no solution I'm aware of, storing rasters into PG is also not <br>
>> a viable option at the moment because support is currently buggy (see: <br>
>> <a href="https://github.com/qgis/QGIS/issues/30392" rel="noreferrer" target="_blank">https://github.com/qgis/QGIS/issues/30392</a>).<br>
>><br>
>> Cheers<br>
>><br>
>>     I have also saved the project into PostgreSQL so that it can be<br>
>>     shared<br>
>>     easily. Other users work on Windows computers and have the same<br>
>>     rasters<br>
>>     under pkg data path resources folder<br>
>>     (C:/PROGRAM~1/QGIS3~1.8/apps/qgis/resources/local/raster.gpkg).<br>
>>     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.<br>
>>     Moreover, it<br>
>>     seems that one cannot select "Relative" for saving layer paths, in<br>
>>     project properties, when project is saved to PostgreSQL. Looks<br>
>>     sensible<br>
>>     (what is the relative path to a PostgreSQL table ?), but then what<br>
>>     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> <mailto:<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><br>
>><br>
>><br>
>><br>
>> -- <br>
>> Alessandro Pasotti<br>
>> w3: <a href="http://www.itopen.it" rel="noreferrer" target="_blank">www.itopen.it</a> <<a href="http://www.itopen.it" rel="noreferrer" target="_blank">http://www.itopen.it</a>><br>
>><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><br>
> -- <br>
> Email Signature<br>
> Logo <<a href="https://www.geomaster.pt" rel="noreferrer" target="_blank">https://www.geomaster.pt</a>>       <br>
> *Geomaster*<br>
> *Jorge Gustavo Rocha* | Software Engineer<br>
> *e:*<a href="mailto:jgr@geomaster.pt" target="_blank">jgr@geomaster.pt</a> | *m:*+351 910 333 888<br>
> *g:*41.54094,-8.40490 | *v: *510 906 109<br>
> *a: * Rua António Cândido Pinto, 67, 4715-400 Braga<br>
> <br>
> <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><br>
> <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>