<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>This seems a good candidate for an extra function of the browser.
Probably a simple Py script or a plugin should do, at least as a
prototype.</p>
<p>Better add a ticket not to forget?</p>
<p>All the best.</p>
<p><br>
</p>
<br>
<div class="moz-cite-prefix">Il 11/05/2018 03:17 PM, Andreas Neumann
ha scritto:<br>
</div>
<blockquote type="cite"
cite="mid:1cafbe9400f5fabbf819582ac770cc50@carto.net">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<p>Hi,</p>
<p>Ok - I am doing it in the text editor.</p>
<p>I also had to change</p>
<p><provider encoding="System">postgres</provider></p>
<p>to</p>
<p><provider encoding="System">ogr</provider></p>
<p>After doing this change, it worked.</p>
<p>Andreas</p>
<p>On 2018-11-05 15:01, Alessandro Pasotti wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left:
#1010ff 2px solid; margin: 0"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<div dir="ltr">
<div class="gmail_quote">
<div dir="ltr">On Mon, Nov 5, 2018 at 2:54 PM Andreas
Neumann <<a href="mailto:a.neumann@carto.net"
moz-do-not-send="true">a.neumann@carto.net</a>>
wrote:</div>
<blockquote class="gmail_quote" style="margin: 0 0 0 .8ex;
border-left: 1px #ccc solid; padding-left: 1ex;">
<div style="font-size: 10pt; font-family:
Verdana,Geneva,sans-serif;">
<p>Hi,</p>
<p>I have a relatively complex QGIS project with data
storage in QGIS and would like to change the data
source of all layers to Geopackage.</p>
<p>I already have a Geopackage with the exact same data
structure like in Postgis (automatic export from
Postgis through ogr2ogr).</p>
<p>Now I wonder what the best approach is to change all
data sources from Postgis to Geopackage?</p>
<p>Texteditor and search/replace or is there something
more comfortable?</p>
</div>
</blockquote>
<div> </div>
<div>Hi Andreas, </div>
<div> </div>
<div>you could first check if it works correctly with one
layer, from the python console
vl.changeDataSource('/my/new/path|layername=mylayername',
'layer_name', 'ogr')</div>
<div> </div>
<div>then exit without saving the project, make a backup and
try search replace.</div>
<div> </div>
</div>
<br>
-- <br>
<div class="gmail_signature" dir="ltr">Alessandro Pasotti<br>
w3: <a href="http://www.itopen.it" target="_blank"
rel="noopener noreferrer" moz-do-not-send="true">www.itopen.it</a></div>
</div>
</blockquote>
<p><br>
</p>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<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>
<br>
<pre class="moz-signature" cols="72">--
Paolo Cavallini - <a class="moz-txt-link-abbreviated" href="http://www.faunalia.eu">www.faunalia.eu</a>
QGIS.ORG Chair:
<a class="moz-txt-link-freetext" href="http://planet.qgis.org/planet/user/28/tag/qgis%20board/">http://planet.qgis.org/planet/user/28/tag/qgis%20board/</a></pre>
</body>
</html>