-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Raster tiles aren't perfectly crisp at integer zoom levels #4552
Comments
I can't reproduce this. At a discrete zoom level, 256px raster tiles are rendered at exactly 256px, with no blurriness. Are you sure you don't have a page zoom factor in effect? |
@jaapster are you looking at this on a Retina screen? One guess I have is that browsers apply high-quality upscaling algorithms for displaying 2x-scaled images on the screen, while a OpenGL would do a low-quality bilinear interpolation. |
@mourner I am looking at this on a Dell Ultrasharp U3415W monitor hooked up to a MacBook pro (2015). Some of my teammates that use PC's are experiencing the same results. |
I'm also wondering whether #4443 could have any effect on this. Could you try this on the |
Hi @mourner, I tried it on a build of Still blurry |
I can replicate this issue testing https://www.mapbox.com/mapbox-gl-js/example/map-tiles/ |
Yes, exactly, the result is about the same, but I can clearly see that the
rendered image is blurry....less sharp.
Just look at the MEMORIAL letters....
…On Fri, Apr 7, 2017 at 1:27 PM, Jaap Lous ***@***.***> wrote:
Hi @mourner <https://github.com/mourner>, I tried it on a build of master
and the result is about the same
Original
[image: screen shot 2017-04-07 at 13 23 19]
<https://cloud.githubusercontent.com/assets/1597572/24798343/b5fadc42-1b95-11e7-88ff-6694f4b7dee2.png>
As rendered on the map
[image: screen shot 2017-04-07 at 13 23 37]
<https://cloud.githubusercontent.com/assets/1597572/24798348/ba6d2e9c-1b95-11e7-995c-74eb7999091c.png>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4552 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACNXi6FvwjwExPCRosR0XyR6n0XHbZLRks5rth2KgaJpZM4M1qg9>
.
|
@Pat28 I meant the result shows about the same blurr as I've seen in v0.34.0. |
Tagging this as a bug since we have multiple people noticing the same issue that for an unscaled page (100% zoom) at a discrete zoom level raster tiles are rendered blurry (compared to the raster tile downloaded / stored in the webgl texture; I inspected the texture with WebGL Inspector and it's crisp compared to the rendering). In this tile, I split on the left whats rendered and on the right what's in the texture/downloaded webp (split through the Boise label). It happens with satellite too but it's less noticeable. Interestingly on a device with a devicePixelRatio of 2.25 I don't notice this issue, it looks crisp but on a device with devicePixelRatio of 1 I do. However on the devicePixelRatio of 1 device, if I force using @2x tiles I notice it's still blurry. So appears to be environment specific. This seems to go back to very early in GL JS versions. |
Here's another example where mapbox-gl really does not the best job at rendering raster tiles: Compare https://bl.ocks.org/tyrasd/raw/4242194ccfc1c57562944733d10cbf66/#6/27.452/57.220 to https://tyrasd.github.io/osm-node-density/#7/27.452/57.220/latest (Leaflet slippy map) (via http://www.openstreetmap.org/user/tyr_asd/diary/39009#comment38202 @jenningsanderson) |
Is there an estimation about when will this issue be resolved? We were evaluating MapboxGL to change Leaflet in our map building web app but are facing this same issue, all the raster tiles are much more blurry than on Leaflet to the point of being unusable. |
Can this issue be set to an higher priority because we do use a lot of raster tiles in our project? |
Just adding another example, for what it's worth... |
Not related to this issue, but just in case anyone searches for blurry tiles and ends up reading this issue, make sure if you're using 256px tiles you have set |
Hi, @andrewharvey @kkaefer @jfirebaugh I have the same problem. Just started a project in mapbox-gl and using it with react (no wrapper) Can you help me solve this problem. If you have questions please do ask |
@gabrielmoncea how are you adding the TIFF file? Mapbox GL can't natively read TIFF files, so there's a good likelihood that one of the intermediary steps introduces these artifacts as well. |
@kkaefer I uploaded the files as GeoTIFFs. sorry my bad. |
@gabrielmoncea How are you preprocessing the GeoTiff prior to uploading it as a Tileset? The upload pipeline sometimes has trouble with unusual (anything not 256px) block sizes and this can cause the tiles to be be blurry, but you can usually get around this by specifying the GeoTiff's block size prior to uploading. For example, using GDAL via the command line you can run a command similar to the following:
|
the blocks size in the command line are both 256?
shouldn't one be 512?
…On Thu, May 24, 2018 at 7:31 PM, Josh Erb ***@***.***> wrote:
@gabrielmoncea <https://github.com/gabrielmoncea> How are you
preprocessing the GeoTiff prior to uploading it as a Tileset? The upload
pipeline sometimes has trouble with unusual (anything not 256px) block
sizes and this can cause the tiles to be be blurry, but you can usually get
around this by specifying the GeoTiff's block size prior to uploading.
For example, using GDAL via the command line you can run a command similar
to the following:
gdal_translate -co BLOCKXSIZE=256 -co BLOCKYSIZE=256 input.tif output.tif
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4552 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AlcAwuM2XEgT5lxOYirgsO8TDDDyL8TEks5t1uBUgaJpZM4M1qg9>
.
--
Gabriel Moncea
*Acasus, Junior Developer*
gabriel.moncea@acasus.com
Cyprus: +357 96 758 321
|
@gabrielmoncea for large GeoTiff files we recommend a block size of |
I have the exact same problem and even after executing |
I noticed that raster tiles are somewhat blurry when rendered in Mapbox and did some experimenting.
When at a discrete zoom level (e.g. 14) it appears as if the tiles are rendered slightly smaller than the original size in which they were retrieved from the tile service.
Tile as it was received by the browser:
Resulting image in the map:
Am I correct in assuming that a 256x256 tile is not rendered in 256x256 pixels when at a discrete zoom level?
Once you notice the blurriness of the raster images it is rather annoying.
I'm using version 0.34.0
The text was updated successfully, but these errors were encountered: