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

Fix projected line strings getting truncated early. #1146

Merged
merged 1 commit into from
Oct 23, 2018

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Oct 13, 2018

Rationale

Essentially, #1131 is another case of an infinite loop like #325. The fix from #567 was to stop splitting after "too many" lines were created. However, it was applied to the entire line string, which meant the entire path could get truncated. Instead, make the limit apply to each segment individually.

Since each segment is somewhat smaller, drop the limit a bit to compensate for having to go through more segments. This keeps things running in a reasonable time. (The test case added here would be ~4 times slower with the old limit.)

Implications

In #1131, this caused a contour on the top-left to be incomplete with the Mollweide projection. Additionally, the contour that grazed the bottom pole disappeared entirely, presumably because the line string started at the bottom and was truncated almost immediately.

Fixes #1131.
Fixes #802.
Fixes #724.
Fixes #1015.

The limit to prevent an infinite loop attempting to split line segments
"small enough" was applied to the entire line string, which meant the
entire path could get truncated. Instead, make the limit apply to each
segment individually. Since each segment is somewhat smaller, drop the
limit a bit to compensate for having to go through more segments. This
keeps things running in a reasonable time.
@dopplershift dopplershift merged commit 2c7ffa8 into SciTools:master Oct 23, 2018
@QuLogic QuLogic deleted the line-split-cap branch October 23, 2018 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants