Skip to content
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

Support ArcGIS globe #5937

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Support ArcGIS globe #5937

wants to merge 1 commit into from

Conversation

zakjan
Copy link
Contributor

@zakjan zakjan commented Jul 1, 2021

Background

ArcGIS supports rendering a globe with SceneView.viewingMode = global. This PR tries to add support for ArcGIS globe to @deck.gl/arcgis.

viewState computation is not correct yet. I welcome any advise about how to compute deck viewState from ArcGIS camera.

Change List

  • compute viewState depending on view.viewingMode in @deck.gl/arcgis/deck-renderer
  • add new example arcgis-globe

@coveralls
Copy link

coveralls commented Jul 1, 2021

Coverage Status

Coverage decreased (-0.09%) to 82.312% when pulling a0bf1f2 on zakjan:arcgis-globe into 2398eda on visgl:master.

@felixpalmer
Copy link
Collaborator

Can you give more details on how the view state is incorrect? I'm doing some work on syncing the Google Maps view state and will be writing up a doc on this soon. Perhaps it'll be useful for your case also

@zakjan
Copy link
Contributor Author

zakjan commented Jul 1, 2021

It's incorrect on my side, I haven't figured out yet the correct computation from ArcGIS globe camera to deck globe viewState. ArcGIS globe camera x/y/z is in meters. See the four TODOs at https://github.com/zakjan/deck.gl/blob/e423ea56836eaa80ee048d49f42f04f5ac418c53/modules/arcgis/src/deck-renderer.js#L44-L56

There is a new example arcgis-globe, where it can be tested.

@zakjan zakjan force-pushed the arcgis-globe branch 4 times, most recently from 3cc6bee to cb08fa6 Compare July 6, 2021 11:26
@zakjan
Copy link
Contributor Author

zakjan commented Jul 6, 2021

Current state: deck.gl globe overlay matches roughly with ArcGIS globe. ArcGIS globe features disabled in demo: tilt, rotation, sun.

It's still incorrect though, I haven't found out the correct calculations yet. The main challenge is computing deck.gl altitude and zoom from ArcGIS altitude in meters. I'm not sure why deck.gl requires separate altitude and zoom.

Also, for a precise match there might be an issue that Earth radiuses are different, not configurable. deck.gl uses 6370972, ArcGIS uses 6378137.

Screen Shot 2021-07-06 at 13 09 13

Screen Shot 2021-07-06 at 13 09 36

Screen Shot 2021-07-06 at 13 08 55

@felixpalmer
Copy link
Collaborator

Altitude is used both for the projection (think of it as another way to specify FOV) and the view matrix. A similar approach is taken by Mapbox, but this isn't always what other libraries do. For background, you might want to take a look at:

https://github.com/visgl/deck.gl/blob/felix/google-vector/docs/developer-guide/base-map-viewport-alignment.md

#5930

@zakjan
Copy link
Contributor Author

zakjan commented Jul 6, 2021

Thanks for the fresh new guide, I'll go through it! Because ArcGIS altitude is in meters, it seems that it serves both purposes, defining FOV and map zoom level.

@GemT27
Copy link

GemT27 commented Oct 26, 2023

HI, is there any progress on this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants