Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Styles stored inside a GeoPackage are not found anymore by QGIS #58467

Open
2 tasks done
brandtf opened this issue Aug 22, 2024 · 7 comments
Open
2 tasks done

Styles stored inside a GeoPackage are not found anymore by QGIS #58467

brandtf opened this issue Aug 22, 2024 · 7 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Feedback Waiting on the submitter for answers Regression Something which used to work, but doesn't anymore Styles

Comments

@brandtf
Copy link

brandtf commented Aug 22, 2024

[Edit 2024-09-10: Update of expired download link.]

What is the bug or the crash?

During the switch from QGIS-LTR 3.28 to QGIS-LTR 3.34, I noticed some serious problems in the recognition of layer styles inside a GPKG, which also persist in QGIS 3.38. I have a GPKG with multiple styles in table "layer_styles" (ca. 100). The GPKG serves as a template and the correct association of the correct styles and layers is normally done automatically by a script, as there are sometimes multiple saved styles for the same GPKG table (for points, lines and polygons).

grafik

Since the switch of the version, in some cases, for some layers (= GPKG tables), the function "layer.listStylesInDatabase()" remains empty, although there ARE styles saved inside the GPKG for the associated GPKG tables. The lack of found styles can be reproduced manually by a filled GPKG (see below). The styles are not visible in the GUI of QGIS 3.34 or 3.38 but are visible in QGIS 3.28.

GPKG-Download:
Link: https://dap.thueringen.de/s/mSLT23QDEDJf63E
Password: NaIIC80zZzUP

Steps to reproduce the issue

I made an upload with a GPKG , as I was not be able to reproduce the issue with very "simple steps" (i.e. just make 3 layers and 3 styles). It only occures in big GPKGs with multiple styles, and even multiple styles for the same GPKG table.

  1. Load the GPKG inside QGIS (Drag´n´Drop)
  2. Load all Layers (as group)
  3. Properties of Layer: ax_landwirtschaft
  4. Style --> Load style --> From source database
  5. You will see: No style associated with layer, only one other style in database (AX_Wohnplatz_P)
  6. You can´t assign a style that is not shown (and even not found in PyQGIS).

grafik

But:

  1. Properties of Layer: ax_bauwerkimgewaesserbereich
  2. Style --> Load style --> From source database
  3. You will see multiple styles for the layer (different spellings for testing) and all the other styles.
  4. That´s how it should be, But most of the other layers show no (other) styles.

grafik

In QGIS 3.28, all layer styles are found and displayed correctly, when you load the GPKG in the same way.

Versions

QGIS-Version | 3.38.2-Grenoble | QGIS-Codeversion | 130c432

Qt-Version | 5.15.13
Python-Version | 3.12.5
GDAL-Version | 3.9.2
PROJ-Version | 9.4.0
EPSG-Registraturdatenbankversion | v11.004 (2024-02-24)
GEOS-Version | 3.12.1-CAPI-1.18.1
SQLite-Version | 3.45.1
PDAL-Version | 2.6.3
PostgreSQL-Client-Version | 16.2
SpatiaLite-Version | 5.1.0
QWT-Version | 6.2.0
QScintilla2-Version | 2.14.1
BS-Version | Windows 11 Version 2009
  |   |   |  
Aktive Python-Erweiterungen
GeoBasis_Loader | 0.6
GeoCoding | 2.19
plugin_reloader | 0.9.4
db_manager | 0.1.20
grassprovider | 2.12.99
MetaSearch | 0.3.6
processing | 2.12.99

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

No response

@brandtf brandtf added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Aug 22, 2024
@agiudiceandrea agiudiceandrea added Regression Something which used to work, but doesn't anymore Styles labels Aug 22, 2024
@agiudiceandrea
Copy link
Member

agiudiceandrea commented Aug 23, 2024

On Windows 10 the issue doesn't occur using QGIS 3.32.3 (GDAL/OGR 3.7.2) while it does occur since QGIS 3.34.0 (GDAL/OGR 3.7.2).
Hi @manisandro @elpaso , please have a look at this issue report about a regression using styles stored in a GPKG file.

@elpaso
Copy link
Contributor

elpaso commented Aug 23, 2024

I cannot reproduce in current master.

@agiudiceandrea
Copy link
Member

@elpaso, the issue occurs on Windows 10 even using QGIS 3.39.0-Master f90a7c0 (GDAL/OGR 3.10.0dev-b39ca5a8b5) form OSGeo4W.

image

@elpaso
Copy link
Contributor

elpaso commented Sep 1, 2024

@agiudiceandrea

maybe my GDAL master fixed it?

immagine

@agiudiceandrea
Copy link
Member

agiudiceandrea commented Sep 1, 2024

@elpaso, I don't think so, since the issue does occur on my Windows 10 system even running the latest QGIS 3.39.0-Master 343709f with the latest GDAL/OGR 3.10.0dev 526b28c086 from OSGeo4W.

@nyalldawson
Copy link
Collaborator

The original download is no longer available

@nyalldawson nyalldawson added the Feedback Waiting on the submitter for answers label Feb 12, 2025
@agiudiceandrea
Copy link
Member

agiudiceandrea commented Feb 12, 2025

@nyalldawson, here is the original file "example.gpkg" zipped in example.zip (password: NaIIC80zZzUP).
The described behaviour still occurs using QGIS 3.40.3 on Windows 10 (OSGeo4W).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Feedback Waiting on the submitter for answers Regression Something which used to work, but doesn't anymore Styles
Projects
None yet
Development

No branches or pull requests

4 participants