visgl / deck.gl

WebGL2 powered visualization framework
https://deck.gl
MIT License
12.24k stars 2.08k forks source link

[Bug] Distorted bitmap in LNGLAT coordinate system in Globe view near the poles #7104

Open zakjan opened 2 years ago

zakjan commented 2 years ago

Description

Using example image linked from LNGLAT coordinate system docs in Globe view, the bitmap is visibly distorted near the poles in the longitude direction. It looks like the bitmap is split into 36 segments, 10 degrees longitude wide each.

The image projection is EPSG:4326 which should be compatible with deck's LNGLAT.

Screenshot 2022-06-28 at 20 19 14

I'm not sure what's the cause. Is it possible that there is a missing coordinate conversion in bitmap-layer.ts#L325 to project the image into deck globe mesh?

The issue is more apparent with weather float data, rendered as contours. The distortion results in discontinuous contours. I can provide a sample data file if needed, but solving the issue for the example image above should solve it also for this case.

Screenshot 2022-06-28 at 21 22 46

Flavors

Expected Behavior

Bitmap without visible distortion near the poles.

Steps to Reproduce

Use example image linked from LNGLAT coordinate system docs in Globe view. Rotate to the poles to see the distortion.

https://codepen.io/zakjan/pen/MWQNzLR

Environment

Logs

No response

zakjan commented 2 years ago

Adding a sample pressure data file for testing: 2022062912.tif.zip / 2022062912.color.png. It's converted from a source GRIB without any warping.

It seems that the distortion has the same pattern in both cases, even though they are from different sources.

zakjan commented 2 years ago

Compared to other globes: