GenericMappingTools / GenericMappingTools/gmt

Oblique projection (Ob): Partly wrong annotations

Open
#8,418 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C
Stars
979
Forks
414
Avg merge
17h 26m
Merged PRs (30d)
54

Description

**Description of the problem**

_Related to this forum post https://forum.generic-mapping-tools.org/t/how-to-set-the-annotation-of-x-axis-as-latitude-when-i-use-oblique-projection/4751/13_

Here, I try to summarize the main findings so far.:
* Overall there is an issue with the annotations for the Oblique projection **Ob**. Partly the West-East and South-North directions are mixed up.
* The issue does not occur in GMT 6.1.0 (please see https://forum.generic-mapping-tools.org/t/how-to-set-the-annotation-of-x-axis-as-latitude-when-i-use-oblique-projection/4751/7?u=yvonnefroehlich).
* Explicitly setting `--MAP_ANNOT_OBLIQUE=anywhere` can help to fix the issue in some cases. However, the documentation states that this is the default (please see https://docs.generic-mapping-tools.org/dev/gmt.conf.html#term-MAP_ANNOT_OBLIQUE).
* Appending / not appending **+v** to **-J** has an effect whether the issue occurs.

**Full script that generated the error**

_Case I (GMT forum)_
Top Left
```
gmt grdimage @earth_relief -JOb168/51/172/32.5/6c -R-500/2300/-400/400+uk -Ggray -BeNsW -Bxa5f1 -Bya5f1 -png lon_lat
```
Top Right
```
gmt grdimage @earth_relief -JOb168/51/172/32.5/6c+v -R-500/2300/-400/400+uk -Ggray -BeNsW -Bxa5f1 -Bya5f1 -png lon_lat_v
```
Bottom Left
```
gmt grdimage @earth_relief -JOb168/51/172/32.5/6c -R-500/2300/-400/400+uk -Ggray -BeNsW -Bxa5f1 -Bya5f1 --MAP_ANNOT_OBLIQUE=anywhere -png lon_lat_anywhere
```
Bottom Right
```
gmt grdimage @earth_relief -JOb168/51/172/32.5/6c+v -R-500/2300/-400/400+uk -Ggray -BeNsW -Bxa5f1 -Bya5f1 --MAP_ANNOT_OBLIQUE=anywhere -png lon_lat_anywhere_v
```

| Top Left: Wrong | Top Right: Correct |
| --- | --- |
| ![lon_lat](https://github.com/GenericMappingTools/gmt/assets/94163266/13448afc-ed3d-4274-8a10-608e962291a6) | ![lon_lat_v](https://github.com/GenericMappingTools/gmt/assets/94163266/8182fb1b-af69-471c-9689-1fc04f2049c5) |

| Bottom Left | Bottom Right |
| --- | --- |
| ![lon_lat_anywhere](https://github.com/GenericMappingTools/gmt/assets/94163266/b63bb1d3-47ea-43d9-8a36-51a4b317d13a) | ![lon_lat_anywhere_v](https://github.com/GenericMappingTools/gmt/assets/94163266/f0d3905e-1b6b-4f47-96a0-fcfb3d9d9523) |

_Case II (PyGMT docs)_
Top Left
```
gmt coast -JOb130/35/25/35/6c -R130/35/145/40+r -Ggray -BWSNE -Bxa5f1g5 -Bya2f1g2 -png lon_lat_02
```
Top Right
```
gmt coast -JOb130/35/25/35/6c+v -R130/35/145/40+r -Ggray -BWSNE -Bxa5f1g5 -Bya2f1g2 -png lon_lat_v_02
```
Bottom Left
```
gmt coast -JOb130/35/25/35/6c -R130/35/145/40+r -Ggray -BWSNE -Bxa5f1g5 -Bya2f1g2 --MAP_ANNOT_OBLIQUE=anywhere -png lon_lat_anywhere_02
```
Bottom Right
```
gmt coast -JOb130/35/25/35/6c+v -R130/35/145/40+r -Ggray -BWSNE -Bxa5f1g5 -Bya2f1g2 --MAP_ANNOT_OBLIQUE=anywhere -png lon_lat_v_anywhere_02
```

| Top Left: Correct | Top Right: Wrong |
| --- | --- |
| ![lon_lat_02](https://github.com/GenericMappingTools/gmt/assets/94163266/fdb0cd79-48cf-4ffe-b790-1cda82742a58) | ![lon_lat_v_02](https://github.com/GenericMappingTools/gmt/assets/94163266/3434980e-42a5-44b4-999e-311e09e4ada4) |

| Bottom Left | Bottom Right |
| --- | --- |
| ![lon_lat_anywhere_02](https://github.com/GenericMappingTools/gmt/assets/94163266/4ab9df92-6424-45a0-b1e3-b9872482ca27) | ![lon_lat_v_anywhere_02](https://github.com/GenericMappingTools/gmt/assets/94163266/aa660c1c-2f5b-4b8c-afe9-5271329e89a6) |

**Full error message**

No error message occurs.

**System information**

* Operating system: Windows and Linux
* GMT version (`gmt --version`): GMT 6.5

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.