Feature #80

GMT requests xmax>xmin and ymax>ymin in option -Rxmin/xmax/ymin/ymax

Added by Florian almost 6 years ago. Updated almost 5 years ago.

Status:In ProgressStart date:2012-05-11
Priority:NormalDue date:
Assignee:-% Done:


Target version:-


Either xmax==xmin or ymax==ymin should be allowed in option -Rxmin/xmax/ymin/ymax as in

grd2xyz grid.nc -R0/0/-1/1
grd2xyz grid.nc -R-1/1/0/0


#1 Updated by Paul almost 6 years ago

  • Status changed from New to In Progress

Yes, but it will require some changes. E.g., for grid-registered grids, even -R0/0/0/0 should be allowed, but not for pixel-registration. So that is one distinction. The other is that for setting up map regions and projections, -R0/0/0/0 etc cannot be allowed. Right now the parse_R_option function checks that west is not ⇐ east etc. I think we need to

1. Relax that to check that west is not < east and south is not < north only, i..e, west east and/or south north should pass at that stage.
2. GMT_map_setup initializes projections and that is the place to impose the east > west and north > south condition for mapping
3. GMT_check_lattice is used to ensure -R -I is sane for grids and that is where we can impose the -R restriction for grids.
4. I think there are places in the code where east west and south north is used as a flag to indicate that no region was set and we should default to global -Rg or something. That has to change.

Other than that I think it will be smooth sailing.

#2 Updated by Paul almost 5 years ago

  • Tracker changed from Bug to Feature

I am changing this into a feature request as it is not a bug as is.

Also available in: Atom PDF