-
Notifications
You must be signed in to change notification settings - Fork 27
Avoid line-wrapping artifacts #292
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
Comments
This and #290 are all symptoms of the same problem - Makie does not know the nature of a geographic transformation, and so cannot rescale / resample accordingly. All the tools to do that live in GIS world, it's just that Makie doesn't know how to use them :( This is part of a larger refactor that we have to do to make transform_funcs easier to use in general, for which GeoMakie currently has several hacks :) But for now, @gaelforget implemented a line splitting algorithm in https://github.com/MakieOrg/GeoMakie.jl/blob/master/src/linesplitting.jl that should help - you just call |
JuliaGeo/GeometryOps.jl#283 contains some code that will solve this for all geometries, and MakieOrg/Makie.jl#4630 may introduce a mechanism that will allow GeoMakie transform funcs to operate on geometry as well. |
In the meantime, just call The actual implementation is in https://github.com/JuliaAPlavin/MakieExtra.jl/blob/00000000c7ca5b037a54c87203bab78b6a4013d3/ext/GeoMakieExt.jl#L57-L122, I think a pretty simple extensible mechanism. The only issue is that it always cuts at +- half a turn, I don't know how to extract the antimeridian from a GeoAxis (https://github.com/JuliaAPlavin/MakieExtra.jl/blob/00000000c7ca5b037a54c87203bab78b6a4013d3/ext/GeoMakieExt.jl#L48). |
Uh oh!
There was an error while loading. Please reload this page.
upd 2025: call
MakieExtra.GeoAxis_splitwrap!()
before all GeoAxis plotting to avoid these artifactsA simple line plot like
results in

with a clear wrapping artifact. It's possible to manually split the line into multiple separate ones, or add a NaN point in the middle – but would be great to have it automatically :) Also, different projections may presumably have different wrapping lines, right?
Probably relevant to #290, but could be easier :)
The text was updated successfully, but these errors were encountered: