Skip to content

Matrix grid doesn't always work with different central meridians #4335

Description

@seisman

Description of the problem

The issue was first reported in GenericMappingTools/pygmt#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

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

Image difference
image

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions