Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[core] Raster tiles blurry #10076

Closed
rinigus opened this issue Sep 27, 2017 · 7 comments
Closed

[core] Raster tiles blurry #10076

rinigus opened this issue Sep 27, 2017 · 7 comments
Labels
Qt Mapbox Maps SDK for Qt, aka Qt Location Mapbox GL

Comments

@rinigus
Copy link
Contributor

rinigus commented Sep 27, 2017

When using Mapbox GL Native with Qt through QML bindings on Linux desktop, I get blurry maps for raster sources/styles. This is very clear on maps that are rendered by Mapnik, for example. To reproduce, compare Leaflet presentation of the same map with the presentation by Mapbox GL and focus on labels.

I compared the images at full zoom levels (14 vs 14, ...). Its clear that 14.x would be interpolated by Mapbox GL, but I was expecting the same sharpness on the full zoom levels. This is not the case. It was tested with pixelRatio=1, tile sizes 512, 1024 (and specified as needed).

When looking into logs of the map server, looks like the same level zoom is loaded as displayed by Mapbox GL when 512 tiles are used. For 1024, you get zoom level fetched from the map server that is one level smaller than displayed.

Maybe there is some smoothing filter applied while rendering the raster maps? Or some interpolation?

As it is, using Mapbox GL with the raster tiles leads to considerable regression in map quality. Which is not desired and would be great to fix.

I can upload images if needed later today.

Possibly related to mapbox/mapbox-gl-js#1030 , which, according to the comments, seems not to be fully explained by Math.floor issue.

I am using my own QML bindings (https://github.com/rinigus/mapbox-gl-qml), but I presume that this did not cause such effect.

@fabian-guerra fabian-guerra added the Qt Mapbox Maps SDK for Qt, aka Qt Location Mapbox GL label Sep 27, 2017
@jfirebaugh
Copy link
Contributor

What is the native size of your raster tiles? If 256px, did you set tileSize: 256 on the raster source?

@rinigus
Copy link
Contributor Author

rinigus commented Sep 27, 2017

I have a server which can output many sizes. I tested 512x512 and specified tileSize: 512 as well as 1024x1024 with the tileSize: 1024:

For example:

{
    "version": 8,
    "name": "Raster",
    "sources": {
        "Raster": {
            "tiles": ["http://localhost:8553/v1/tile?scale=2&z={z}&x={x}&y={y}"],
            "type": "raster",
            "tileSize": 512
        }
    },
    "layers": [
        {
            "id": "raster",
            "type": "raster",
            "source": "Raster",
            "layout": {
                "visibility": "visible"
            },
            "paint": {
                "raster-opacity": 1
            }
        }
    ],
    "id": "test-raster"
}

I have repeated the test using provided Qt demo app (https://github.com/mapbox/mapbox-gl-native/tree/master/platform/qt/app) by replacing the used style with the style above and observed the same effect. Attached are the screenshots from Mapbox GL demo app (zoom level 14) and Leaflet (same zoom level). As you can see, Leaflet shows sharp image while Mapbox GL shows blurred tiles. Finally, an original tile as served by the server is attached as well.
leaflet
mapboxgl
tile

@jfirebaugh
Copy link
Contributor

jfirebaugh commented Sep 27, 2017

Thanks, just wanted to eliminate one common mistake. In that case, this is a duplicate of mapbox/mapbox-gl-js#4552.

@jfirebaugh
Copy link
Contributor

Ooops, that's a gl-js issue -- this is the native equivalent.

@jfirebaugh jfirebaugh reopened this Sep 27, 2017
@SumeetMoray
Copy link

Hi, i am also facing this issue when using a custom raster tile source. One of the TEMPORARY solution to this issue is to reduce the tilesize below 200 for example 150 : this would make the tiles appear more clear but the text size gets very much reduced and it gets difficult to read names of places.

Anyway, does anyone know how to create custom vector tile server and set the style URL. I think this issue would not arise with vector tiles.

@rinigus
Copy link
Contributor Author

rinigus commented Sep 29, 2017

Just an additional note: its not specific to Qt, I have the same blurry map for glfw Linux bindings.

@rinigus rinigus changed the title [Qt] Raster tiles blurry [Qt][GLFW] Raster tiles blurry Oct 1, 2017
@brunoabinader brunoabinader changed the title [Qt][GLFW] Raster tiles blurry [core] Raster tiles blurry Jan 8, 2018
@kkaefer
Copy link
Contributor

kkaefer commented May 9, 2018

This was fixed in #10984

@kkaefer kkaefer closed this as completed May 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Qt Mapbox Maps SDK for Qt, aka Qt Location Mapbox GL
Projects
None yet
Development

No branches or pull requests

5 participants