<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi,</p>
<p>In my setup - using PGSERVICES - all vector, raster, styles and
projects are stored on database. This is my preferred way to
organize the data: on a database. QGIS Server also takes advantage
of this setup and publish the projects directly from the database,
using the rasters (in db or out of db rasters).<br>
</p>
<p>The few things I'm not sharing on the database are SVG, layout
images and fonts.</p>
<p>There are problems with Postgresql/GDAL access to Postgresql, but
if using PGSERVICES it works.</p>
<p>Best regards,</p>
<p>Jorge<br>
</p>
<div class="moz-cite-prefix">On 05/12/19 11:18, Alessandro Pasotti
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAL5Q671cX=Oo6RzVWqLpqiBCr1bL25gCumAhi1BbsmbtvifOBw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<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"
moz-do-not-send="true">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"
moz-do-not-send="true">https://github.com/qgis/QGIS/issues/30392</a>).</div>
<div><br>
</div>
<div>Cheers<br>
</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"
moz-do-not-send="true">Qgis-user@lists.osgeo.org</a><br>
List info: <a
href="https://lists.osgeo.org/mailman/listinfo/qgis-user"
rel="noreferrer" target="_blank" moz-do-not-send="true">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" moz-do-not-send="true">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"
moz-do-not-send="true">www.itopen.it</a></div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></pre>
</blockquote>
<div class="moz-signature">-- <br>
<title>Email Signature</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<table style="width: 525px; font-size: 11pt; font-family: Arial,
sans-serif;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="text-align:center; font-size: 10pt; font-family:
Arial, sans-serif; border-right: 1px solid;
border-right-color: #fb6303; width: 125px; padding-right:
10px; vertical-align: top;" rowspan="6" width="125"
valign="top"> <a href="https://www.geomaster.pt"
target="_blank"><img alt="Logo" style="width:105px;
height:auto; border:0;"
src="https://geomaster.pt/wp-content/uploads/2017/02/cropped-geomaster300x300-1.png"
width="85" border="0"></a> </td>
<td style="padding-left:10px">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="font-size: 10pt; color:#0079ac;
font-family: Arial, sans-serif; width: 400px;
padding-bottom: 5px; padding-left: 10px;
vertical-align: top;" valign="top"> <strong><span
style="font-size: 14pt; font-family: Arial,
sans-serif; color:#fb6303;">Geomaster</span></strong><br>
<strong><span style="font-size: 11pt; font-family:
Arial, sans-serif; color:black;">Jorge Gustavo
Rocha</span></strong> <span
style="font-family: Arial, sans-serif;
font-size:11pt; color:#000000;"><span
style="padding-right: 5px; padding-left: 5px;">
| </span>Software Engineer</span> </td>
</tr>
<tr>
<td style="font-size: 10pt; color:#444444;
font-family: Arial, sans-serif; padding-bottom:
5px; padding-top: 5px; padding-left: 10px;
vertical-align: top; line-height:17px;"
valign="top"> <span><span style="color: #fb6303;"><strong>e:</strong></span><span
style="font-size: 10pt; font-family: Arial,
sans-serif; color:#000000;"> <a class="moz-txt-link-abbreviated" href="mailto:jgr@geomaster.pt">jgr@geomaster.pt</a></span></span>
<span><span style="padding-left:
5px;padding-right: 5px;"> | </span><span
style="color: #fb6303;"><strong>m:</strong></span><span
style="font-size: 10pt; font-family: Arial,
sans-serif; color:#000000;"> +351 910 333 888<br>
</span></span> <span><span style="color:
#fb6303;"><strong>g:</strong></span><span
style="font-size: 10pt; font-family: Arial,
sans-serif; color:#000000;"> 41.54094,-8.40490</span></span>
<span><span style="padding-left:
7px;padding-right: 5px;"> | </span><span
style="color: #fb6303;"><strong>v: </strong></span><span
style="font-size: 10pt; font-family: Arial,
sans-serif; color:#000000; padding-left: 7px;">
510 906 109<br>
</span></span> <span> <span style="color:
#fb6303;"><strong>a: </strong></span> </span>
<span> <span style="font-size: 10pt; font-family:
Arial, sans-serif; color: #000000;"><span> </span>Rua
António Cândido Pinto, 67, 4715-400 Braga<br>
</span></span> </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>