GenericMappingTools / GenericMappingTools/gmt

Matrix grid doesn't always work with different central meridians

Open
#4,335 14 comments 0 reactions 1 assignee Claimed by @seisman View on GitHub
bug
Dominant language
C
Stars
979
Forks
414
Avg merge
17h 26m
Merged PRs (30d)
54

Description

**Description of the problem**

The issue was first reported in https://github.com/GenericMappingTools/pygmt/issues/390, but was thought to be fixed by GMT PRs #3813 and #3829. The GMT master branch works for some projection parameters but doesn't always work.

**Full script that generated the error**

```python
import pygmt
fig = pygmt.Figure()

fig.grdimage("@earth_relief_01d_g", projection="Q123/0/15c", cmap="geo")

fig.shift_origin(yshift="8c")

dem = pygmt.datasets.load_earth_relief(resolution="01d", registration="gridline")
fig.grdimage(dem, projection="Q123/0/15c", cmap="geo")
fig.savefig("map.pdf")
```

**Output**

![image](https://user-images.githubusercontent.com/3974108/96204291-f00b0400-0f31-11eb-97fd-7cc1bf51b496.png)

**Image difference**
![image](https://user-images.githubusercontent.com/3974108/96204391-2fd1eb80-0f32-11eb-8f18-e64cbd0deed8.png)

In the PyGMT, we test several different projection parameters. Here are the ones that are known to fail:

- `Q123/0/15c`
- `Q123/30/15c`
- `Q180/0/15c`
- `Q180/30/15c`

Here are the ones that are known to work:

- `Q0/0/15c`
- `Q0/30/15c`

The same parameters work well for General Stereographic projection (i.e., changing **Q** to **S**).

Note: Those tests were originally written by @weiji14.

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.