-
Notifications
You must be signed in to change notification settings - Fork 4
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
Visual glitches with open=FALSE #2
Comments
Thanks very much for the report! This is just to let you know I have seen it - it may take a little while to investigate. |
In case it is a useable workaround, have you seen the {gridGeometry} package? That makes use of the {polyclip} package to generate polygon offsets. If you only require fixed width offsets, that should do the job for you. {gridGeometry} is explained here and the polygon offset stuff in particular here. |
Thank you for the suggestion, it looks quite promising and may solve my situation. I'll try in the next couple days (+/- life's priorities) and post back. |
Do have a feel for 0.4.0 may be released to CRAN? And wow this package is also just brilliant! I think it's going to work for my use cases. I briefly chased an issue with orientation of nested polygons... then realized you have the argument I'll keep on with it from here. Thanks again for the spot-on suggestion! |
I believe the original problem with {vwline} is now solved. Interestingly, the seemingly small problem with one of the "round" corners being "bevel" was the clue; the final corner on closed lines was not being used properly. {vwline} version 0.2-3 (with this fix) has been submitted to CRAN. |
{gridGeometry} version 0.4-0 has also been submitted to CRAN. |
I love this package, such a cool idea! For what it's worth, I'm intending to use it to render polygons with inner and/or outer borders. (I'm surprised mapping tools
sf
don't have options to render inner border to colorize adjacent countries, or counties.) Anyway this package seems like the ideal choice, so I'm converting my previous kludge to usegrid
andvwline
. Winning. :)I'm posting the issue to make sure you've seen it. I have a workaround - TL;DR use
linejoin="bevel"
Test case is below, starting with
linejoin="bevel"
:That works fine. But if using
linejoin="round"
(default) orlinejoin="mitre"
, they produce graphical glitches:(It looks even odder with
linejoin="mitre"
.)I dug around a bit, and it appears to affect a specific edge case - a common one, but specific.
For my testing, it only occurs with counter-clockwise points, closed polygons
open=FALSE
, only (or mostly?) on the outer portion of the line, and only forlinejoin="round"
andlinejoin="mitre"
.If I reverse the order of points (so it draws clockwise), the problem appears to be gone:
However, it doesn't fully avoid the problem, the bottom-right corner is "bevel" and not "round". (Confirmed by drawing the same with
linejoin="mitre"
it still shows "bevel" in that corner.) Frankly, I can live with that, if that's as intended.Fully love the package - I'm going to use "bevel" for time being, but wanted to post some positive feedback from a user, and let you know about the graphical artifacts. And if I've done something wrong on my end, sorry for taking your time!
(PS - Is there an equivalent to
grid::grid.path()
?)The text was updated successfully, but these errors were encountered: