deck.gl icon indicating copy to clipboard operation
deck.gl copied to clipboard

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

Open zakjan opened this issue 3 years ago • 2 comments

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

  • [X] React
  • [ ] Python/Jupyter notebook
  • [ ] MapboxLayer
  • [ ] GoogleMapsOverlay
  • [ ] CartoLayer
  • [ ] DeckLayer/DeckRenderer for ArcGIS

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

  • Framework version: 8.7.12
  • Browser: any
  • OS: any

Logs

No response

zakjan avatar Jun 28 '22 19:06 zakjan

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 avatar Jun 29 '22 21:06 zakjan

Compared to other globes:

  • Cesium doesn't suffer from the same segmentization. https://codepen.io/zakjan/pen/oNqxYLK This confirms that the image doesn't contain the segments.
  • Mapbox, ArcGIS don't support equirectangular images yet.

zakjan avatar Jul 08 '22 05:07 zakjan