Open lazarusA opened 2 years ago
Neat! This will definitely be useful, I'd love to add it as a test if you're OK with that!
Many of the projections which fail here have singularities or infinities at the traditional lon in (-180,180)
and lat in (-90,90)
limits. E.g., web mercator cannot show the poles, airy also has singularity conditions. You could try to set lonlims=automatic, latlims=automatic
in GeoAxis
, which I'm pretty sure should help with at least the Mercator-type and Airy projections.
I'm currently changing the projection system which breaks a lot of this locally (basically all of it, actually) but the only way we could do this in the way which Cartopy does would be if we had knowledge of the domain of any arbitrary projection, which I don't believe Proj gives.
In general, I'd have to say that if lines work, so should surface (for the same domain). Note that all the axes are either well-formed or nonexistent (which happens when the bounds of the axis project to infinity).
I'd love to add it as a test if you're OK with that!
Sure, that's why I'm sharing :D
Many of the projections which fail here have singularities or infinities.
Indeed, in this regard maybe some proper initial default values for certain projections and domains will be helpful.
I'm currently changing the projection system which breaks a lot of this locally...
Great!, I hope the user syntax is still similar, which as of now feels natural (in the Makie sense :D ).
The syntax shouldn't change, only the internals :D (right now there are issues with the inverse transformation which are pretty fundamental, for example).
Note for this issue: at this point, with the PR Block geoaxis, there's something strange with the size. This is what I get (notice that the sizes are quite small)
The errors I get are:
which leads me to believe that we should: (a) just return NaN or Inf when Proj errors with invalid lat/long. (b) create a custom "text boundingbox finder" which ignores all infinite textboxes, i.e., textboxes with origin at infinity.
You may find this PROJ issue informative on why some projections have not worked at all.
Thanks! I encountered that a while ago - that's why the transformation code in utils.jl
is so verbose, it's actually a try-catch on each transformation in case Proj reports an error :(.
Maybe we could speed that up in Proj.jl itself, perhaps a fast path when applying a transform (or fast_apply(transform, ...)
which returns NaN when the point is invalid for whatever reason?
With the latest changes to geoaxis that I've made, pretty much every projection just works (although we still have quite a bit of work to do to figure out valid limits etc).
Sorry, can't comment on that. I know nothing about GeoMakie code. Just thought the info could be useful as I found the same problem when calling PROJ trough GDAL.
I did the following subset of projections (almost all available from Proj4) to test how many are done correctly and show them in BeautifulMakie(output). Is better than expected, still some corner cases [that I don't use], but those are really hard to get right. Either way, I leave the code here as reference. This is just for lines, I can imagine that for surfaces (heatmaps) less will be successful.