[Qgis-user] Changing data source from Postgis to Geopackage

Alessandro Pasotti apasotti at gmail.com
Mon Nov 5 06:01:05 PST 2018


On Mon, Nov 5, 2018 at 2:54 PM Andreas Neumann <a.neumann at carto.net> wrote:

> Hi,
>
> 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.
>
> I already have a Geopackage with the exact same data structure like in
> Postgis (automatic export from Postgis through ogr2ogr).
>
> Now I wonder what the best approach is to change all data sources from
> Postgis to Geopackage?
>
> Texteditor and search/replace or is there something more comfortable?
>

Hi Andreas,

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')

then exit without saving the project, make a backup and try search replace.


-- 
Alessandro Pasotti
w3:   www.itopen.it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20181105/8c4a1d63/attachment.html>


More information about the Qgis-user mailing list