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

Avoid line-wrapping artifacts #292

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

Avoid line-wrapping artifacts #292

aplavin opened this issue Nov 21, 2024 · 1 comment

Comments

@aplavin
Copy link

aplavin commented Nov 21, 2024

A simple line plot like

lines(
	[(x, x/4) for x in range(0, 300, length=100)];
	axis=(;type=GeoAxis)
)

results in
Image
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 :)

@asinghvi17
Copy link
Member

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 split(linestring::GeometryBasics.LineString, ga::GeoAxis) and it gives you a "split-up" line

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