GMTDIGITIZE(1)

NAME
gmtdigitize - Digitizing and Inverse map transformation of map x/y coordinates

SYNOPSIS
gmtdigitize -Jparameters -Rwest/east/south/north[r] [ -A ] [ -Cdevice ] [ -Dlimit ] [ -F ] [ -H[i][nrec] ] [ -Llpi ] [ -M[flag] ] [ -Nnamestem ] [ -S ] [ -V ] [ -Zk|v ] [ -bo[s|S|d|D][ncol] ] [ > output.d ]

DESCRIPTION
gmtdigitize digitizes points from a digitizer via a serial line connection and computes map coordinates using the specified map projection. The program is interactive and will take you through the setup procedure and how you will digitize points. The program will determine the actual map scale as well as rotation of the paper that is taped to the digitizer table. By default the output will go to stdout.
    No space between the option flag and the associated arguments. Use upper case for the option flags and lower case for modifiers.

-J  Selects the map projection. The following character determines the projection. If the character is upper case then the argument(s) supplied as scale(s) is interpreted to be the map width (or axis lengths), else the scale argument(s) is the map scale (see its definition for each projection). UNIT is cm, inch, or m, depending on the MEASURE_UNIT setting in .gmtdefaults4, but this can be overridden on the command line by appending c, i, or m to the scale/width values. Append h, +, or - to the given width if you instead want to set map height, the maximum dimension, or the minimum dimension, respectively [Default is w for width].
    The ellipsoid used in the map projections is user-definable by editing the .gmtdefaults4 file in your home directory. 63 commonly used ellipsoids and a spheroid are currently supported, and users may also specify their own ellipsoid parameters (see man gmtdefaults for more details). GMT default is WGS-84. Several GMT parameters can affect the projection: ELLIPSOID, INTERPOLANT, MAP_SCALE_FACTOR, and MEASURE_UNIT; see the gmtdefaults man page for details.
    Choose one of the following projections (The E or C after projection names stands for Equal-Area and Conformal, respectively):

    CYLINDRICAL PROJECTIONS:

    -Jclon0/lat0/scale or -JClon0/lat0/width (Cassini).
        Give projection center and scale (1:xxxx or UNIT/degree).

    -Jclon0/lat0/scale or -JClon0/lat0/width (Cassini).
        Give projection center and scale (1:xxxx or UNIT/degree).

    -Jjlon0/scale or -JJlon0/width (Miller Cylindrical Projection).
        Give the central meridian and scale (1:xxxx or UNIT/degree).

    -Jmparameters (Mercator [C]).
        Specify one of:

        -Jmscale or -JMwidth
            Give scale along equator (1:xxxx or UNIT/degree).

        -Jmlon0/lat0/scale or -JMlon0/lat0/width
            Give central meridian, standard latitude and scale along parallel (1:xxxx or UNIT/degree).

    -Joparameters (Oblique Mercator [C]).
        Specify one of:

        -Joalon0/lat0/azimuth/scale or -JOalon0/lat0/azimuth/width
            Set projection center, azimuth of oblique equator, and scale.

        -Joblon0/lat0/lon1/lat1/scale or -JOblon0/lat0/lon1/lat1/scale
            Set projection center, another point on the oblique equator, and scale.

        -Joclon0/lat0/lonp/latp/scale or -JOclon0/lat0/lonp/latp/scale
            Set projection center, pole of oblique projection, and scale.

        Give scale along oblique equator (1:xxxx or UNIT/degree).

    -Jqlon0/scale or -JQlon0/width (Equidistant Cylindrical Projection (Plate Carree)).
        Give the central meridian and scale (1:xxxx or UNIT/degree).

    -Jtparameters (Transverse Mercator [C]).
        Specify one of:

        -Jtlon0/scale or -JTlon0/width
            Give the central meridian and scale (1:xxxx or UNIT/degree).

        -Jtlon0/lat0/scale or -JTlon0/lat0/width
            Give projection center and scale (1:xxxx or UNIT/degree).

    -Juzone/scale or -JUzone/width (UTM - Universal Transverse Mercator [C]).
        Give the zone number (1-60) and scale (1:xxxx or UNIT/degree).
        Zones: prepend - or + to enforce southern or northern hemisphere conventions [northern if south > 0].

    -Jylon0/lats/scale or -JYlon0/lats/width (Basic Cylindrical Projections [E]).
        Give the central meridian, standard parallel, and scale (1:xxxx or UNIT/degree). The standard parallel is typically one of these (but can be any value):
            45 - The Peters projection
            37.4 - The Trystan Edwards projection
            30 - The Behrman projection
            0 - The Lambert projection

    AZIMUTHAL PROJECTIONS:

    Except for polar aspects, -Rw/e/s/n will be reset to -Rg. Use -R<...>r for smaller regions.

    -Jalon0/lat0/scale or -JAlon0/lat0/width (Lambert [E]).
        lon0/lat0 specifies the projection center. Give scale as 1:xxxx or radius/lat, where radius is distance in UNIT from origin to the oblique latitude lat.

    -Jelon0/lat0/scale or -JElon0/lat0/width (Equidistant).
        lon0/lat0 specifies the projection center. Give scale as 1:xxxx or radius/lat, where radius is distance in UNIT from origin to the oblique latitude lat.

    -Jflon0/lat0/horizon/scale or -JFlon0/lat0/horizon/width (Gnomonic).
        lon0/lat0 specifies the projection center. horizon specifies the max distance from projection center (in degrees, < 90). Give scale as 1:xxxx or radius/lat, where radius is distance in UNIT from origin to the oblique latitude lat.

    -Jglon0/lat0/scale or -JGlon0/lat0/width (Orthographic).
        lon0/lat0 specifies the projection center. Give scale as 1:xxxx or radius/lat, where radius is distance in UNIT from origin to the oblique latitude lat.

    -Jslon0/lat0/scale or -JSlon0/lat0/width (General Stereographic [C]).
        lon0/lat0 specifies the projection center. Give scale as 1:xxxx (true at pole) or slat/1:xxxx (true at standard parallel slat) or radius/lat (radius in UNIT from origin to the oblique latitude lat).

    CONIC PROJECTIONS:

    -Jblon0/lat0/lat1/lat2/scale or -JBlon0/lat0/lat1/lat2/width (Albers [E]).
        Give projection center, two standard parallels, and scale (1:xxxx or UNIT/degree).

    -Jdlon0/lat0/lat1/lat2/scale or -JDlon0/lat0/lat1/lat2/width (Equidistant)
        Give projection center, two standard parallels, and scale (1:xxxx or UNIT/degree).

    -Jllon0/lat0/lat1/lat2/scale or -JLlon0/lat0/lat1/lat2/width (Lambert [C])
        Give origin, 2 standard parallels, and scale along these (1:xxxx or UNIT/degree).

    MISCELLANEOUS PROJECTIONS:

    -Jhlon0/scale or -JHlon0/width (Hammer [E]).
        Give the central meridian and scale along equator (1:xxxx or UNIT/degree).

    -Jilon0/scale or -JIlon0/width (Sinusoidal [E]).
        Give the central meridian and scale along equator (1:xxxx or UNIT/degree).

    -Jk[f|s]lon0/scale or -JK[f|s]lon0/width (Eckert IV (f) and VI (s) [E]).
        Give the central meridian and scale along equator (1:xxxx or UNIT/degree).

    -Jnlon0/scale or -JNlon0/width (Robinson).
        Give the central meridian and scale along equator (1:xxxx or UNIT/degree).

    -Jrlon0/scale -JRlon0/width (Winkel Tripel).
        Give the central meridian and scale along equator (1:xxxx or UNIT/degree).

    -Jvlon0/scale or -JVlon0/width (Van der Grinten).
        Give the central meridian and scale along equator (1:xxxx or UNIT/degree).

    -Jwlon0/scale or -JWlon0/width (Mollweide [E]).
        Give the central meridian and scale along equator (1:xxxx or UNIT/degree).

    NON-GEOGRAPHICAL PROJECTIONS:

    -Jp[a]scale[/origin][r|z] or -JP[a]width[/origin][r|z] (Polar coordinates (theta,r))
        Optionally insert a after -Jp [ or -JP] for azimuths CW from North instead of directions CCW from East [default]. Optionally append /origin in degrees to indicate an angular offset [0]). Finally, append r if r is elevations in degrees (requires s >= 0 and n <= 90) or z if you want to annotate depth rather than radius [Default]. Give scale in UNIT/r-unit.

    -Jxx-scale[/y-scale] or -JXwidth[/height] (Linear, log, and power scaling)
        Give x-scale in UNIT/x-unit and/or y-scale in UNIT/y-unit; or specify width and/or height in UNIT (y-scale=x-scale if not specified separately). Use negative scale(s) to reverse the direction of an axis (e.g., to have y be positive down). Optionally, append to x-scale, y-scale, width or height one of the following:

        d   Data are geographical coordinates (in degrees).

        l   Take log10 of values before scaling.

        ppower
            Raise values to power before scaling.

        t   Input coordinates are time relative to TIME_EPOCH.

        T   Input coordinates are absolute time.

        Default axis lengths (see gmtdefaults) can be invoked using -JXh (for landscape); -JXv (for portrait) will swap the x- and y-axis lengths. The GMT default unit for this installation is UNIT. However, you may change this by editing your .gmtdefaults4 file(s) (run gmtdefaults to create one if you do not have it).
For geographic projections you can give 1 as the scale will be solved for anyway.

-R  xmin, xmax, ymin, and ymax specify the Region of interest. For geographic regions, these limits correspond to west, east, south, and north and you may specify them in decimal degrees or in [+-]dd:mm[:ss.xxx][W|E|S|N] format. Append r if lower left and upper right map coordinates are given instead of wesn. The two shorthands -Rg -Rd stand for global domain (0/360 or -180/+180 in longitude respectively, with -90/+90 in latitude). For calendar time coordinates you may either give relative time (relative to the selected TIME_EPOCH and in the selected TIME_UNIT; append t to -JX|x), or absolute time of the form [date]T[clock] (append T to -JX|x). At least one of date and clock must be present; the T is always required. The date string must be of the form [-]yyyy[-mm[-dd]] (Gregorian calendar) or yyyy[-Www[-d]] (ISO week calendar), while the clock string must be of the form hh:mm:ss[.xxx]. The use of delimiters and their type and positions must be as indicated (however, input/output and plotting formats are flexible).

OPTIONS

-A  Give an audible signal each time the digitizer mouse/puck is clicked [Default is silent].

-C  Specify the device (port) to read from [Default is /dev/ttyS0].

-D  Only output a point if it is further than limit units from the previous point. Append c, i, m, p for cm, inch, meter, or point, respectively [Default is no limit].

-F  Force the program to ask for 4 arbitrary calibration points [Default is to use the 4 corners of the map, if possible].

-H  This option allows you to write out any number of header records to the beginning of the output file. Each record will automatically start with a #-character to indicate comment. Headers are not written if multiple output files are selected with -N -M.

-L  Set the digitizer table resolution in lines per inch [2540].

-M  Multiple segment file(s). Segments are separated by a special record. For ASCII files the first character must be flag [Default is '>']. For binary files all fields must be NaN and -b must set the number of output columns explicitly. By default the -M setting applies to both input and output. Use -Mi and -Mo to give separate settings.

-N  Set name for output file(s). If a regular filename is given, then all digitized data will be written to that file. If the file contains a C-format for an integer (i.e., %d) then the file is used as a format statement to create unique filenames based on the current segment number (e.g., line_%d.d will yield files line_0.d, line_1.d, etc). By default, all output is written to stdout. Multiple segment files requires specifying the -M option.

-S  Suppress points that fall outside the specified map region [Default outputs all points].

-V  Selects verbose mode, which will send progress reports to stderr [Default runs "silently"]. The program will also duplicate data output to stderr for monitoring.

-Z  Append v to prompt for a z-value and output it as a third data column. Append k to output the button key as the final data column. Both -Zk and -Zv can be specified. [Default is just 2 column x,y output].

-O  Selects Overlay plot mode [Default initializes a new plot system].

EXAMPLES
To digitize lines from a mercator map made for a given region, and save each line segment in individual files called segment_000.xy, segment_001.xy etc, try

gmtdigitize -R20/50/12/25 -Jm1:1 -M -Nsegment_%3.3d.xy

To digitize seismically defined interfaces from a multichannel seismic section, with horizontal distances from 130 to 970, and vertical times from 0 to 10 seconds, write out the button code, and save all line segment to a single multisegment file, and beep at each click, try

gmtdigitize -R130/970/0/10 -Jx1/-1 -M -A -Z > interfaces.d

SYSTEM SETUP
This applies to the Calcomp DrawingBoard III hooked up to a RedHat Linux workstation. We use /dev/ttyS0 as the serial port and change permissions so that it is world read/write-able. Then, stty -F /dev/ttyS0 evenp will set the terminal settings, which can be checked with stty -F /dev/ttyS0 -a. Setup of digitizer: We use the CalComp 2000 ASCII (Save 3) setup, which has:
Mode: Point
Baud Rate: 9600
Data Bits: 7
Parity: Even
Data Rate: 125 pps
Resolution: 200 lpi
Output Format: Format 0
Emulation: CalComp 2000 ASCII
(A)We need to make a slight modification to the Preset No 3 settings: (1) 2450 LPI instead of 200, and (2) None instead of yes for added CR. These modifications can be changed and saved to Preset 3 on the digitizer but a power outage may reset in back to the factory defaults, necessitating a manual reset of those two settings. (B) Setup tty port. stty -F /dev/ttyS0 evenp (C) Run gmtdigitize. Map scale doesnt matter; it is computed from the region and plot size.

SEE ALSO
gmtdefaults(1), gmt(1), gmtstitch(1) mapproject(1) project(1)