Closed asinghvi17 closed 2 months ago
A way to get the axis stuff could be that the GeoAxis has two kinds of limits. One, which is the traditional "limits/targetlimits/finallimits" pipeline, is concerned purely with transformed space, i.e., the space of the Scene. Meanwhile, let us introduce a new attribute input_limits
, which will concern itself purely with the limits in input space, i.e., where the latitude and longitude ticks should be. This can influence the transformed limit space only when set by lonlims!
/latlims!
/lims!
.
However, the transformed limits can influence the input limits, subject to the following conditions.
dynamic_longlat_limits
or something which can be set to false if the user does not want the limits to change.Things we still have to figure out for this interface:
The eventual goal is to do e.g. this
using GMT; GMT.coast(proj=(name=:Orthographic, center = [74 15]), R="global", show=true)
in GeoMakie. Note that you can actually see the pole here, and the black border around the globe is not a straight line in lon/lat space.
I would also want ticks, ticklabels, grid etc to be shown.
The interesting thing is that they seem to be using a contour line to show the border here, which we could do pretty easily. Then, from there you just do a bunch of projection on a lon/lat grid between pixel, lon/lat and transformed space to figure out how this should work. Since we're using a contour line, with sufficient resolution it should be pretty accurate.
Figured out a contour line solution for the border. This looks good when not interacting with the plot:
but when you do start interacting it takes a terribly long time to recompute, and doesn't exactly look great 😢
Implemented in GeoMakie v0.7.0
basically, the user should interact with the limits in the space of
source
("input space") and the limits should be actually specified in the space oftarget
("transformed space"). Ticks etc can be found by applying an inverse transform to the data limits of the Scene.