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

[WIP] Globe axis #278

Merged
merged 26 commits into from
Jan 31, 2025
Merged

[WIP] Globe axis #278

merged 26 commits into from
Jan 31, 2025

Conversation

asinghvi17
Copy link
Member

@asinghvi17 asinghvi17 commented Oct 30, 2024

This PR builds towards a 3D Globe Axis, that currently will accept a Geodesy.jl datum as the ellipsoid definition, and try to work in ECEF coordinates. We can add more functionality, integration with CoordRefSystems.jl datums, etc later.

This axis will:

  • Automatically apply a transform_func to all plots, going to 3D cartesian space.
  • Lock certain zoom keys so you can interact with this like Google Earth
  • Add a "satellite" camera-interaction API so you can move the camera in spherical space.
  • Subsample polygon meshes so that they always lie on the sphere to some approximation, not under it
  • Allow the following GlobeAxis-specific keywords:
    • zlevel: set the "z-level" i.e., some radius offset, so it's easier to layer plots (e.g earth image below, polygons above, etc
    • source: same as GeoAxis source, indicate a source CRS
  • Add a "background" sphere by default, using a modified icosphere algorithm, that could at some point be parameterized to hold some background image as well.

More todos to come. This is an expansion of the Geodesy.jl approach that was taken previously

@lupemba
Copy link

lupemba commented Nov 12, 2024

This is really awesome. Do you think it will work with Tyler.jl?

@asinghvi17
Copy link
Member Author

@lupemba I'm going to be working on that sometime this month :D - just got Tyler to support GeoMakie (though interactivity is a bit buggy).

The challenge here is that you have to figure out the intersection of the camera's view frustum (essentially a "pyramid section" along the central axis) with the sphere, and then figure out which lat/long area is visible. This is solveable, of course, but tricky, so it will be some time until I can figure out exactly how to solve that. Once that is done, then Tyler will work with this, but will have "holes" at the poles beyond -85 and +85 degrees latitude. That's an inherent limitation of the Web Mercator crs, so we'll just have to deal with it I suspect.

@asinghvi17
Copy link
Member Author

asinghvi17 commented Jan 24, 2025

I'm going to merge this anyway so we get the new Makie compat, and marked the GlobeAxis still experimental. It's going to change a bit at least in the interim anyway.

Datum shifts are still not implemented there and neither are spherical geometry or dynamic polygon resampling in meshes.

@asinghvi17 asinghvi17 merged commit 941cf5d into master Jan 31, 2025
1 of 2 checks passed
@asinghvi17 asinghvi17 deleted the as/sphereaxis branch January 31, 2025 21:20
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.

2 participants