[Qgis-user] Storing and Retrieving Vector Layers with Styles to Postgres DB
peter.berger at bluewin.ch
peter.berger at bluewin.ch
Sun Apr 6 23:45:16 PDT 2025
There are serveral steps necessary to store from QGIS a vector layer with
his style in a postgres DB. For a big amout of layers this is impracticaI.
Therfore I would do this in one step from QGIS. Is this in any way possible?
Peter Berger
Brunnwiesenstrasse 62
8049 Zürich
Schweiz
mobile +41 79 301 71 54
The several step procedure:
* Load the layer: Import the layer from a vector file into QGIS.
* Rename (if necessary): Give the layer an appropriate name.
* Transfer the layer to Postgres: Drag the layer into the PostgreSQL
database. You will find it there with the specific name.
* Load the layer from Postgres: Import it back from the PostgreSQL database
into QGIS.
* Assign the style: Copy the style from the original layer and assign it to
the Postgres layer loaded in QGIS.
* Export the style: Export the style of the Postgres layer. You will now
find an option to save the style with the exact name of the layer in the
PostgreSQL database.
* Delete old layers and reload: Delete all associated layers and reload the
layer from the PostgreSQL database.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20250407/af32dafc/attachment.htm>
More information about the QGIS-User
mailing list