Generic Mapping Tools
From SoestWiki
This page is used to assist in the collaboration among the GMT Team in their quest to improve GMT. Discussions about things to implement and to-do lists will be set up
Contents |
TO DO LIST
gmt_grdio.c Should use GMT_getdatapath to find full pathname.
psbasemap.c Looks like the magnetic rose needs some alignment work(?)
pshistogram.c: Bug using -W with time data
psxy[z]: -Sb -So etc with time data; what is size; how to specify months etc. If cpt uses date-clock z-values then automatically set -f2T or -f3T.
nc2xy.c: Add -H to print header with attribute info?
GMT_time_array: Should be able to handle phase shift passed from -B
testing: Need testing of supplements at some point
gmtselect: Should -M option cause selection by segment. I.e., if one point in segment passes selection, shouldn't the whole segment pass?
PROPOSALS UNDER CONSIDERATION
GMT5: Renaming of GMT Defaults
Here is a list of existing and proposed new names (if given). Also note a few new parameters marked
- --> NEW_PARAMETER
- --> NEW_PARAMETER
- -------- PAGE: Plot Media Parameters -------------
PAGE_COLOR
PAGE_ORIENTATION
PAPER_MEDIA --> PAGE_SIZE (additional + sign for EPS to be moved to parameter PS_EPS)
- -------- ANNOT: Basemap Annotation Parameters ------
(all old ANOT_* parameters to disappear)
ANNOT_MIN_ANGLE
ANNOT_MIN_SPACING
ANNOT_FONT_PRIMARY
ANNOT_FONT_SIZE_PRIMARY
ANNOT_OFFSET_PRIMARY
ANNOT_FONT_SECONDARY
ANNOT_FONT_SIZE_SECONDARY
ANNOT_OFFSET_SECONDARY
DEGREE_SYMBOL --> ANNOT_DEGREE_SYMBOL
HEADER_FONT --> ANNOT_HEADER_FONT
HEADER_FONT_SIZE --> ANNOT_HEADER_FONT_SIZE
HEADER_OFFSET --> ANNOT_HEADER_OFFSET
LABEL_FONT --> ANNOT_LABEL_FONT
LABEL_FONT_SIZE --> ANNOT_LABEL_FONT_SIZE
LABEL_OFFSET --> ANNOT_LABEL_OFFSET
OBLIQUE_ANNOTATION --> ANNOT_OBLIQUE
PLOT_CLOCK_FORMAT --> ANNOT_CLOCK_FORMAT
PLOT_DATE_FORMAT --> ANNOT_DATE_FORMAT
PLOT_DEGREE_FORMAT --> ANNOT_DEGREE_FORMAT
- -------- MAP: Basemap Layout Parameters ---------
BASEMAP_AXES --> MAP_AXES
BASEMAP_FRAME_RGB --> MAP_FRAME_RGB
BASEMAP_TYPE --> MAP_TYPE
FRAME_PEN --> MAP_FRAME_PEN
FRAME_WIDTH --> MAP_FRAME_WIDTH
GRID_CROSS_SIZE_PRIMARY --> MAP_GRID_CROSS_SIZE_PRIMARY
GRID_PEN_PRIMARY --> MAP_GRID_PEN_PRIMARY
GRID_CROSS_SIZE_SECONDARY --> MAP_GRID_CROSS_SIZE_SECONDARY
GRID_PEN_SECONDARY --> MAP_GRID_PEN_SECONDARY
MAP_SCALE_HEIGHT --> MAP_SCALE_HEIGHT
POLAR_CAP --> MAP_POLAR_CAP
TICK_LENGTH --> MAP_TICK_LENGTH
TICK_PEN --> MAP_TICK_PEN
- --> MAP_X_AXIS_TYPE
- --> MAP_X_AXIS_TYPE
Y_AXIS_TYPE --> MAP_Y_AXIS_TYPE
- --> MAP_Z_AXIS_TYPE
- --> MAP_Z_AXIS_TYPE
X_AXIS_LENGTH --> MAP_X_AXIS_LENGTH
Y_AXIS_LENGTH --> MAP_Y_AXIS_LENGTH
- --> MAP_Z_AXIS_LENGTH
- --> MAP_Z_AXIS_LENGTH
X_ORIGIN --> MAP_X_ORIGIN
Y_ORIGIN --> MAP_Y_ORIGIN
UNIX_TIME --> MAP_LOGO
UNIX_TIME_POS --> MAP_LOGO_POS
UNIX_TIME_FORMAT --> MAP_LOGO_FORMAT
- -------- COLOR: Color System Parameters -----------
COLOR_BACKGROUND
COLOR_FOREGROUND
COLOR_NAN
COLOR_IMAGE
COLOR_MODEL
HSV_MIN_SATURATION --> COLOR_HSV_MIN_SATURATION
HSV_MAX_SATURATION --> COLOR_HSV_MAX_SATURATION
HSV_MIN_VALUE --> COLOR_HSV_MIN_VALUE
HSV_MAX_VALUE --> COLOR_HSV_MAX_VALUE
- -------- PS: PostScript Parameters -------------
CHAR_ENCODING --> PS_CHAR_ENCODING
DOTS_PR_INCH --> PS_DOTS_PR_INCH
GLOBAL_X_SCALE --> PS_GLOBAL_X_SCALE
GLOBAL_Y_SCALE --> PS_GLOBAL_Y_SCALE
N_COPIES --> PS_N_COPIES
PS_COLOR
PS_IMAGE_COMPRESS
PS_IMAGE_FORMAT
PS_LINE_CAP
PS_LINE_JOIN
PS_MITER_LIMIT
PS_VERBOSE
TRANSPARENCY --> PS_TRANSPARENCY
- --> PS_EPS = y/n
- --> PS_EPS = y/n
- -------- IO: I/O Format Parameters -------------
D_FORMAT --> IO_FLOAT_FORMAT
FIELD_DELIMITER --> IO_FIELD_DELIMITER
GRIDFILE_FORMAT --> IO_GRIDFILE_FORMAT
GRIDFILE_SHORTHAND --> IO_GRIDFILE_SHORTHAND
INPUT_CLOCK_FORMAT --> IO_INPUT_CLOCK_FORMAT
INPUT_DATE_FORMAT --> IO_INPUT_DATE_FORMAT
IO_HEADER
N_HEADER_RECS --> IO_N_HEADER_RECS
NAN_RECORDS --> IO_NAN_RECORDS
OUTPUT_CLOCK_FORMAT --> IO_OUTPUT_CLOCK_FORMAT
OUTPUT_DATE_FORMAT --> IO_OUTPUT_DATE_FORMAT
OUTPUT_DEGREE_FORMAT --> IO_OUTPUT_DEGREE_FORMAT
XY_TOGGLE --> IO_XY_TOGGLE
- -------- Projection Parameters -------------
ELLIPSOID --> PROJ_ELLIPSOID
MAP_SCALE_FACTOR --> PROJ_SCALE_FACTOR
MEASURE_UNIT --> PROJ_MEASURE_UNIT
- -------- Calendar/Time Parameters ----------
TIME_FORMAT_PRIMARY
TIME_FORMAT_SECONDARY
TIME_EPOCH
TIME_IS_INTERVAL
TIME_INTERVAL_FRACTION
TIME_LANGUAGE
TIME_UNIT
TIME_WEEK_START
Y2K_OFFSET_YEAR --> TIME_Y2K_OFFSET_YEAR
- -------- DEF: Miscellaneous Parameters ----------
HISTORY --> DEF_HISTORY
INTERPOLANT --> DEF_INTERPOLANT
LINE_STEP --> DEF_LINE_STEP
VECTOR_SHAPE --> DEF_VECTOR_SHAPE
VERBOSE --> DEF_VERBOSE
- -------- DIR: Directory information--------
- --> DIR_DATA
- --> DIR_USER
- --> DIR_CPT
- --> DIR_DATA
CPT Version 2
Place the new proposal for CPT here
Math Enhancements
These are proposed enhancements to gmtmath and grdmath.
Macros
The idea is to define shorthands that can be used in grdmath and gmtmath. E.g., let say you use this sequence very often: T POW 2 NEG 2 DIV EXP i.e. a Gaussian curve. If you define this in the optional .gmtmath file in your GMT configuration directory, perhaps in the format
GAUSS = T POW 2 NEG 2 DIV EXP 2 PI MUL SQRT DIV
then you could say gmtmath -T-6/6/0.1 GAUSS = psxy -R-6/6/0/1 -JX6/3 -P -W1 -B1 | gv -
Of course, here it is assumed mean = 0 and sigma = 1. perhaps GAUSS should specify how many arguments it takes (just like any other operator) and then these could be the mean and standard deviation and we would instead have
GAUSS 2 = T A SUB B DIV POW 2 NEG 2 DIV EXP 2 PI MUL SQRT DIV B DIV
and the usage would be
gmtmath -T-6/6/0.1 0 1 GAUSS = psxy -R-6/6/0/1 -JX6/3 -P -W1 -B1 | gv -
--Paul Wessel 16:01, 13 March 2008 (HST)
Memory locations
This would be a way to save the current stack value internally and give it a name. Then, you can later on the command line reference this name to place that content back on the stack. Might work like this:
gmtmath -T0/100/1 T PI MUL SQRT MEM:junk COS junk SIN MUL = product.txt
The restrictions would be that the named memory item cannot be a restricted operator or filename in current directory). --Paul Wessel 16:04, 13 March 2008 (HST)

