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

deck.gl and ArcGIS' `SceneView` 3D camera are not aligned properly

Open damix911 opened this issue 5 years ago • 9 comments

Description

deck.gl and ArcGIS' SceneView 3D camera are not aligned properly.

Repro Steps

  • Open this pen: https://codepen.io/dawken/pen/abmyLoP
  • The first SceneView uses an Esri VTL basemap
  • The second SceneView uses the raster version of the same basemap
  • Notice how the scale of the deck.gl ScatterplotLayer is different compared to the basemap
  • Move the camera; both views suffer from alignment issues. Notably, the view with the VTL basemap is good if you don't tilt; the view with the raster basemap shows severe lack of alignment even without tilt.

Environment (please complete the following information):

Reported in deck.gl 8.3.0 by @llwinner.

Logs

Nothing relevant.

damix911 avatar Dec 21 '20 08:12 damix911

Is there any timeline as to when this bug may be resolved or is support for ESRI going away? At NOAA, we are visualizing weather data with deck.gl and unfortunately our mapping contracts are tied to ESRI.

wilson0028 avatar Apr 14 '22 12:04 wilson0028

Thank you @wilson0028. We are working on it, I apologize for the delay in addressing this. I'll get back to you with updates next week. Thank you for your patience.

damix911 avatar Apr 14 '22 14:04 damix911

You are right @wilson0028 there is still an issue with the zoom level; @Pessimistress made a lot of improvements to the original code and I believe that a lot of cases have been fixed. But there is still a difference between vector tiles basemaps and raster basemaps.

Screenshot from 2022-04-24 15-00-57

It could be solved by properly translating the zoom level; we are basically off by a factor of 2 (i.e. a single zoom level).

Screenshot from 2022-04-24 15-01-22

Can you please tell us more about the issue that you are experiencing? Is it happening in local 3D mode with a raster tile basemap?

Thanks!

damix911 avatar Apr 24 '22 22:04 damix911

@damix911 Thank you for looking into this issue! We are using SceneView with vector and raster tiles. Some vector tiles work like the example below (dark-gray-vector) while others fail (topo-vector) works Here is an example of a vector layer that doesn't work (topo-vector - notice how my state lines layer doesn't match the ESRI state lines) wrong1 Here is an example using a raster ESRI layer (satellite - again notice how the state lines don't match up) wrong2

wilson0028 avatar Apr 25 '22 17:04 wilson0028

Yes, makes sense, thank you. I am surprised by topo-vector, but not entirely because it includes a raster component (the hillshade) and so it behaves as raster from a scale perspective.

The problem is that the integration between deck.gl and ArcGIS is still based on this view class: https://deck.gl/docs/api-reference/core/map-view We really shouldn't; I hope to switch to a different integration strategy soon but I haven't been able so far, sorry :-(

Anyway, there is nothing wrong with map-view; but it is modelled after MapBox GL. For the ArcGIS/deck.gl 2D integration, we have a reliable way to determine the zoom level from the scale in the WebMercator case; we can do this both for vector tile basemaps (where the behaviors of the ArcGIS JS API/MapBox/Deck.GL all match) and raster basemaps, where we are off by a factor of 2 but it can be detected.

We need to do the same for 3D. I am in contact with my colleagues that work on 3D, hopefully we can fix it soon. In the meantime, I have been experimenting in a local branch of mine. Basically, if you inject a scale factor (1 or 2, depending on the basemap) from the app, any basemap can be made to work; see this and this.

If it helps in the meantime, you can check out my branch, and yarn bootstrap, cd examples/get-started/pure-js/arcgis-3d, yarn, yarn start-local.

We need to make this scale detection automatic.

modern-antique streets-vector streets nova topo topo-vector satellite dark-gray dark-gray-vector

damix911 avatar Apr 25 '22 21:04 damix911

@damix911 Would love to see this working under ESRI 3d? If you give me any pointers, I can look at fixing it. We display Network Graphs on the map with ArcLayer (curve lines). Would be cool to see them in 3d. For now we disabled deck.gl and used ESRI FeatureLayer under 3d because of this issue.

Thanks.

sgavathe avatar Nov 04 '22 21:11 sgavathe

HI, is there any progress on this issue, I test the problem still exists. Thank you!

Brave-Jun avatar Mar 28 '23 08:03 Brave-Jun

Hi team, any update on this issue?

mnsr002 avatar Oct 14 '23 22:10 mnsr002

Hi team, any update on this issue?

GemT27 avatar Oct 26 '23 11:10 GemT27