[Qgis-user] Working with QGIS 3 with styles stored in spatialite database

Jorge Gustavo Rocha jgr at geomaster.pt
Thu Jun 13 02:52:36 PDT 2019


Hi Anna,

The export layer just export data. When you do a "Save Vector Layer
as..." only the data is copied to the new GeoPackage.

Right now, you have to:

i) Export data (and add it as a layer)

ii) Copy and paste the style(s) fro the old layer to the new layer

iii) Save the style(s) in the new GeoPackage, one by one

iv) Distribute the GeoPackage with the data and all the styles. If you
save more than one style, you are able to selected which one to apply
(Layer Properties → Style → Load style "from database (GeoPackage)" and
you see the list of "Other styles on the database", on the bottom of the
dialog, with a name and description.)

Would you like to also save all layers styles when you export a layer? I
think that does make sense. I don't know if anyone else already
requested this. Can you search https://github.com/qgis/QGIS/issues and
create a new feature request, if necessary?

Regards,

Jorge Gustavo

Às 10:34 de 13/06/19, Anna Muñoz escreveu:
> Hello,
>
> I am working in QGIS 3.4 with a geopackage file (SQLite database)
> containing geographic information (points, lines and polygons).
> In QGIS, I have defined by hand a style for every layer in geopackage
> (gpkg).
> It's a time consuming task so I have saved layer styles in QML file,
> and also in the  GPKG  file.
> When I open my GPKG file in another QGIS session it works well showing
> every layer with their style.
>
> Questions:
>
> 1. I have problems when export the styled gpkg to another gpkg.
>    The output file doesn't contain the layer_styles table so the
> styles definitions are lost.
>    It doesn't matter if I export completely the gpkg stylized or only
> selected features.
>    Of course I can apply QML file but I would like to have the
> symbology stored in the geopackage.
>
>    Maybe I have to check any specific option to export the gpkg file?
>
> 2. By other hand, I defined different styles (3 or more) to the same layer
>    and I saved these styles to the geopackage (they are well stored in
> layers_styles table).
>
>    When I open my gpkg file in another QGIS session, only the default
> style is applied to the layer (tha's ok).
>    But, loading other styles from sqlite database doesn't apply to the
> layer and QGIS doesn't show any error message.
>
>    How can I use other styles saved in gpkg?
>
> Thank you in advance for your time !
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
-- 
Logo*   Geomaster, LDA*
  *VENHA DESCOBRIR O CAMINHO DO OPEN SOURCE CONNOSC**O

*
 
Avenida Barros e Soares
N.º 423, 4715-214 Braga
VAT/NIF510 906 109
Phone  +351 253 680 323
Site       geomaster.pt <http://geomaster.pt>
GPS       41.53322, -8.41929
	
------------------------------------------------------------------------
	 
Jorge Gustavo Rocha
CTO

Mobile  +351 910 333 888
Email    jgr at geomaster.pt


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20190613/4f2726b3/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cropped-geomaster300x300-1.png
Type: image/png
Size: 33896 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20190613/4f2726b3/attachment-0001.png>


More information about the Qgis-user mailing list