qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.35k stars 2.98k forks source link

Stadia vector tiles fail to display labels / load fonts #58316

Open MarcusCrowley opened 1 month ago

MarcusCrowley commented 1 month ago

What is the bug or the crash?

Stadia provides a vector tile set called Alidade Smooth:

https://docs.stadiamaps.com/map-styles/alidade-smooth/#__tabbed_1_1

I can load this background tile set in QGIS 3.28.9 on Windows 10 but the labels are missing due to a failure to load the requisite fonts:

image

image

The URL is

https://tiles.stadiamaps.com/data/openmaptiles/{z}/{x}/{y}.pbf

while the Style URL is

https://tiles.stadiamaps.com/styles/alidade_smooth.json

Why are the fonts failing to load?

Steps to reproduce the issue

  1. Get a Free account from Stadia: https://stadiamaps.com/pricing/. Get yourself an API key.
  2. In QGIS, in a new (or existing) map, in the Browser panel under Vector Tiles, right click to create a New Generic Connection.
  3. Paste in the URL and Style URL I list above.
  4. Add the Vector Tiles layer to your map.
  5. Look out for error messages and / or missing map labels.

Versions

QGIS version 3.28.9-Firenze QGIS code revision 66f4d63ad4 Qt version 5.15.3 Python version 3.9.5 GDAL/OGR version 3.7.1 PROJ version 9.2.1 EPSG Registry database version v10.088 (2023-05-13) GEOS version 3.12.0-CAPI-1.18.0 SQLite version 3.41.1 PDAL version 2.5.5 PostgreSQL client version unknown SpatiaLite version 5.0.1 QWT version 6.1.6 QScintilla2 version 2.13.1 OS version Windows 10 Version 2009

Active Python plugins FreehandRasterGeoreferencer 0.8.3 GeometryShapes 0.7 HCMGIS 24.1.12 latlontools 3.6.20 mmqgis 2021.9.10 QGISSortAndNumber-master 1.0 QPackage 1.5 db_manager 0.1.20 grassprovider 2.12.99 MetaSearch 0.3.6 processing 2.12.99 sagaprovider 2.12.99

Supported QGIS version

New profile

Additional context

I am also in contact with Stadia support.

agiudiceandrea commented 1 month ago

@MarcusCrowley, thanks for reporting. Please try if the issue still occurs also running a currently supported QGIS version according to the roadmap.

MarcusCrowley commented 1 month ago

@agiudiceandrea yes it is exactly the same:

image

Here is a dump of the warnings:

The following warnings were generated while converting the vector tile style: airport_label_gen0: Referenced font Stadia Regular is not available on system airport_label_gen0: Skipping unsupported expression highway_name_major: Referenced font Stadia Regular is not available on system highway_name_major: Skipping unsupported expression highway_name_other: Referenced font Stadia Regular is not available on system highway_name_other: Skipping unsupported expression highway_shield_other: Referenced font Stadia Regular is not available on system highway_shield_us_interstate: Referenced font Stadia Regular is not available on system highway_shield_us_other: Referenced font Stadia Regular is not available on system place-continent: Referenced font Stadia Bold is not available on system place_capital_gen0: Could not retrieve sprite '' place_capital_gen0: Referenced font Stadia Regular is not available on system place_capital_gen0: Skipping unsupported expression place_capital_gen1: Could not retrieve sprite '' place_capital_gen1: Referenced font Stadia Regular is not available on system place_capital_gen1: Skipping unsupported expression place_city: Could not retrieve sprite '' place_city: Referenced font Stadia Regular is not available on system place_city: Skipping unsupported expression place_city_large: Could not retrieve sprite '' place_city_large: Referenced font Stadia Regular is not available on system place_city_large: Skipping unsupported expression place_country_major: Referenced font Stadia Semibold is not available on system place_country_major: Skipping unsupported expression place_country_other: Referenced font Stadia Semibold is not available on system place_country_other: Skipping unsupported expression place_other: Referenced font Stadia Regular is not available on system place_other: Skipping unsupported expression place_state: Referenced font Stadia Regular is not available on system place_state: Skipping unsupported expression place_suburb: Referenced font Stadia Regular is not available on system place_suburb: Skipping unsupported expression place_town: Could not retrieve sprite '' place_town: Referenced font Stadia Regular is not available on system place_town: Skipping unsupported expression place_village: Referenced font Stadia Regular is not available on system place_village: Skipping unsupported expression poi_gen0_other: Referenced font Stadia Regular is not available on system poi_gen0_other: Skipping unsupported expression poi_gen0_parks: Referenced font Stadia Regular is not available on system poi_gen0_parks: Skipping unsupported expression poi_gen1: Referenced font Stadia Regular is not available on system poi_gen1: Skipping unsupported expression railway_dashline: Skipping unknown layer type water_name_line: Referenced font Stadia Italic is not available on system water_name_line: Skipping unsupported expression water_name_nonocean: Referenced font Stadia Italic is not available on system water_name_nonocean: Skipping unsupported expression water_name_ocean: Referenced font Stadia Italic is not available on system water_name_ocean: Skipping unsupported expression

And here is my "About" information from the newly installed version of QGIS:

QGIS version 3.34.9-Prizren QGIS code revision cbbc7bdf Qt version 5.15.13 Python version 3.12.4 GDAL/OGR version 3.9.1 PROJ version 9.4.0 EPSG Registry database version v11.004 (2024-02-24) GEOS version 3.12.2-CAPI-1.18.2 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 OS version Windows 10 Version 2009

Active Python plugins FreehandRasterGeoreferencer 0.8.3 GeometryShapes 0.7 HCMGIS 24.1.12 latlontools 3.6.20 mmqgis 2021.9.10 QGISSortAndNumber-master 1.0 QPackage 1.5 db_manager 0.1.20 grassprovider 2.12.99 MetaSearch 0.3.6 processing 2.12.99

nyalldawson commented 1 month ago

The missing font is just a warning -- it shouldn't affect the presence of labels. I suspect the actual issue here is the "Skipping unsupported expression" errors.

MarcusCrowley commented 1 month ago

What do you recommend I do now?