Repository navigation
Fix stray gridlines across windowed genper maps - #9309
Merged
Merged
Conversation
gmtmap_genper_crossing and gmtmap_genperw_overlap call the radial and rectangular *_outside tests, which overwrite this_x_status/this_y_status. For a point beyond the horizon whose projection falls inside the window, the status became "inside", gmt_map_outside then copied it to prev_*, and gmtmap_crossing reported a crossing on every segment behind the horizon. gmtmap_radial_crossing then extrapolated those crossings, drawing straight chords across the map and an arc outside the frame. Save and restore the status around the tests in both functions, and drop the GMT_KNOWN_FAILURE flag from test/genper/gridlines2.sh. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
joa-quim
approved these changes
Nov 19, 2026
joa-quim
left a comment
Member
There was a problem hiding this comment.
Very small changes for a fix. I love those.
Member
Author
|
Yes, and I'll make another one soon. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
My goal was to remove the
GMT_KNOWN_FAILUREflag fromtest/genper/gridlines2.sh. Claude suggested the fix and the explanation below.Bug: in windowed
-JGmaps,gmtmap_genper_crossingandgmtmap_genperw_overlapoverwrotethis_x_status/this_y_status. Gridline segments behind the horizon were then taken as crossings and drew straight chords across the map and an arc outside the frame. It affects any windowed genper view whose gridlines cross the horizon.Fix: save and restore the status in both functions (4 lines in
gmt_map.c).This PR re-enable
gridlines2.shand replace its baseline, with the corrected output.Tested with:
gmt psbasemap -Rg -JG225.989/80.319/6166.78/0/0/54.628/68.2/68.2/6i -Bxa30f10g10 -Bya5f5g5 -png mapBefore and after:


🤖 Generated with Claude Opus 5.5.