Fix issue "Oblique projection (Ob): Partly wrong annotations" - #9160
Open
joa-quim wants to merge 2 commits into
Open
Fix issue "Oblique projection (Ob): Partly wrong annotations"#9160joa-quim wants to merge 2 commits into
joa-quim wants to merge 2 commits into
Conversation
Two independent defects produce the reported symptoms. Placement: with MAP_ANNOT_OBLIQUE's tick_extend the annotation is put at the tip of the tick extended along the gridline, so gmtplot_map_symbol divides its offset by the sine or cosine of the angle at which the gridline meets the border. gmtplot_map_tick refuses to draw such a tick once that angle drops below MAP_ANNOT_MIN_ANGLE, but gmtplot_map_symbol divided anyway: for a shallow crossing the offset blows up and the label lands far along the border, detached from its crossing, with no tick to connect them. On case I of the report the 175E annotation was drawn at 2.0 cm instead of 3.14 cm, and 55N at -0.3 cm, outside a 6 cm wide border. Below the minimum angle the annotation now steps straight out from the border and stays at the crossing. Default: GMT 6.1.0 defaulted MAP_ANNOT_OBLIQUE to anywhere, but the anywhere bit was dropped when the setting became a keyword list, leaving the effective default at separate - longitudes only on S/N, latitudes only on W/E. That is fine while the graticule roughly follows the frame, which is exactly what an oblique frame does not do: in case II the parallels cross the top and bottom borders and the meridians the left and right ones, so nearly every annotation was thrown away. The documentation has always said the default is anywhere. Note: psxy/rotrectangle, psxyz/rotrectangle and windbarbs/grdbarb_02 gain annotations and ticks from the default change and need new baselines; the other 37 PS files from tests touching -JO, +r regions or MAP_ANNOT_OBLIQUE are byte-identical. test/psbasemap/oblique_annot.sh reads the annotation positions out of the PostScript and compares them with crossings computed via mapproject, so it needs no PS baseline. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Esteban82
approved these changes
Aug 28, 2026
Member
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.


@yvonnefroehlich Can you please test this? I only drived the agents but honestly didn't even tried to understand the bug entirely.
Fix #8418
Assisted-by: GPT Terra and reviewed/corrected by Claude Opus 5.0