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

Mapbox GL style converter skips step expressions #57989

Closed
1 of 2 tasks
1ec5 opened this issue Jul 4, 2024 · 2 comments · Fixed by #58233
Closed
1 of 2 tasks

Mapbox GL style converter skips step expressions #57989

1ec5 opened this issue Jul 4, 2024 · 2 comments · Fixed by #58233
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Vector tiles

Comments

@1ec5
Copy link

1ec5 commented Jul 4, 2024

What is the bug or the crash?

When opening an MVT layer with a Mapbox or MapLibre stylesheet, QGIS attempts to convert the stylesheet to QGIS symbology, but this converter lacks support for the very common step expression operator, causing significant glitches in the resulting layer.

Steps to reproduce the issue

  1. Follow these instructions to create a vector tile layer that has many symbols and labels based on an OpenHistoricalMap style.
  2. Note the banner warning that “Style could not be completely converted”. Click the Details button.

Many of the layers include properties or filters set to step expressions, which result in the following warnings:

  • roads_motorway: Skipping unsupported expression
  • roads_motorway_construction: Skipping unsupported expression
  • roads_motorwaybridgetop: Skipping unsupported expression
  • roads_motorwaybridgetop_construction: Skipping unsupported expression

Versions

(Yes, I know v3.36 is a couple releases behind, but it’s the most recent version currently available for macOS.)

QGIS version 3.36.3-Maidenhead QGIS code revision 2df9655
Qt version 5.15.2
Python version 3.9.5
GDAL/OGR version 3.3.2
PROJ version 8.1.1
EPSG Registry database version v10.028 (2021-07-07)
GEOS version 3.9.1-CAPI-1.14.2
SQLite version 3.35.2
PDAL version 2.3.0
PostgreSQL client version unknown
SpatiaLite version 5.0.1
QWT version 6.1.6
QScintilla2 version 2.11.5
OS version macOS 14.5
       
Active Python plugins
QuickOSM 1.16.0
nominatim_locator_filter 0.2.3
processing 2.12.99
grassprovider 2.12.99
db_manager 0.1.20
MetaSearch 0.3.6

Supported QGIS version

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

New profile

Additional context

The warnings come from here:

context.pushWarning( QObject::tr( "%1: Skipping unsupported expression" ).arg( context.layerId() ) );

The converter has some support for the interpolate operator, so step should be handled similarly.

@1ec5 1ec5 added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Jul 4, 2024
3nids added a commit to 3nids/QGIS that referenced this issue Jul 24, 2024
3nids added a commit to 3nids/QGIS that referenced this issue Jul 24, 2024
@3nids 3nids closed this as completed in 9ddd2de Aug 16, 2024
3nids added a commit to 3nids/QGIS that referenced this issue Aug 20, 2024
@pathmapper
Copy link
Contributor

Here is a style which isn't working with master:

https://krzn.ldproxy.net/lika/styles/vw-tn-flst-geb?f=mbs

@3nids 3nids reopened this Sep 11, 2024
@3nids 3nids self-assigned this Sep 11, 2024
@pathmapper
Copy link
Contributor

Here a simplified version vw-tn-flst-geb.json:

"text-field" : [ "step", [ "zoom" ], "default", 16, "test" ]

3nids added a commit to 3nids/QGIS that referenced this issue Sep 13, 2024
3nids added a commit to 3nids/QGIS that referenced this issue Sep 13, 2024
@3nids 3nids closed this as completed in dc1a854 Sep 13, 2024
velle pushed a commit to velle/QGIS that referenced this issue Sep 17, 2024
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! Vector tiles
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants