Get track listing from track index database


gmt x2sys_get -TTAG [ -C ] [ -Fflags ] [ -G ] [ -L[list][+i] ] [ -Nflags ] [ [ -Rregion ] [ -V[level] ] [ --PAR=value ]

Note: No space is allowed between the option flag and the associated arguments.


x2sys_get will return text records with the names of the track data files in the x2sys data base for this TAG that match the given requirements. You may choose a specific region and optionally ask only for tracks that meet certain data criteria. Finally, you may select an option to list all possible pairs that might generate crossovers.

Required Arguments


Specify the x2sys TAG which identifies the attributes of this data type.

Optional Arguments


Instead of reporting the track names, just output the coordinates of the center of each bin that has at least one track with the specified data.


Only report the track names [Default adds the availability of data for each field].


Give a comma-separated list of column names (as described in the format definition file) that should be present. [Default selects all data columns].


Report data flags (Y or N) for the entire track rather than just for the portion that is inside the region set by -R [Default].


Crossover mode. Return a list of track pairs that should be checked for possible crossovers. The list is determined from the bin-index data base on the assumption that tracks occupying the same bin are very likely to intersect. By default we return all possible pairs in the data base. Append the name of a file with a list of tracks if you want to limit the output to those pairs that involve at least one of the track names in your list. The output is suitable for the -A option in x2sys_cross. By default, only external crossover pairs are listed. Append +i to include internal pairs in the list.


Give a comma-separated list of column names (as described in the format definition file) that must be absent.


Specify the region of interest. For Cartesian data just give xmin/xmax/ymin/ymax. This option limits the tracks to those that fall at least partly inside the specified domain.

The region may be specified in one of several ways:

  1. -Rwest/east/south/north. This is the standard way to specify geographic regions when using map projections where meridians and parallels are rectilinear. The coordinates may be specified in decimal degrees or in [±]dd:mm[:ss.xxx][W|E|S|N] format.

  2. -Rwest/south/east/north+r. This form is useful for map projections that are oblique, making meridians and parallels poor choices for map boundaries. Here, we instead specify the lower left corner and upper right corner geographic coordinates, followed by the modifier +r. This form guarantees a rectangular map even though lines of equal longitude and latitude are not straight lines.

  3. -Rg or -Rd. These forms can be used to quickly specify the global domain (0/360 for -Rg and -180/+180 for -Rd in longitude, with -90/+90 in latitude).

  4. -Rcode1,code2,…[+e|r|Rincs]. This indirectly supplies the region by consulting the DCW (Digital Chart of the World) database and derives the bounding regions for one or more countries given by the codes. Simply append one or more comma-separated countries using either the two-character ISO 3166-1 alpha-2 convention (e.g., NO) or the full country name (e.g., Norway). To select a state within a country (if available), append .state (e.g, US.TX), or the full state name (e.g., Texas). To specify a whole continent, spell out the full continent name (e.g., -RAfrica). Finally, append any DCW collection abbreviations or full names for the extent of the collection or named region. All names are case-insensitive. The following modifiers can be appended:

    • +r to adjust the region boundaries to be multiples of the steps indicated by inc, xinc/yinc, or winc/einc/sinc/ninc [default is no adjustment]. For example, -RFR+r1 will select the national bounding box of France rounded to nearest integer degree, where inc can be positive to expand the region or negative to shrink the region.

    • +R to adjust the region by adding the amounts specified by inc, xinc/yinc, or winc/einc/sinc/ninc [default is no extension], where inc can be positive to expand the region or negative to shrink the region.

    • +e to adjust the region boundaries to be multiples of the steps indicated by inc, xinc/yinc, or winc/einc/sinc/ninc, while ensuring that the bounding box is adjusted by at least 0.25 times the increment [default is no adjustment], where inc can be positive to expand the region or negative to shrink the region.

  5. -Rxmin/xmax/ymin/ymax[+uunit] specifies a region in projected units (e.g., UTM meters) where xmin/xmax/ymin/ymax are Cartesian projected coordinates compatible with the chosen projection (-J) and unit is an allowable distance unit [e]; we inversely project to determine the actual rectangular geographic region. For projected regions centered on (0,0) you may use the short-hand -Rhalfwidth[/halfheight]+uunit, where halfheight defaults to halfwidth if not given. This short-hand requires the +u modifier.

  6. -Rjustifylon0/lat0/nx/ny, where justify is a 2-character combination of L|C|R (for left, center, or right) and T|M|B (for top, middle, or bottom) (e.g., BL for lower left). The two character code justify indicates which point on a rectangular region region the lon0/lat0 coordinates refer to and the grid dimensions nx and ny are used with grid spacings given via -I to create the corresponding region. This method can be used when creating grids. For example, -RCM25/25/50/50 specifies a 50x50 grid centered on 25,25.

  7. -Rgridfile. This will copy the domain settings found for the grid in specified file. Note that depending on the nature of the calling module, this mechanism will also set grid spacing and possibly the grid registration (see Grid registration: The -r option).

  8. -Ra[uto] or -Re[xact]. Under modern mode, and for plotting modules only, you can automatically determine the region from the data used. You can either get the exact area using -Re [Default if no -R is given] or a slightly larger area sensibly rounded outwards to the next multiple of increments that depend on the data range using -Ra.


Select verbosity level [w]. (See full description) (See cookbook information).

-^ or just -

Print a short message about the syntax of the command, then exit (Note: on Windows just use -).

-+ or just +

Print an extensive usage (help) message, including the explanation of any module-specific option (but not the GMT common options), then exit.

-? or no arguments

Print a complete usage (help) message, including the explanation of all options, then exit.


Temporarily override a GMT default setting; repeatable. See gmt.conf for parameters.


To find all the tracks associated with the tag MGD77, restricted to occupy a certain region in the south Pacific, and have at least free air anomalies and bathymetry, try:

gmt x2sys_get -V -TMGD77 -R180/240/-60/-30 -Ffaa,depth

To find all the tracks associated with the tag MGD77 that have depth but not twt, try:

gmt x2sys_get -V -TMGD77 -Fdepth -Nwt

To find all the pairs associated with the tag MGD77 that might intersect each other, but only those pairs which involves tracks in your list new.lis, try:

gmt x2sys_get -V -TMGD77 -Lnew.lis > xpairs.lis


The tracks that are returned all have the requested data (-F) within the specified region (-R). Furthermore, the columns of Y and N for other data types also reflect the content of the track portion within the selected region, unless -G is set.


Wessel, P. (2010), Tools for analyzing intersecting tracks: the x2sys package. Computers and Geosciences, 36, 348-354, https://www.researchgate.net/publication/220164039_Tools_for_analyzing_intersecting_tracks_The_x2sys_package.

Wessel, P. (1989), XOVER: A cross-over error detector for track data, Computers and Geosciences, 15(3), 333-346, https://doi.org/10.1016/0098-3004(89)90044-7.

See Also

x2sys_binlist, x2sys_cross x2sys_datalist, x2sys_init, x2sys_list, x2sys_put, x2sys_report, x2sys_solve