MakieOrg / Tyler.jl

Makie package to plot maptiles from various map providers
https://makieorg.github.io/Tyler.jl/dev/
MIT License
64 stars 9 forks source link

Tyler is plotting the wrong tiles with Makie 0.21 #82

Open felixcremer opened 3 months ago

felixcremer commented 3 months ago

With Makie 0.21 on this branch https://github.com/MakieOrg/Makie.jl/tree/breaking-0.21 Tyler is somehow randomly plotting the wrong tiles see the appearance of France in two zoom levels in the image below.

This is the code I used to produce the plot:


using Tyler, GLMakie
using Extents

fig = Figure()

nax = Axis(fig[1,1])
london = Rect2f(-0.0921, 51.5, 0.04, 0.025)
m = Tyler.Map(london, figure=fig, axis=nax)

This problem does not appear with Makie 0.20.

image

SimonDanisch commented 3 months ago

Hm weird... I would have suspected z-fighting, but the z should be quite far appart: image

Although maybe it's projected/shifted in a way, that it gets close enough for z-fighting, not sure...

asinghvi17 commented 2 months ago

I can replicate this locally, and the error seems to happen regardless of which zoom level I'm on. Scaling the z levels also doesn't solve this. It looks almost as if there are stale tiles that become ill-positioned?

asinghvi17 commented 2 months ago

This is still an issue on the latest Makie master, although it seems to only happen at higher zoom levels. When zooming in I stop seeing this.

SimonDanisch commented 2 months ago

We'll need an MWE to properly debug this....

asinghvi17 commented 1 week ago

It looks almost as if there's something wrong with the way tile.y is translated into a y coordinate maybe?

felixcremer commented 1 week ago

Hm weird... I would have suspected z-fighting, but the z should be quite far appart

Isn't this only moving all z levels? Should we muliply the z level by a factor?

asinghvi17 commented 1 week ago

I think there was a scaling that multiplied all z values by 0, that was one issue I fixed in my PR IIRC

asinghvi17 commented 1 week ago

This is caused by https://github.com/MakieOrg/Makie.jl/issues/4022, and with Simon's branch it will work on other systems (just not Macs).