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

Add a SphericalAxis function #293

Open
aplavin opened this issue Nov 21, 2024 · 1 comment
Open

Add a SphericalAxis function #293

aplavin opened this issue Nov 21, 2024 · 1 comment

Comments

@aplavin
Copy link

aplavin commented Nov 21, 2024

Currently, as I understand from earlier discussions with @asinghvi17, GeoAxis assumes some ellipse/geoid for the shape, and takes coordinates in degrees. I (and others in astronomy) typically want to plot a regular sphere, with native units (radians) for lat/lon.
I've been using this snippet (again, adapted from @asinghvi17 recommendations):

SphericalAxis(args...; kwargs...) = GeoAxis(args...; 
	source="""
	GEOGCRS["WGS 84",
	    DATUM["World Geodetic System 1984",
	        ELLIPSOID["WGS 84",6378137,298.257223563,
	            LENGTHUNIT["metre",1]],
	        ID["EPSG",6326]],
	    PRIMEM["Greenwich",0,
	        ANGLEUNIT["radian",1],
	        ID["EPSG",8901]],
	    CS[ellipsoidal,2],
	        AXIS["geodetic latitude (Lat)",north,
	            ORDER[1],
	            ANGLEUNIT["Rad",1]],
	        AXIS["geodetic longitude (Lon)",east,
	            ORDER[2],
	            ANGLEUNIT["Rad",1]]]
	""", kwargs...,)

There is quite some magic here, but it works :) Can such a function be added to GeoMakie?

@asinghvi17
Copy link
Member

Not sure about reserving the spherical axis name since that can also mean a 3D sphere. But in general yes, would be nice to host the definition of this CRS in GeoMakie.

Would something like GeoMakie.UNIT_SPHERE_RADIANS_CRS work for this?

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

No branches or pull requests

2 participants