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

Problem with the "difference" function #177

Closed
DiracM opened this issue Jul 19, 2023 · 2 comments
Closed

Problem with the "difference" function #177

DiracM opened this issue Jul 19, 2023 · 2 comments

Comments

@DiracM
Copy link

DiracM commented Jul 19, 2023

I was experimenting with the LibGEOS.jl package and I was trying to remove a smaller circle from a larger one. For that I have used the function "difference" without success. The output its almost identical to the bigger circle. I wonder what could be causing this issue. The code to replicate the issue is the following:

using LibGEOS

p1 = LibGEOS.Point(0.0,0.0)
p2 = LibGEOS.Point(0.0,0.0)

c1 = LibGEOS.buffer(p1, 2)
c2 = LibGEOS.buffer(p2, 1)

plot(LibGEOS.difference(c1,c2))

@jaakkor2
Copy link
Contributor

You did not specify which plotting system you are using. This works

using LibGEOS
using GLMakie
using GeoInterfaceMakie
GeoInterfaceMakie.@enable(LibGEOS.AbstractGeometry)

p1 = LibGEOS.Point(0.0,0.0)
p2 = LibGEOS.Point(0.0,0.0)

c1 = LibGEOS.buffer(p1, 2)
c2 = LibGEOS.buffer(p2, 1)

plot(LibGEOS.difference(c1,c2))

If you used Plots.jl, there is an old open issue JuliaPlots/Plots.jl#972 .

@DiracM
Copy link
Author

DiracM commented Jul 20, 2023

Jaakor you are 100% correct on the Plots issue and the alternative that you suggested for the visualization does works. I couldn't ask for more, thank you.

@DiracM DiracM closed this as completed Jul 20, 2023
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