Skip to content

Rules for grids with two types of registrations #48

@PaulWessel

Description

@PaulWessel

For good reasons, GMT 6.1 will serve up both pixel and gridline registered files if possible. For a particular increment, say 01m, it means the server has these two files:

  1. earth_relief_01m_g.grd
  2. earth_relief_01m_p.grd

If you specify any of these with @ then you get that file by that name written to your .gmt/server/earth/earth_relief folder.

If you instead ask for @earth_relief_01m then what happens? Since those are the only names known to GMT <= 6.0.0 we have for backwards compatibility reasons set links that points to the corresponding g versions, except when there is no g (i.e., for 1, 3, 15s files).

Most users could not care less about p vs g, and will be confused by suddenly having to pick one. Thus, having a default registration for all files we offer seems like a good idea. Experts can always get what they want, and our updated dataset description will need to explain all this, including when it matters (want to use DEM with another data, both needs to be same registration), otherwise you must convert one of your files and loose lots of short-wavelength information.

However, what the default resolution should be is not obvious, and in many cases does not matter at all. Yet, I think picking the pixel version makes sense from three lines of arguments:

  1. For rectangular projections (e.g., Mercator), having pixels may mean the entire image that is projected and filled fits perfectly inside the domain. Gridline registered files will extend half a pixel outside and a clip path makes things only show inside.
  2. If you run grdimage -A to build an image directly then you are definitively already in pixel territory and you may minimize resampling by starting with a pixel grid.
  3. The highest resolution data set (i.e., the source data) is usually only available in one registration and all lower resolution versions will be available in that registration. For relief, which I assume will always be our most used data, that registration is pixel.

Unless Dave agrees to make both g and g grids at 15s it would seem selecting p as the default registration avoids switching from p to g as a function of increment.

Thoughts, @joa-quim and @seisman ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions