Index

Functions

GMT.append2figMethod
append2fig(fname::String)

Move the file fname to the default name and location (GMTjl_tmp.ps in tmp). The fname should be a PS file that has NOT been closed. Posterior calls to plotting methods will append to this file. Useful when creating figures that use a common base map that may be heavy (slow) to compute.

GMT.arrowsFunction
arrows(cmd0::String="", arg1=nothing; arrow=(...), kwargs...)

Plots an arrow field. When the keyword arrow=(...) or vector=(...) is used, the direction (in degrees counter-clockwise from horizontal) and length must be found in columns 3 and 4, and size, if not specified on the command-line, should be present in column 5. The size is the length of the vector head. Vector stem width is set by option pen or line_attrib.

The vecmap=(...) variation is similar to above except azimuth (in degrees east of north) should be given instead of direction. The azimuth will be mapped into an angle based on the chosen map projection. If length is not in plot units but in arbitrary user units (e.g., a rate in mm/yr) then you can use the input_col option to scale the corresponding column via the +sscale modifier.

The geovec=(...) or geovector=(...) keywords plot geovectors. In geovectors azimuth (in degrees east from north) and geographical length must be found in columns 3 and 4. The size is the length of the vector head. Vector width is set by pen or line_attrib. Note: Geovector stems are drawn as thin filled polygons and hence pen attributes like dashed and dotted are not available. For allowable geographical units, see the units=() option.

The full arrow options list can be consulted at Vector Attributes

  • B | frame | axis | xaxis yaxis:: [Type => Str]

    Set map boundary frame and axes attributes. (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • W | pen | line_attrib :: [Type => Str]

    Set pen attributes for lines or the outline of symbols (http://docs.generic-mapping-tools.org/latest/plot.html#w)

  • savefig | figname | name :: [Type => Str]

    Save the figure with the figname=name.ext where ext chooses the figure format (e.g. figname="name.png")

Example:

arrows([0 8.2 0 6], limits=(-2,4,0,9), arrow=(len=2,stop=1,shape=0.5,fill=:red), axis=:a, pen="6p", show=true)
GMT.barFunction
bar(cmd0::String="", arg1=nothing; kwargs...)

Reads a file or (x,y) pairs and plots vertical bars extending from base to y.

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • B | frame | axis | xaxis yaxis:: [Type => Str]

    Set map boundary frame and axes attributes. (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • fill :: [Type => Str –

    Select color or pattern for filling the bars (http://docs.generic-mapping-tools.org/latest/plot.html#g)

  • base | bottom :: [Type => Str | Num] $key=value$

    By default, base = ymin. Use this option to change that value. If base is not appended then we read it. from the last input data column.

  • size | width :: [Type => Str | Num] $key=value$

    The size or width is the bar width. Append u if size is in x-units. When width is used the default is plot-distance units.

  • savefig | figname | name :: [Type => Str]

    Save the figure with the figname=name.ext where ext chooses the figure format (e.g. figname="name.png")

Example:

bar(sort(randn(10)), fill=:black, axis=:auto, show=true)
GMT.bar3Function
bar3(cmd0::String="", arg1=nothing; kwargs...)

Read a grid file, a grid or a MxN matrix and plots vertical bars extending from base to z.

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • B | frame | axis | xaxis yaxis:: [Type => Str]

    Set map boundary frame and axes attributes. (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • fill :: [Type => Str] $key=color$

    Select color or pattern for filling the bars (http://docs.generic-mapping-tools.org/latest/plot.html#g)

  • base :: [Type => Str | Num] $key=value$

    By default, base = ymin. Use this option to change that value. If base is not appended then we read it.

  • p | view | perspective :: [Type => Str or List] $Arg = [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]$

    Selects perspective view and sets the azimuth and elevation of the viewpoint [180/90]. (http://docs.generic-mapping-tools.org/latest/gmt.html#perspective-full)

  • savefig | figname | name :: [Type => Str]

    Save the figure with the figname=name.ext where ext chooses the figure format (e.g. figname="name.png")

Example:

G = gmt("grdmath -R-15/15/-15/15 -I0.5 X Y HYPOT DUP 2 MUL PI MUL 8 DIV COS EXCH NEG 10 DIV EXP MUL =");
bar3(G, lw=:thinnest, show=true)
GMT.basemapFunction
basemap(cmd0::String=""; kwargs...)

Plot base maps and frames.

Full option list at psbasemap

Parameters

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • A | polygon :: [Type => Str | []]

    No plotting is performed. Instead, we determine the geographical coordinates of the polygon outline for the (possibly oblique) rectangular map domain. (http://docs.generic-mapping-tools.org/latest/basemap.html#a)

  • B | frame | axis | xaxis yaxis:: [Type => Str]

    Set map boundary frame and axes attributes. (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • D | inset | inset_box :: [Type => Str]

    Draw a simple map insert box on the map. Requires -F. (http://docs.generic-mapping-tools.org/latest/basemap.html#d)

  • F | box :: [Type => Str]

    Without further options, draws a rectangular border around any map insert (D), map scale (L) or map rose (T) (http://docs.generic-mapping-tools.org/latest/basemap.html#f)

  • Jz | zscale | zsize :: [Type => String]

  • L | map_scale :: [Type => Str]

    Draw a map scale. (http://docs.generic-mapping-tools.org/latest/basemap.html#l)

  • P | portrait :: [Type => Bool or []]

    Tell GMT to NOT draw in portrait mode (that is, make a Landscape plot)

  • Td | rose :: [Type => Str]

    Draws a map directional rose on the map at the location defined by the reference and anchor points. (http://docs.generic-mapping-tools.org/latest/basemap.html#t)

  • Tm | compass :: [Type => Str]

    Draws a map magnetic rose on the map at the location defined by the reference and anchor points. (http://docs.generic-mapping-tools.org/latest/basemap.html#t)

  • U | time_stamp | timestamp :: [Type => Str or Bool or []] $Arg = [[just]/dx/dy/][c|label]$

    Draw GMT time stamp logo on plot. (http://docs.generic-mapping-tools.org/latest/gmt.html#u-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • X | x_offset | xshift :: [Type => Str] $Arg = [a|c|f|r][x-shift[u]]$

  • Y | y_offset | yshift :: [Type => Str] $Arg = [a|c|f|r][y-shift[u]]$

    Shift plot origin relative to the current origin by (x-shift,y-shift) and optionally append the length unit (c, i, or p). (http://docs.generic-mapping-tools.org/latest/gmt.html#xy-full)

  • bo | binary_out :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary output. (http://docs.generic-mapping-tools.org/latest/gmt.html#bo-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • p | view | perspective :: [Type => Str or List] $Arg = [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]$

    Selects perspective view and sets the azimuth and elevation of the viewpoint [180/90]. (http://docs.generic-mapping-tools.org/latest/gmt.html#perspective-full)

  • t | alpha | transparency :: [Type => Str] $Arg = transp$

    Set PDF transparency level for an overlay, in (0-100] percent range. [Default is 0, i.e., opaque]. (http://docs.generic-mapping-tools.org/latest/gmt.html#t-full)

GMT.blendimg!Method
blendimg!(color::GMTimage, shade::GMTimage; new=false)

Blend the RGB color GMTimage with the shade intensity image (normally obtained with gdaldem) The new argument determines if we return a new RGB image or update the color argument.

The blending method is the one explained in https://gis.stackexchange.com/questions/255537/merging-hillshade-dem-data-into-color-relief-single-geotiff-with-qgis-and-gdal/255574#255574

Returns

A GMT RGB Image

blendimg!(img1::GMTimage, img2::GMTimage; new=false, transparency=0.5)

Blend two 2D UInt8 or 2 RGB images using transparency.

  • transparency The default value, 0.5, gives equal weight to both images. 0.75 will make img weight 3/4 of the total sum, and so forth.
  • new If true returns a new GMTimage object, otherwise it cahnges the img content.

Returns

A GMT intensity Image

GMT.blockmeanFunction
blockmean(cmd0::String="", arg1=nothing; kwargs...)

Block average (x,y,z) data tables by L2 norm.

Full option list at blockmean

Parameters

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • I | inc | increment | spacing :: [Type => Str] $Arg = xinc[unit][+e|n][/yinc[unit][+e|n]]]$

    x_inc [and optionally y_inc] is the grid spacing. Optionally, append an increment unit. (http://docs.generic-mapping-tools.org/latest/blockmean.html#i)

  • A | field | fields :: [Type => Str]

    Select which fields to write to individual grids. Append comma-separated codes for available fields: z (the mean data z, but see statistic), s (standard deviation), l (lowest value), h (highest value) and w (the output weight; requires weights). [Default is just z]. (http://docs.generic-mapping-tools.org/latest/blockmean.html#a)

  • C | center :: [Type => Bool]

    Use the center of the block as the output location [Default uses the mean location]. Not used when -A (http://docs.generic-mapping-tools.org/latest/blockmean.html#c)

  • E | extend | extended :: [Type => Str | []]

    Provide Extended report which includes s (the standard deviation about the mean), l, the lowest value, and h, the high value for each block. Output order becomes x,y,z,s,l,h[,w]. [Default outputs x,y,z[,w]. See -W for w output. If -Ep is used we assume weights are 1/(sigma squared) and s becomes the propagated error of the mean. (http://docs.generic-mapping-tools.org/latest/blockmean.html#e)

  • G | save | outgrid | outfile :: [Type => Str]

    Write one or more fields directly to grids on disk; no table data are return. If more than one fields are specified via A then grdfile must contain the format flag %s so that we can embed the field code in the file names. If not provided but A is used, return 1 or more GMTgrid type(s). (http://docs.generic-mapping-tools.org/latest/blockmean.html#g)

  • S | statistic :: [Type => Str | Symb]

    Use statistic=:n to report the number of points inside each block, statistic=:s to report the sum of all z-values inside a block, statistic=:w to report the sum of weights [Default (or statistic=:m reports mean value]. (http://docs.generic-mapping-tools.org/latest/blockmean.html#s)

  • mean :: [Type => Any]

    Report the mean value of points inside each block

  • npts | counts :: [Type => Any]

    Report the number of points inside each block

  • sum :: [Type => Any]

    Report the sum of all z-values inside each block

  • sum_weights :: [Type => Any]

    Report the the sum of weights

  • grid :: [Type => Bool]

    With any of the above options (statistic, npts, sum) this option makes it return a grid instead of a GMTdataset.

  • W | weights :: [Type => Str | []]

    Unweighted input and output have 3 columns x,y,z; Weighted i/o has 4 columns x,y,z,w. Weights can be used in input to construct weighted mean values for each block. (http://docs.generic-mapping-tools.org/latest/blockmean.html#w)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • bi | binary_in :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary format for primary input (secondary inputs are always ASCII). (http://docs.generic-mapping-tools.org/latest/gmt.html#bi-full)

  • di | nodata_in :: [Type => Str or Number] $Arg = nodata$

    Examine all input columns and if any item equals nodata we interpret this value as a missing data item and substitute the value NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#di-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • o | outcols | outcol :: [Type => Str] $Arg = cols[,…]$

    Select specific data columns for primary output, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#ocols-full)

  • q | inrow | inrows :: [Type => Str] $Arg = [i|o][~]rows[+ccol][+a|f|s]$

    Select specific data rows to be read (-qi [Default]) or written (-qo) [all]. (http://docs.generic-mapping-tools.org/latest/gmt.html#q-full)

  • r | reg | registration :: [Type => Bool or []]

    Force pixel node registration [Default is gridline registration]. (http://docs.generic-mapping-tools.org/latest//gmt.html#r-full)

  • w | wrap | cyclic :: [Type => Str or Number] $Arg = [[-]n]$

    Convert input records to a cyclical coordinate. (http://docs.generic-mapping-tools.org/latest/gmt.html#w-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.blockmedianFunction
blockmedian(cmd0::String="", arg1=nothing; kwargs...)

Block average (x,y,z) data tables by L1 norm.

Full option list at blockmedian

GMT.blockmodeFunction
blockmode(cmd0::String="", arg1=nothing; kwargs...)

Block average (x,y,z) data tables by mode estimation.

Full option list at blockmode

GMT.buffergeoMethod
buffergeo(D::GMTdataset; width=0, unit=:m, np=120, flatstart=false, flatend=false, epsg::Integer=0, tol=0.01)

or

buffergeo(line::Matrix; width=0, unit=:m, np=120, flatstart=false, flatend=false, proj::String="", epsg::Integer=0, tol=0.01)

or

buffergeo(fname::String; width=0, unit=:m, np=120, flatstart=false, flatend=false, proj::String="", epsg::Integer=0, tol=0.01)

Computes a buffer arround a poly-line. This calculation is performed on a ellipsoidal Earth (or other planet) using the GeographicLib (via PROJ4) so it should be very accurate.

Parameters

  • D | line | fname: - the geometry. This can either be a GMTdataset (or vector of it), a Mx2 matrix, the name of file that can be read as a GMTdataset by gmtread() or a GDAL AbstractDataset object
  • width: - the buffer width to be applied. Expressed meters (the default), km or Miles (see unit)
  • unit: - If width is not in meters use one of unit=:km, or unit=:Nautical or unit=:Miles
  • np: - Number of points into which circles are descretized (Default = 120)
  • flatstart - When computing buffers arround poly-lines make the start flat (no half-circle)
  • flatend - Same as flatstart but for the buffer end
  • proj - If line data is in Cartesians but with a known projection pass in a PROJ4 string to allow computing the buffer
  • epsg - Same as proj but using an EPSG code
  • tol - At the end simplify the buffer line with a Douglas-Peucker procedure. Use TOL=0 to NOT do the line simplification, or use any other value in degrees. Default computes it as 0.5% of buffer width.

Returns

A GMT dataset or a vector of it (when input is Vector{GMTdataset})

Example: Compute a buffer with 50000 m width

D = buffergeo([0 0; 10 10; 15 20], width=50000);
GMT.circgeoMethod
circgeo(lon, lat; radius=X, proj="", s_srs="", epsg=0, dataset=false, unit=:m, np=120, shape="")

or

circgeo(lonlat; radius=X, proj="", s_srs="", epsg=0, dataset=false, unit=:m, np=120, shape="")

Args:

  • lonlat: - longitude, latitude (degrees). If a Mx2 matrix, returns as many segments as number of rows. Use this to compute multiple shapes at different positions. In this case output type is
			always a vector of GMTdatasets.
  • radius: - The circle radius in meters (but see unit) or circumscribing circle for the other shapes
  • proj or s_srs: - the given projection whose ellipsoid we move along. Can be a proj4 string or an WKT
  • epsg: - Alternative way of specifying the projection [Default is WGS84]
  • dataset: - If true returns a GMTdataset instead of matrix (with single shapes)
  • unit: - If radius is not in meters use one of unit=:km, or unit=:Nautical or unit=:Miles
  • np: - Number of points into which the circle is descretized (Default = 120)
  • shape: - Optional string/symbol with "triangle", "square", "pentagon" or "hexagon" (or just the first char) to compute one of those geometries instead of a circle. np is ignored in these cases.

Returns

  • circ - A Mx2 matrix or GMTdataset with the circle coordinates

Example: Compute circle about the (0,0) point with a radius of 50 km

c = circgeo([0.,0], radius=50, unit=:k)
GMT.clipFunction
clip(cmd0::String="", arg1=nothing; kwargs...)

Reads (length,azimuth) pairs from file and plot a windclip diagram.

Full option list at psclip

Parameters

  • C | endclippath :: [Type => Bool]

    Mark end of existing clip path. No input file is needed. (http://docs.generic-mapping-tools.org/latest/psclip.html#c)

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • A | inc :: [Type => Str or []]

    By default, geographic line segments are connected as great circle arcs. To connect them as straight lines, use A (http://docs.generic-mapping-tools.org/latest/psclip.html#a)

  • B | frame | axis | xaxis yaxis:: [Type => Str]

    Set map boundary frame and axes attributes. (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • Jz | zscale | zsize :: [Type => String]

  • N | invert :: [Type => Bool]

    Invert the sense of the test, i.e., clip regions where there is data coverage. (http://docs.generic-mapping-tools.org/latest/psclip.html#n)

  • P | portrait :: [Type => Bool or []]

    Tell GMT to NOT draw in portrait mode (that is, make a Landscape plot)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • T | clip_limits :: [Type => Bool]

    Rather than read any input files, simply turn on clipping for the current map region. (http://docs.generic-mapping-tools.org/latest/psclip.html#t)

  • U | time_stamp | timestamp :: [Type => Str or Bool or []] $Arg = [[just]/dx/dy/][c|label]$

    Draw GMT time stamp logo on plot. (http://docs.generic-mapping-tools.org/latest/gmt.html#u-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • X | x_offset | xshift :: [Type => Str] $Arg = [a|c|f|r][x-shift[u]]$

  • Y | y_offset | yshift :: [Type => Str] $Arg = [a|c|f|r][y-shift[u]]$

    Shift plot origin relative to the current origin by (x-shift,y-shift) and optionally append the length unit (c, i, or p). (http://docs.generic-mapping-tools.org/latest/gmt.html#xy-full)

  • bi | binary_in :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary format for primary input (secondary inputs are always ASCII). (http://docs.generic-mapping-tools.org/latest/gmt.html#bi-full)

  • di | nodata_in :: [Type => Str or Number] $Arg = nodata$

    Examine all input columns and if any item equals nodata we interpret this value as a missing data item and substitute the value NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#di-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • g | gap :: [Type => Str] $Arg = [a]x|y|d|X|Y|D|[col]z[+|-]gap[u]$

    Examine the spacing between consecutive data points in order to impose breaks in the line. (http://docs.generic-mapping-tools.org/latest/gmt.html#g-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • p | view | perspective :: [Type => Str or List] $Arg = [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]$

    Selects perspective view and sets the azimuth and elevation of the viewpoint [180/90]. (http://docs.generic-mapping-tools.org/latest/gmt.html#perspective-full)

  • t | alpha | transparency :: [Type => Str] $Arg = transp$

    Set PDF transparency level for an overlay, in (0-100] percent range. [Default is 0, i.e., opaque]. (http://docs.generic-mapping-tools.org/latest/gmt.html#t-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.coastFunction
coast(cmd0::String=""; kwargs...)

Plot continents, shorelines, rivers, and borders on maps. Plots grayshaded, colored, or textured land-masses [or water-masses] on maps and [optionally] draws coastlines, rivers, and political boundaries. A map projection must be supplied.

Full option list at coast

Parameters

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • A | area :: [Type => Str or Number]

    Features with an area smaller than minarea in km^2 or of hierarchical level that is lower than minlevel or higher than max_level will not be plotted. (http://docs.generic-mapping-tools.org/latest/coast.html#a)

  • B | frame | axis | xaxis yaxis:: [Type => Str]

    Set map boundary frame and axes attributes. (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • C | river_fill :: [Type => Str]

    Set the shade, color, or pattern for lakes and river-lakes. (http://docs.generic-mapping-tools.org/latest/coast.html#c)

  • D | res | resolution :: [Type => Str] $Arg = c|l|i|h|f|a$

    Selects the resolution of the data set to use ((f)ull, (h)igh, (i)ntermediate, (l)ow, (c)rude), or (a)uto). (http://docs.generic-mapping-tools.org/latest/coast.html#d)

  • E | DCW :: [Type => Str]

    Select painting or dumping country polygons from the Digital Chart of the World. (http://docs.generic-mapping-tools.org/latest/coast.html#e)

    • Tuple("code", Str); Tuple(code, number); Tuple("code" [,"fill"], (pen)); Tuple((...),(...),...)
    • ex: ("PT",(0.5,"red","–")); (("PT","gblue",(0.5,"red"),("ES",(0.5,"yellow")))
    • DCW=:PT; DCW=(:PT, 1); DCW=("PT", :red)
  • F | box :: [Type => Str]

    Draws a rectangular border around the map scale or rose. (http://docs.generic-mapping-tools.org/latest/coast.html#f)

  • G | land :: [Type => Str]

    Select filling or clipping of “dry” areas. (http://docs.generic-mapping-tools.org/latest/coast.html#g)

  • I | rivers :: [Type => Str]

    Draw rivers. Specify the type of rivers and [optionally] append pen attributes. (http://docs.generic-mapping-tools.org/latest/coast.html#i)

  • L | map_scale :: [Type => Str]

    Draw a map scale. (http://docs.generic-mapping-tools.org/latest/coast.html#l)

  • M | dump :: [Type => Str]

    Dumps a single multisegment ASCII output. No plotting occurs. (http://docs.generic-mapping-tools.org/latest/coast.html#m)

  • N | borders :: [Type => Str]

    Draw political boundaries. Specify the type of boundary and [optionally] append pen attributes (http://docs.generic-mapping-tools.org/latest/coast.html#n)

  • P | portrait :: [Type => Bool or []]

    Tell GMT to NOT draw in portrait mode (that is, make a Landscape plot)

  • clip :: [Type => Str] $Arg = land|water|end$

    To clip land do clip=:land, clip=:water clips water. Use end to mark end of existing clip path. No projection information is needed. (http://docs.generic-mapping-tools.org/latest/coast.html#q)

  • S | water | ocean :: [Type => Str]

    Select filling or clipping of “wet” areas. (http://docs.generic-mapping-tools.org/latest/coast.html#s)

  • Td | rose` :: [Type => Str]

    Draws a map directional rose on the map at the location defined by the reference and anchor points. (http://docs.generic-mapping-tools.org/latest/coast.html#t)

  • Tm | compass :: [Type => Str]

    Draws a map magnetic rose on the map at the location defined by the reference and anchor points. (http://docs.generic-mapping-tools.org/latest/coast.html#t)

  • U | time_stamp | timestamp :: [Type => Str or Bool or []] $Arg = [[just]/dx/dy/][c|label]$

    Draw GMT time stamp logo on plot. (http://docs.generic-mapping-tools.org/latest/gmt.html#u-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • W | shore | shorelines | coast :: [Type => Str] Draw shorelines [Default is no shorelines]. Append pen attributes. (http://docs.generic-mapping-tools.org/latest/coast.html#w)

  • X | x_offset | xshift :: [Type => Str] $Arg = [a|c|f|r][x-shift[u]]$

  • Y | y_offset | yshift :: [Type => Str] $Arg = [a|c|f|r][y-shift[u]]$

    Shift plot origin relative to the current origin by (x-shift,y-shift) and optionally append the length unit (c, i, or p). (http://docs.generic-mapping-tools.org/latest/gmt.html#xy-full)

  • bo | binary_out :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary output. (http://docs.generic-mapping-tools.org/latest/gmt.html#bo-full)

  • p | view | perspective :: [Type => Str or List] $Arg = [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]$

    Selects perspective view and sets the azimuth and elevation of the viewpoint [180/90]. (http://docs.generic-mapping-tools.org/latest/gmt.html#perspective-full)

  • t | alpha | transparency :: [Type => Str] $Arg = transp$

    Set PDF transparency level for an overlay, in (0-100] percent range. [Default is 0, i.e., opaque]. (http://docs.generic-mapping-tools.org/latest/gmt.html#t-full)

  • savefig | figname | name :: [Type => Str]

    Save the figure with the figname=name.ext where ext chooses the figure format (e.g. figname="name.png")

GMT.colorbarFunction
colorbar(cmd0::String="", arg1=nothing; kwargs...)

Plots gray scales or color scales on maps.

Full option list at psscale

  • D | pos | position :: [Type => Str]

    Defines the reference point on the map for the color scale using one of four coordinate systems. (http://docs.generic-mapping-tools.org/latest/psscale.html#d)

  • B | frame | axis | xaxis yaxis:: [Type => Str]

    Set map boundary frame and axes attributes. (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • C | color | colormap | cmap | colorscale :: [Type => Str] $Arg = [cpt |master[+izinc] |color1,color2[,*color3*,…]]$

    Give a CPT name or specify -Ccolor1,color2[,color3,...] to build a linear continuous CPT from those colors automatically. (http://docs.generic-mapping-tools.org/latest/grdimage.html#c)

  • F | box :: [Type => Str]

    Draws a rectangular border around the scale. (http://docs.generic-mapping-tools.org/latest/psscale.html#f)

  • G | truncate :: [Type => Str]

    Truncate the incoming CPT so that the lowest and highest z-levels are to zlo and zhi. (http://docs.generic-mapping-tools.org/latest/psscale.html#g)

  • I | shade :: [Type => Number | Str]

    Add illumination effects. (http://docs.generic-mapping-tools.org/latest/psscale.html#i)

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • Jz | zscale | zsize :: [Type => String]

  • L | equal | equal_size :: [Type => Str | Bool] Arg = [i][gap]

    Gives equal-sized color rectangles. Default scales rectangles according to the z-range in the CPT. (http://docs.generic-mapping-tools.org/latest/psscale.html#l)

  • M | monochrome :: [Type => Bool]

    Force conversion to monochrome image using the (television) YIQ transformation. (http://docs.generic-mapping-tools.org/latest/psscale.html#m)

  • N | dpi :: [Type => Str | Number]

    Controls how the color scale is represented by the PostScript language. (http://docs.generic-mapping-tools.org/latest/psscale.html#n)

  • Q | log :: [Type => Str]

    Selects a logarithmic interpolation scheme [Default is linear]. (http://docs.generic-mapping-tools.org/latest/psscale.html#q)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • S | nolines :: [Type => Bool | []]

    Do not separate different color intervals with black grid lines.

  • U | time_stamp | timestamp :: [Type => Str or Bool or []] $Arg = [[just]/dx/dy/][c|label]$

    Draw GMT time stamp logo on plot. (http://docs.generic-mapping-tools.org/latest/gmt.html#u-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • W | zscale :: [Type => Number]

    Multiply all z-values in the CPT by the provided scale. (http://docs.generic-mapping-tools.org/latest/psscale.html#w)

  • Z | zfile :: [Type => Str]

    File with colorbar-width per color entry. (http://docs.generic-mapping-tools.org/latest/psscale.html#z)

  • savefig | figname | name :: [Type => Str]

    Save the figure with the figname=name.ext where ext chooses the figure format (e.g. figname="name.png")

GMT.colorzonesMethod
colorzones(shapes::Vector{GMTdataset}[, fun::Function]; img::GMTimage=nothing, url::AbstractString="", layer=0, pixelsize::Int=0, append::Bool=true)

Paint the polygons in the shapes with the average color that those polygons ocupy in the img image. When the shapes are plotted the resulting image looks like a choropleth map. Alternatively, instead of transmitting the img image one can provide a WMS URL, layer number and pixelsize to download images from the Web Map Server service, covering each one the bounding box of each of the shapes polygons. This option is much slower than passing the entire image at once but consumes much less memory. Important when the total area is large (think Russia size) because even at a moderately resultion it can imply downloading a huge file.

Parameters

  • shapes: A vector of GMTdataset containing the polygons to be painted. This container will be changed in the sense that the $header$ field of each polygon (a GMTdataset) will be appended with the fill color (but see also the append option that controls how this change takes place.)
  • fun: By default the average color is obtained by taking the square root of the average of squares of each of the three (RGB) bands (or just one for grayscale images). Give the name of another function to replace this default. For example $median$ will assign the color by computing the median of each component inside the polygon area in question.
  • img: the image from which the stats (fun) of each color for each polygon will be computed.
  • url: In case the img option is not used, pass the Web Map Server URL (see the $wmsinfo$ and $wmsread$ functions) from where the the images covering the BoundingBox of each polygon will be downloaded. Warning, this is a much slower method but potentially usefull when the images to download risk to be very big.
  • layer: When the url option is used this one becomes mandatory and represents the layer number or layer name of interest from those provided by the WMS service. That is, both of these forms are allowed: layer=3 or layer="Invented layer name"
  • pixelsize: Sets the requested cell size in meters [default]. Use a string appended with a 'd' (e.g. resolution="0.001d") if the resolution is given in degrees. This way works only when the layer is in geogs.
  • append: By default the color assignement to each of the polygons in the shapes vector is achieved by appending the fill color to the possibly existing header field. Running the $colorzones$ command more than once keeps adding (now ignored, because only the first is used) colors. Setting append=false forces rewriting the header field at each run and hence the assigned color is always the one used (but the previous header is cleared out).

See also: $rasterzones!$

Returns

It does't return anything but the input shapes is modified.

Example

Read the 2020 Sentinel2 Earth color for Portugal at 100 m resolution. Load the administrative
regions and compute their median colors.

wms = wmsinfo("http://tiles.maps.eox.at/wms?");
img = wmsread(wms, layer=3, region=(-9.6,-6,36.9,42.2), pixelsize=100);
Pt = gmtread("C:\programs\compa_libs\covid19pt\extra\mapas\concelhos\concelhos.shp");
colorzones(Pt, median, img=img);
imshow(Pt, proj=:guess)
GMT.contourFunction
contour(cmd0::String="", arg1=nothing; kwargs...)

Reads a table data and produces a raw contour plot by triangulation.

Full option list at contour

Parameters

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • A | annot :: [Type => Str | Number] $Arg = [-|[+]annot_int][labelinfo]$

    annot_int is annotation interval in data units; it is ignored if contour levels are given in a file. (http://docs.generic-mapping-tools.org/latest/contour.html#a)

  • B | frame | axis | xaxis yaxis:: [Type => Str]

    Set map boundary frame and axes attributes. (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • C | cont | contour | contours | levels :: [Type => Str | Number | GMTcpt] $Arg = [+]cont_int$

    Contours to be drawn may be specified in one of three possible ways. (http://docs.generic-mapping-tools.org/latest/contour.html#c)

  • D | dump :: [Type => Str]

    Dump contours as data line segments; no plotting takes place. (http://docs.generic-mapping-tools.org/latest/contour.html#d)

  • E | index :: [Type => Str | Mx3 array]

    Give name of file with network information. Each record must contain triplets of node numbers for a triangle. (http://docs.generic-mapping-tools.org/latest/contour.html#e)

  • G | labels :: [Type => Str]

    Controls the placement of labels along the quoted lines. (http://docs.generic-mapping-tools.org/latest/contour.html#g)

  • I | fill | colorize :: [Type => Bool]

    Color the triangles using the color scale provided via C. (http://docs.generic-mapping-tools.org/latest/contour.html#i)

  • Jz | zscale | zsize :: [Type => String]

  • L | mesh :: [Type => Str | Number]

    Draw the underlying triangular mesh using the specified pen attributes (if not provided, use default pen) (http://docs.generic-mapping-tools.org/latest/contour.html#l)

  • N | no_clip :: [Type => Bool]

    Do NOT clip contours or image at the boundaries [Default will clip to fit inside region]. (http://docs.generic-mapping-tools.org/latest/contour.html#n)

  • P | portrait :: [Type => Bool or []]

    Tell GMT to NOT draw in portrait mode (that is, make a Landscape plot)

  • Q | cut :: [Type => Str | Number] $Arg = [cut[unit]][+z]]$

    Do not draw contours with less than cut number of points. (http://docs.generic-mapping-tools.org/latest/contour.html#q)

  • S | skip :: [Type => Str | []] $Arg = [p|t]$

    Skip all input xyz points that fall outside the region. (http://docs.generic-mapping-tools.org/latest/contour.html#s)

  • T | ticks :: [Type => Str] $Arg = [+|-][+a][+dgap[/length]][+l[labels]]$

    Draw tick marks pointing in the downward direction every gap along the innermost closed contours. (http://docs.generic-mapping-tools.org/latest/contour.html#t)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • U | time_stamp | timestamp :: [Type => Str or Bool or []] $Arg = [[just]/dx/dy/][c|label]$

    Draw GMT time stamp logo on plot. (http://docs.generic-mapping-tools.org/latest/gmt.html#u-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • W | pen :: [Type => Str | Number]

    Sets the attributes for the particular line. (http://docs.generic-mapping-tools.org/latest/contour.html#w)

  • X | x_offset | xshift :: [Type => Str] $Arg = [a|c|f|r][x-shift[u]]$

  • Y | y_offset | yshift :: [Type => Str] $Arg = [a|c|f|r][y-shift[u]]$

    Shift plot origin relative to the current origin by (x-shift,y-shift) and optionally append the length unit (c, i, or p). (http://docs.generic-mapping-tools.org/latest/gmt.html#xy-full)

  • Z | scale :: [Type => Str]

    Use to subtract shift from the data and multiply the results by factor before contouring starts. (http://docs.generic-mapping-tools.org/latest/contour.html#z)

  • bi | binary_in :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary format for primary input (secondary inputs are always ASCII). (http://docs.generic-mapping-tools.org/latest/gmt.html#bi-full)

  • bo | binary_out :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary output. (http://docs.generic-mapping-tools.org/latest/gmt.html#bo-full)

  • d | nodata :: [Type => Str or Number] $Arg = [i|o]nodata$

    Control how user-coded missing data values are translated to official NaN values in GMT. (http://docs.generic-mapping-tools.org/latest/gmt.html#d-full)

  • di | nodata_in :: [Type => Str or Number] $Arg = nodata$

    Examine all input columns and if any item equals nodata we interpret this value as a missing data item and substitute the value NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#di-full)

  • do | nodata_out :: [Type => Str or Number] $Arg = nodata$

    Examine all output columns and if any item equals NAN substitute it with the chosen missing data value. (http://docs.generic-mapping-tools.org/latest/gmt.html#do-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • p | view | perspective :: [Type => Str or List] $Arg = [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]$

    Selects perspective view and sets the azimuth and elevation of the viewpoint [180/90]. (http://docs.generic-mapping-tools.org/latest/gmt.html#perspective-full)

  • t | alpha | transparency :: [Type => Str] $Arg = transp$

    Set PDF transparency level for an overlay, in (0-100] percent range. [Default is 0, i.e., opaque]. (http://docs.generic-mapping-tools.org/latest/gmt.html#t-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

  • savefig | figname | name :: [Type => Str]

    Save the figure with the figname=name.ext where ext chooses the figure format (e.g. figname="name.png")

GMT.contourfFunction
contourf(cmd0::String="", arg1=nothing; kwargs...)

Performs Delaunay triangulation on x,y[,z] data, i.e., it find how the points should be connected to give the most equilateral triangulation possible.

Full option list at triangulate

Parameters

  • A | annot :: [Type => Str | Number] $Arg = [-|[+]annot_int][labelinfo]$

    annot_int is annotation interval in data units; it is ignored if contour levels are given in a file. (http://docs.generic-mapping-tools.org/latest/contour.html#a)

  • B | frame | axis | xaxis yaxis:: [Type => Str]

    Set map boundary frame and axes attributes. (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • C | cont | contour | contours | levels :: [Type => Str | Number | GMTcpt] $Arg = [+]cont_int$

    Contours to be drawn may be specified in one of three possible ways. (http://docs.generic-mapping-tools.org/latest/grdcontour.html#c)

  • E | index :: [Type => Str | Mx3 array]

    Give name of file with network information. Each record must contain triplets of node numbers for a triangle. (http://docs.generic-mapping-tools.org/latest/contour.html#e)

  • G | labels :: [Type => Str]

    Controls the placement of labels along the quoted lines. (http://docs.generic-mapping-tools.org/latest/contour.html#g)

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • P | portrait :: [Type => Bool or []]

    Tell GMT to NOT draw in portrait mode (that is, make a Landscape plot)

  • Q | cut :: [Type => Str | Number] $Arg = [cut[unit]][+z]]$

    Do not draw contours with less than cut number of points. (http://docs.generic-mapping-tools.org/latest/contour.html#q)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • S | skip :: [Type => Str | []] $Arg = [p|t]$

    Skip all input xyz points that fall outside the region (Used when input data is a table). (http://docs.generic-mapping-tools.org/latest/contour.html#s)

  • S | smooth :: [Type => Number]

    Used to resample the contour lines at roughly every (gridbox_size/smoothfactor) interval. (Used when input data is a grid) (http://docs.generic-mapping-tools.org/latest/grdcontour.html#s)

  • T | ticks :: [Type => Str] $Arg = [+|-][+a][+dgap[/length]][+l[labels]]$

    Draw tick marks pointing in the downward direction every gap along the innermost closed contours. (http://docs.generic-mapping-tools.org/latest/contour.html#t)

  • U | time_stamp | timestamp :: [Type => Str or Bool or []] $Arg = [[just]/dx/dy/][c|label]$

    Draw GMT time stamp logo on plot. (http://docs.generic-mapping-tools.org/latest/gmt.html#u-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • W | pen :: [Type => Str | Number]

    Sets the attributes for the particular line. (http://docs.generic-mapping-tools.org/latest/contour.html#w)

  • Z | xyz | triplets :: [Type => Bool]

    (http://docs.generic-mapping-tools.org/latest/triangulate.html#z)

  • bi | binary_in :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary format for primary input (secondary inputs are always ASCII). (http://docs.generic-mapping-tools.org/latest/gmt.html#bi-full)

  • bo | binary_out :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary output. (http://docs.generic-mapping-tools.org/latest/gmt.html#bo-full)

  • di | nodata_in :: [Type => Str or Number] $Arg = nodata$

    Examine all input columns and if any item equals nodata we interpret this value as a missing data item and substitute the value NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#di-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • p | view | perspective :: [Type => Str or List] $Arg = [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]$

    Selects perspective view and sets the azimuth and elevation of the viewpoint [180/90]. (http://docs.generic-mapping-tools.org/latest/gmt.html#perspective-full)

  • t | alpha | transparency :: [Type => Str] $Arg = transp$

    Set PDF transparency level for an overlay, in (0-100] percent range. [Default is 0, i.e., opaque]. (http://docs.generic-mapping-tools.org/latest/gmt.html#t-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

Examples

    G = GMT.peaks();
    C = makecpt(T=(-7,9,2));

    contourf(G, show=1)
    contourf(G, C=[-2, 0, 2, 5], show=1)
    contourf(G, C, contour=[-2, 0, 2, 5], show=1)
    contourf(G, C, annot=[-2, 0, 2, 5], show=1)
    contourf(G, C, annot=2, show=1)
    contourf(G, C, contour=1, annot=[-2, 0, 2, 5], show=1)
    contourf(G, C, annot=:none, show=1)

    d = [0 2 5; 1 4 5; 2 0.5 5; 3 3 9; 4 4.5 5; 4.2 1.2 5; 6 3 1; 8 1 5; 9 4.5 5];
    contourf(d, limits=(-0.5,9.5,0,5), pen=0.25, labels=(line=(:min,:max),), show=1)
GMT.coupeFunction
coupe(cmd0::String="", arg1=nothing; kwargs...)

Plot cross-sections of focal mechanisms.

Full option list at pscoupe. Essentially the same as meca plus A. Run gmthelp(coupe) to see the list.

GMT.cpt4dcwMethod
C = cpt4dcw(codes::String, vals::Vector{<:Real}; kwargs...)

Create a categorical CPT to use with the output of coast(dcw=...) to make Choropleth maps.

  • codes is a comma separated string with two chars country codes (ex: "PT,ES,FR,IT")
  • vals a vector with same size as number of country codes, with the values used to colorize the countries

Optionally provide a CPT in the kwarg cmap=CPT with a range sufficient to tansform the vals in colors. As an alternative to the above provide a makecpt type range numeric vector to create a CPT. If none of these are provided a default CPT = makecpt(range=(0,255,1)) will be used.

GMT.cropMethod

crop(arg::GItype; kw...)

Crop a subregion of a grid (GMTgrid) or a image (GMTimage). The subregion is specified with the $limits$ or $region$ keyword; the specified range must not exceed the range of the input. This function differs from $grdcut$ in the sense that it doesn't call the GMT lib and works only on in-memory array (i.e., no disk files).

Returns

A grid or an image, depending on the input type, plus two 1x2 matrices with the indices of the cropped zone.

Example

G = GMT.peaks();
crop(G, region=(-2,2,-2,2))
GMT.date2doyFunction
date2doy(date) -> Integer

Compute the Day-Of-Year (DOY) from date that can be a string or a Date/DateTime type. If ommited, returns today's DOY

GMT.doy2dateFunction
doy2date(doy[, year]) -> Date

Compute the date from the Day-Of-Year doy. If year is ommited we take it to mean the current year. Both doy and year can be strings or integers.

GMT.dsget_segment_idsMethod
ids, ind = dsget_segment_ids(D, case=0)::Tuple{Vector{String}, Vector{Int}}

Where D is a GMTdataset or a vector of them, returns the segment ids (first text after the '>') and the indices of those segments.

GMT.earthtideFunction
earthtide(cmd0::String=""; kwargs...)

Compute grids or time-series of solid Earth tides.

Full option list at earthtide

	G = earthtide();
	imshow(G)
GMT.epsg2projMethod
epsg2proj(code::Integer)

Convert a EPSG code into the PROJ4 form.

GMT.epsg2wktMethod
epsg2wkt(code::Integer, pretty::Bool=false)

Convert a EPSG code into the WKT form. Use pretty=true to return a more human readable text.

GMT.filter1dFunction
filter1d(cmd0::String="", arg1=nothing, kwargs...)

Time domain filtering of 1-D data tables.

Full option list at filter1d

Parameters

  • F | filter_type :: [Type => Str] Arg = type width[modifiers]

    Sets the filter type. Choose among convolution and non-convolution filters. Append the filter code followed by the full filter width in same units as time column. (http://docs.generic-mapping-tools.org/latest/filter1d.html#f)

  • D | inc :: [Type => Number] Arg = increment

    $increment$ is used when series is NOT equidistantly sampled. Then increment will be the abscissae resolution. (http://docs.generic-mapping-tools.org/latest/filter1d.html#d)

  • E | end | ends :: [Type => Bool | []]

    Include Ends of time series in output. Default loses half the filter-width of data at each end. (http://docs.generic-mapping-tools.org/latest/filter1d.html#e)

  • L | gap_width :: [Type => Number | Str] Arg = width

    Checks for Lack of data condition. If input data has a gap exceeding width then no output will be given at that point. (http://docs.generic-mapping-tools.org/latest/filter1d.html#l)

  • N | time_col :: [Type => Int] Arg = t_col

    Indicates which column contains the independent variable (time). The left-most column is # 0, the right-most is # (n_cols - 1). [Default is 0]. (http://docs.generic-mapping-tools.org/latest/filter1d.html#n)

  • Q | quality :: [Type => Number] Arg = q_factor

    Assess Quality of output value by checking mean weight in convolution. Enter q_factor between 0 and 1. (http://docs.generic-mapping-tools.org/latest/filter1d.html#q)

  • S | symetry :: [Type => Number] Arg = symmetry_factor

    Checks symmetry of data about window center. Enter a factor between 0 and 1. (http://docs.generic-mapping-tools.org/latest/filter1d.html#s)

  • T | equi_space :: [Type => List | Str] Arg = [min/max/]inc[+a|n]

    Make evenly spaced time-steps from min to max by inc [Default uses input times]. (http://docs.generic-mapping-tools.org/latest/filter1d.html#t)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • write | |> :: [Type => Str] $Arg = fname$

    Save result to ASCII file instead of returning to a Julia variable. Give file name as argument. Use the bo option to save as a binary file.

  • append :: [Type => Str] $Arg = fname$

    Append result to an existing file named $fname$ instead of returning to a Julia variable. Use the bo option to save as a binary file.

  • b | binary :: [Type => Str]

    (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • d | nodata :: [Type => Str or Number] $Arg = [i|o]nodata$

    Control how user-coded missing data values are translated to official NaN values in GMT. (http://docs.generic-mapping-tools.org/latest/gmt.html#d-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • g | gap :: [Type => Str] $Arg = [a]x|y|d|X|Y|D|[col]z[+|-]gap[u]$

    Examine the spacing between consecutive data points in order to impose breaks in the line. (http://docs.generic-mapping-tools.org/latest/gmt.html#g-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • o | outcols | outcol :: [Type => Str] $Arg = cols[,…]$

    Select specific data columns for primary output, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#ocols-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.fitcircleFunction
fitcircle(cmd0::String="", arg1=nothing, kwargs...)

Find mean position and great [or small] circle fit to points on a sphere.

Full option list at fitcircle

Parameters

  • L | norm :: [Type => Int | []]

    Specify the desired norm as 1 or 2, or use [] or 3 to see both solutions. (http://docs.generic-mapping-tools.org/latest/fitcircle.html#l)

  • F | coord | coordinates :: [Type => Str] Arg = f|m|n|s|c

    Only return data coordinates, and append Arg to specify which coordinates you would like. (http://docs.generic-mapping-tools.org/latest/fitcircle.html#f)

  • S | symetry :: [Type => Number] Arg = symmetry_factor

    Attempt to (http://docs.generic-mapping-tools.org/latest/fitcircle.html#s)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • write | |> :: [Type => Str] $Arg = fname$

    Save result to ASCII file instead of returning to a Julia variable. Give file name as argument. Use the bo option to save as a binary file.

  • append :: [Type => Str] $Arg = fname$

    Append result to an existing file named $fname$ instead of returning to a Julia variable. Use the bo option to save as a binary file.

  • bi | binary_in :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary format for primary input (secondary inputs are always ASCII). (http://docs.generic-mapping-tools.org/latest/gmt.html#bi-full)

  • di | nodata_in :: [Type => Str or Number] $Arg = nodata$

    Examine all input columns and if any item equals nodata we interpret this value as a missing data item and substitute the value NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#di-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • g | gap :: [Type => Str] $Arg = [a]x|y|d|X|Y|D|[col]z[+|-]gap[u]$

    Examine the spacing between consecutive data points in order to impose breaks in the line. (http://docs.generic-mapping-tools.org/latest/gmt.html#g-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • o | outcols | outcol :: [Type => Str] $Arg = cols[,…]$

    Select specific data columns for primary output, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#ocols-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.gadmMethod
gadm(country, subregions...; children=false, names=false, children_raw=false, reportlevels=false)

Returns a GMTdataset for the requested country, or country subregion(s)

  1. country: ISO 3166 Alpha 3 country code .
  2. subregions: Full official names in hierarchial order (provinces, districts, etc...). To know the names of all administrative children of parent, use the option names.
  3. children: When true, function returns all subregions of parent.
  4. children_raw: When true, function returns two variables -> parent, children, where children is a GDAL object E.g. when children is set to true and when querying just the country, second return parameter are the states/provinces. If children we return a Vector of GMTdataset with the polygons. If children_raw the second output is a GDAL object much like in GADM.jl (less the Tables.jl)
  5. names: Return a string vector with all children names.
  6. reportlevels: just report the number of administrative levels (including the country) and exit.

Examples

# data of India's borders
data = gadm("IND")

# uttar -> the limits of the Uttar Pradesh state
uttar = gadm("IND", "Uttar Pradesh")

# uttar -> limits of all districts of the  Uttar Pradesh state
uttar = gadm("IND", "Uttar Pradesh", children=true)

# Names of all states of India
gadm("IND", names=true)
GMT.gammacorrectionMethod
gammacorrection(I::GMTimage, gamma; contrast=[0.0, 1.0], brightness=[0.0, 1.0])

Apply a gamma correction to a 2D (intensity) GMTimage using the exponent gamma. Optionally set also contrast and/or brightness

Returns

A GMT intensity Image

GMT.gd2gmtMethod
O = gd2gmt(dataset; band=0, bands=[], sds=0, pad=0)

Convert a GDAL raster dataset into either a GMTgrid (if type is Int16 or Float) or a GMTimage type Use band to select a single band of the dataset. When you know that the dataset contains several bands of an image, use the kwarg bands with a vector the wished bands. By default it reads all bands of the image or grid object.

When DATASET is a string it may contain the file name or the name of a subdataset. In former case you can use the kwarg sds to selec the subdataset numerically. Alternatively, provide the full sds name. For files with sds with a scale_factor (e.g. MODIS data), that scale is applyied automaticaly.

Examples:

   G = gd2gmt("AQUA_MODIS.20210228.L3m.DAY.NSST.sst.4km.NRT.nc", sds=1);
or
   G = gd2gmt("SUBDATASET_1_NAME=NETCDF:AQUA_MODIS.20210228.L3m.DAY.NSST.sst.4km.NRT.nc:sst");
or
   G = gd2gmt("NETCDF:AQUA_MODIS.20210228.L3m.DAY.NSST.sst.4km.NRT.nc:sst");
GMT.gdalreadFunction
gdalread(fname::AbstractString, opts=String[]; gdataset=false, kwargs...)

Read a raster or a vector file from a disk file and return the result either as a GMT type (the default) or a GDAL dataset.

  • fname: Input data. It can be a file name, a GMTgrid or GMTimage object or a GDAL dataset
  • opts: List of options. The accepted options are the ones of the gdal_translate utility. This list can be in the form of a vector of strings, or joined in a simgle string.
  • gdataset: If set to true forces the return of a GDAL dataset instead of a GMT type.
  • kwargs: This options accept the GMT region (-R) and increment (-I)

Returns

A GMT grid/image or a GDAL dataset

GMT.gdalshadeMethod
gdalshade(filename; kwargs...)

Create a shaded relief with the GDAL method (color image blended with shaded intensity).

  • kwargs hold the keyword=value to pass the arguments to gdaldem hillshade

Example: I = gdalshade("hawaii_south.grd", C="faa.cpt", zfactor=4);

Returns

A GMT RGB Image

GMT.gdalwriteFunction
gdalwrite(data, fname::AbstractString, opts=String[]; kwargs...)

or

gdalwrite(fname::AbstractString, data, opts=String[]; kwargs...)

Write a raster or a vector file to disk

  • fname: Output file name. If not explicitly selected via opts the used driver will be picked from the file extension.
  • data: The data to be saved in file. It can be a GMT type or a GDAL dataset.
  • opts: List of options. The accepted options are the ones of the gdal_translate or ogr2ogr utility. This list can be in the form of a vector of strings, or joined in a simgle string.
  • kwargs: This options accept the GMT region (-R) and increment (-I)

or

gdalwrite(cube, fname::AbstractString, v=nothing; dim_name::String="time", dim_units::String="")

Write a MxNxP cube object to disk as a multilayered file.

  • cube: A GMTgrid or GMTimage cube
  • fname: The file name where to save the cube
  • v: A vector with the coordinates of the Z layers (if omitted create one as 1:size(cube,3))
  • dim_name: The name of the variable of the $vertical$ dimension.
  • dim_units: The units of the v vector. If not provided, use the cube.z_units if exist (GMTgrid only)
GMT.geodMethod
geod(lonlat, azim, distance; proj::String="", s_srs::String="", epsg::Integer=0, dataset=false, unit=:m)

Solve the direct geodesic problem.

Args:

  • lonlat: - longitude, latitude (degrees). This can be a vector or a matrix with one row only.
  • azimuth: - azimuth (degrees) ∈ [-540, 540)
  • distance: - distance to move from (lat,lon); can be negative, Default is meters but see unit
  • proj or s_srs: - the given projection whose ellipsoid we move along. Can be a proj4 string or an WKT
  • epsg: - Alternative way of specifying the projection [Default is WGS84]
  • dataset: - If true returns a GMTdataset instead of matrix
  • unit: - If distance is not in meters use one of unit=:km, or unit=:Nautical or unit=:Miles

The distance argument can be a scalar, a Vector, a Vector{Vector} or an AbstractRange. The azimuth can be a scalar or a Vector.

When azimuth is a Vector we always return a GMTdataset with the multiple lines. Use this together with a non-scalar distance to get lines with multiple points along the line. The number of points along line does not even need to be the same. For data, give the distance as a Vector{Vector} where each element of distance is a vector with the distances of the points along a line. In this case the number of distance elements must be equal to the number of azimuth.

Returns

  • dest - destination after moving for [distance] metres in [azimuth] direction.
  • azi - forward azimuth (degrees) at destination [dest].

Example: Compute two lines starting at (0,0) with lengths 111100 & 50000, heading at 15 and 45 degrees.

geod([0., 0], [15., 45], [[0, 10000, 50000, 111100.], [0., 50000]])[1]
GMT.geodetic2enuMethod

Convert from geodetic coordinates to local East, North, Up (ENU) coordinates.

GMT.getbyattribMethod
getbyattrib(D::Vector{<:GMTdataset}[, index::Bool]; kw...)

Take a GMTdataset vector and return only its elememts that match the condition(s) set by the attrib keywords. Note, this assumes that D has its attrib fields set with usable information.

Parameters

  • attrib or att: keyword with the attribute $name$ used in selection. It can be a single name as in att="NAME_2" or a NamedTuple with the attribname, attribvalue as in att=(NAME_2="value"). Use more elements if wishing to do a composite match. E.g. att=(NAME_1="val1", NAME_2="val2") in which case oly segments matching the two conditions are returned.
  • val or value: keyword with the attribute $value$ used in selection. Use this only when att is not a NamedTuple.
  • index: Use this $positional$ argument = true to return only the segment indices that match the att condition(s).

Returns

Either a vector of GMTdataset, or a vector of Int with the indices of the segments that match the query condition. Or $nothing$ if the query results in an empty GMTdataset

Example:

D = getbyattrib(D, attrib="NAME_2", val="Porto");
GMT.gmtMethod

Call a GMT module. This function is not called directly by the users, except when using the $monolithic$ mode. Usage:

gmt("module_name `options`", args...)
GMT.gmt2gdMethod
ds = gmt2gd(GI)

Create GDAL dataset from the contents of GI that can be either a Grid or an Image

ds = gmt2gd(D, save="", geometry="")

Create GDAL dataset from the contents of D, which can be a GMTdataset, a vector of GMTdataset ir a MxN array. The save keyword instructs GDAL to save the contents as an OGR file. Format is determined by file estension. geometry can be a string with "polygon", where file will be converted to polygon/multipolygon depending on D is a single or a multi-segment object, or "point" to convert to a multipoint geometry.

GMT.gmt2kmlFunction
gmt2kml(cmd0::String="", arg1=nothing, kwargs...)

Convert GMT data tables to KML files for Google Earth

Full option list at gmt2kml

Parameters

  • A | altitude_mode :: [Type => Str] $Arg = a|g|s[alt|xscale]$

    Select one of three altitude modes recognized by Google Earth that determines the altitude (in m) of the feature: $a$ absolute altitude, $g$ altitude relative to sea surface or ground, $s$ altitude relative to seafloor or ground. (http://docs.generic-mapping-tools.org/latest/gmt2kml.html#a)

  • C | color | colormap | cmap | colorscale :: [Type => Str] $Arg = [cpt |master[+izinc] |color1,color2[,*color3*,…]]$

    Give a CPT name or specify -Ccolor1,color2[,color3,...] to build a linear continuous CPT from those colors automatically. (http://docs.generic-mapping-tools.org/latest/grdimage.html#c)

  • D | descript :: [Type => Str] $Arg = descriptfile$

    File with HTML snippets that will be included as part of the main description content for the KML file. (http://docs.generic-mapping-tools.org/latest/gmt2kml.html#d)

  • E | extrude :: [Type => Str | []] $Arg = [altitude]$

    Extrude feature down to ground level. (http://docs.generic-mapping-tools.org/latest/gmt2kml.html#e)

  • F | feature_type :: [Type => Str] $Arg = e|s|t|l|p|w$

    Sets the feature type. Choose from points (event, symbol, or timespan), line, polygon, or wiggle. (http://docs.generic-mapping-tools.org/latest/gmt2kml.html#f)

  • G | fill :: [Type => Str] $Arg = f|nfill$

    Sets color fill (G=:f) or label font color (G=:n). (http://docs.generic-mapping-tools.org/latest/gmt2kml.html#g)

  • I | icon :: [Type => Str] $Arg = icon$

    Specify the URL to an alternative icon that should be used for the symbol [Default is a Google Earth circle]. (http://docs.generic-mapping-tools.org/latest/gmt2kml.html#i)

  • K | not_finished :: [Type => Bool]

    Allow more KML code to be appended to the output later [finalize the KML file]. (http://docs.generic-mapping-tools.org/latest/gmt2kml.html#k)

  • L | extended_data :: [Type => Str] $Arg = name1,name2,…$

    Extended data given. Append one or more column names separated by commas. (http://docs.generic-mapping-tools.org/latest/gmt2kml.html#l)

  • N | feature_name :: [Type => Str | Number] $Arg = [t|col |name_template|name]$

    By default, if segment headers contain a -L”label string” then we use that for the name of the KML feature. (http://docs.generic-mapping-tools.org/latest/gmt2kml.html#n)

  • O | overlay :: [Type => Bool]

    Append KML code to an existing KML file [initialize a new KML file]. (http://docs.generic-mapping-tools.org/latest/gmt2kml.html#o)

  • Qa | wiggles :: [Type => Str] $Arg = azimuth$

    Option in support of wiggle plots (requires F=:w). (http://docs.generic-mapping-tools.org/latest/gmt2kml.html#q)

  • Qs | wiggle_scale :: [Type => Str | Number] $Arg = scale[unit]$

    Required setting for wiggle plots (i.e., it requires F=:w). Sets a wiggle scale in z-data units per the user’s units (http://docs.generic-mapping-tools.org/latest/gmt2kml.html#q)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • S | scale :: [Type => Str] $Arg = c|nscale$

    Scale icons or labels. Here, S=:c sets a scale for the symbol icon, whereas S=:n sets a scale for the name labels (http://docs.generic-mapping-tools.org/latest/gmt2kml.html#s)

  • T | title :: [Type => Str] $Arg = title[/foldername]$

    Sets the document title [default is unset]. Optionally, append /FolderName; (http://docs.generic-mapping-tools.org/latest/gmt2kml.html#t)

  • W | pen :: [Type => Str | []] $Arg = [pen][attr]$

    Set pen attributes for lines, wiggles or polygon outlines. (http://docs.generic-mapping-tools.org/latest/gmt2kml.html#w)

  • Z | attrib :: [Type => Str] $Arg = args$

    Set one or more attributes of the Document and Region tags. (http://docs.generic-mapping-tools.org/latest/gmt2kml.html#z)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • write | |> :: [Type => Str] $Arg = fname$

    Save result to ASCII file instead of returning to a Julia variable. Give file name as argument. Use the bo option to save as a binary file.

  • append :: [Type => Str] $Arg = fname$

    Append result to an existing file named $fname$ instead of returning to a Julia variable. Use the bo option to save as a binary file.

  • bi | binary_in :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary format for primary input (secondary inputs are always ASCII). (http://docs.generic-mapping-tools.org/latest/gmt.html#bi-full)

  • di | nodata_in :: [Type => Str or Number] $Arg = nodata$

    Examine all input columns and if any item equals nodata we interpret this value as a missing data item and substitute the value NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#di-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.gmtbeginFunction
gmtbegin(name::String=""; fmt)

Start a GMT session in modern mode (GMT >= 6). 'name' contains the figure name with or without extension. If an extension is used (e.g. "map.pdf") it is used to select the image format.

As an alternative use 'fmt' as a string or symbol containing the format (ps, pdf, png, PNG, tif, jpg, eps).

By default name="GMTplot" and fmt="ps"

GMT.gmtconnectFunction
gmtconnect(cmd0::String="", arg1=nothing, kwargs...)

Connect individual lines whose end points match within tolerance

Full option list at gmtconnect

Parameters

  • C | closed :: [Type => Str | []] Arg = [closed]

    Write all the closed polygons to closed [gmtgmtconnect_closed.txt] and return all other segments as they are. No gmtconnection takes place. (http://docs.generic-mapping-tools.org/latest/gmtconnect.html#c)

  • D | dump :: [Type => Str | []] Arg = [template]

    For multiple segment data, dump each segment to a separate output file (http://docs.generic-mapping-tools.org/latest/gmtconnect.html#d)

  • L | linkfile :: [Type => Str | []] Arg = [linkfile]

    Writes the link information to the specified file [gmtgmtconnect_link.txt]. (http://docs.generic-mapping-tools.org/latest/gmtconnect.html#l)

  • Q | list_file :: [Type => Str | []] Arg = [listfile]

    Used with D to write a list file with the names of the individual output files. (http://docs.generic-mapping-tools.org/latest/gmtconnect.html#q)

  • T | tolerance :: [Type => Str | List] Arg = [cutoff[unit][/nn_dist]]

    Specifies the separation tolerance in the data coordinate units [0]; append distance unit. If two lines has end-points that are closer than this cutoff they will be joined. (http://docs.generic-mapping-tools.org/latest/gmtconnect.html#t)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • write | |> :: [Type => Str] $Arg = fname$

    Save result to ASCII file instead of returning to a Julia variable. Give file name as argument. Use the bo option to save as a binary file.

  • append :: [Type => Str] $Arg = fname$

    Append result to an existing file named $fname$ instead of returning to a Julia variable. Use the bo option to save as a binary file.

  • b | binary :: [Type => Str]

    (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • d | nodata :: [Type => Str or Number] $Arg = [i|o]nodata$

    Control how user-coded missing data values are translated to official NaN values in GMT. (http://docs.generic-mapping-tools.org/latest/gmt.html#d-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • g | gap :: [Type => Str] $Arg = [a]x|y|d|X|Y|D|[col]z[+|-]gap[u]$

    Examine the spacing between consecutive data points in order to impose breaks in the line. (http://docs.generic-mapping-tools.org/latest/gmt.html#g-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • o | outcols | outcol :: [Type => Str] $Arg = cols[,…]$

    Select specific data columns for primary output, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#ocols-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.gmtconvertFunction
gmtconvert(cmd0::String="", arg1=nothing, kwargs...)

Convert, Paste, and/or Extract columns from data tables

Full option list at gmtconvert

Parameters

  • A | h_cat :: [Type => Str | []]

    The records from the input files should be pasted horizontally, not appended vertically [Default]. (http://docs.generic-mapping-tools.org/latest/gmtconvert.html#a)

  • C | n_records :: [Type => Str] $Arg = [+lmin][+umax][+i]$

    Only output segments whose number of records matches your given criteria: (http://docs.generic-mapping-tools.org/latest/gmtconvert.html#c)

  • D | dump :: [Type => Str | []] $Arg = [template[+oorig]]$

    For multiple segment data, dump each segment to a separate output file. (http://docs.generic-mapping-tools.org/latest/gmtconvert.html#d)

  • E | first_last :: [Type => Str | []] $Arg = [f|l|m|Mstride]$

    Only extract the first and last record for each segment of interest. (http://docs.generic-mapping-tools.org/latest/gmtconvert.html#e)

  • F | conn_method :: [Type => Str | []] $Arg = [c|n|r|v][refpoint]$

    Alter the way points are connected (by specifying a scheme) and data are grouped (by specifying a method). (http://docs.generic-mapping-tools.org/latest/gmtconvert.html#f)

  • I | invert | reverse :: [Type => Str | Bool] $Arg = [tsr]$

    Invert the order of items, i.e., output the items in reverse order, starting with the last and ending up with the first item. (http://docs.generic-mapping-tools.org/latest/gmtconvert.html#i)

  • L | list_only :: -[Type => Bool]

    Only output a listing of all segment header records and no data records. (http://docs.generic-mapping-tools.org/latest/gmtconvert.html#l)

  • N | sort :: [Type => Str | Number] $Arg = [-|+]col$

    Numerically sort each segment based on values in column col. (http://docs.generic-mapping-tools.org/latest/gmtconvert.html#n)

  • Q | select_num :: [Type => Str] $Arg = [~]selection$

    Only write segments whose number is included in $selection$ and skip all others. (http://docs.generic-mapping-tools.org/latest/gmtconvert.html#q)

  • S | select_hdr :: [Type => Str] $Arg = [~]”search string” or [~]/regexp/[i]$

    Only output those segments whose header record contains the specified text string. (http://docs.generic-mapping-tools.org/latest/gmtconvert.html#s)

  • T | suppress | skip :: [Type => Str | []] $Arg = [h|d]$

    Suppress the writing of certain records on output. Append h to suppress segment headers [Default] or d to suppress duplicate data records. Use T=:hd to suppress both types of records. (http://docs.generic-mapping-tools.org/latest/gmtconvert.html#t)

  • W | word2num :: [Type => Str | []] $Arg = [+n]$

    Attempt to gmtconvert each word in the trialing text to a number and append such values to the numerical output columns. (http://docs.generic-mapping-tools.org/latest/gmtconvert.html#w)

  • Z | range :: [Type => Str | []] $Arg = [first][:last]$

    Limit output to the specified record range. If first is not set it defaults to record 0 (very first record) and if last is not set then it defaults to the very last record. (http://docs.generic-mapping-tools.org/latest/gmtconvert.html#z)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • write | |> :: [Type => Str] $Arg = fname$

    Save result to ASCII file instead of returning to a Julia variable. Give file name as argument. Use the bo option to save as a binary file.

  • append :: [Type => Str] $Arg = fname$

    Append result to an existing file named $fname$ instead of returning to a Julia variable. Use the bo option to save as a binary file.

  • b | binary :: [Type => Str]

    (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • bo | binary_out :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary output. (http://docs.generic-mapping-tools.org/latest/gmt.html#bo-full)

  • d | nodata :: [Type => Str or Number] $Arg = [i|o]nodata$

    Control how user-coded missing data values are translated to official NaN values in GMT. (http://docs.generic-mapping-tools.org/latest/gmt.html#d-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • g | gap :: [Type => Str] $Arg = [a]x|y|d|X|Y|D|[col]z[+|-]gap[u]$

    Examine the spacing between consecutive data points in order to impose breaks in the line. (http://docs.generic-mapping-tools.org/latest/gmt.html#g-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • o | outcols | outcol :: [Type => Str] $Arg = cols[,…]$

    Select specific data columns for primary output, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#ocols-full)

  • s | skiprows | skip_NaN :: [Type => Str] $Arg = [cols][a|r]$

    Suppress output for records whose z-value equals NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#s-full)

  • w | wrap | cyclic :: [Type => Str or Number] $Arg = [[-]n]$

    Convert input records to a cyclical coordinate. (http://docs.generic-mapping-tools.org/latest/gmt.html#w-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.gmtendFunction
gmtend(show=false, verbose=nothing)

Ends a GMT session in modern mode (GMT >= 6) and optionaly shows the figure

GMT.gmtfigMethod
function gmtfig(name::String; fmt=nothing, opts="")

Set attributes for the current modern mode session figure. 'name' name of the new (or resumed) figure. It may contain an extension. 'fmt' figures graphics format (or formats, e.g. fmt="eps,pdf"). Not needed if 'name' has extension 'opts' Sets one or more comma-separated options (and possibly arguments) that can be passed to psconvert when preparing this figure.

GMT.gmtgravmag3dFunction
gmtgravmag3d(cmd0::String=""; kwargs...)

Compute the gravity/magnetic anomaly of a 3-D body by the method of Okabe.

Full option list at gmtgravmag3d

Parameters

  • C | density :: [Type => Str | GMTgrid]

    Sets body density in SI. Provide either a constant density or a grid with a variable one. (http://docs.generic-mapping-tools.org/latest/gmtgravmag3d.html#c)

  • F | track :: [Type => Str | Matrix | GMTdataset]

    Provide locations where the anomaly will be computed. Note this option is mutually exclusive with outgrid. (http://docs.generic-mapping-tools.org/latest/gmtgravmag3d.html#f)

  • G | save | outgrid | outfile :: [Type => Str]

    Output grid file name. Note that this is optional and to be used only when saving the result directly on disk. Otherwise, just use the G = gmtgravmag3d(....) form. (http://docs.generic-mapping-tools.org/latest/gmtgravmag3d.html#g)

  • H | mag_params :: [Type => Number]

    Sets parameters for computation of magnetic anomaly. Alternatively, provide a magnetic intensity grid. (http://docs.generic-mapping-tools.org/latest/gmtgravmag3d.html#h)

  • I | inc | increment | spacing :: [Type => Str] $Arg = xinc[unit][+e|n][/yinc[unit][+e|n]]]$

    x_inc [and optionally y_inc] is the grid spacing. Optionally, append an increment unit. (http://docs.generic-mapping-tools.org/latest/gmtgravmag3d.html#i)

  • L | z_obs | observation_level :: [Type => Number]

    Sets level of observation [Default = 0]. That is the height (z) at which anomalies are computed. (http://docs.generic-mapping-tools.org/latest/gmtgravmag3d.html#l)

  • M | body :: [Type => Str | Tuple]

    Create geometric bodies and compute their grav/mag effect. (http://docs.generic-mapping-tools.org/latest/gmtgravmag3d.html#m)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • S | radius :: [Type => Number]

    Set search radius in km (valid only in the two grids mode OR when thickness) [Default = 30 km]. (http://docs.generic-mapping-tools.org/latest/gmtgravmag3d.html#s)

  • Tv | index :: [Type => Str]

  • Tr | raw_triang :: [Type => Str]

  • Ts | stl :: [Type => Str]

    Gives names of a xyz and vertex (ndex="vert_file") files defining a close surface. (http://docs.generic-mapping-tools.org/latest/gmtgravmag3d.html#t)

  • Z | z_level | reference_level :: [Type => Number]

    Level of reference plane [Default = 0]. (http://docs.generic-mapping-tools.org/latest/gmtgravmag3d.html#z)

Example

	G = gmtgravmag3d(M=(shape=:prism, params=(1,1,1,5)), inc=1.0, region="-15/15/-15/15", mag_params="10/60/10/-10/40");
	imshow(G)
GMT.gmtinfoFunction
gmtinfo(cmd0::String="", arg1=nothing; kwargs...)

Reads files and finds the extreme values in each of the columns.

Full option list at gmtinfo

Parameters

  • A | ranges :: [Type => Str]

    Specify how the range should be reported. (http://docs.generic-mapping-tools.org/latest/gmtinfo.html#a)

  • C | numeric :: [Type => Bool]

    Report the min/max values per column in separate columns [Default uses <min/max> format]. (http://docs.generic-mapping-tools.org/latest/gmtinfo.html#c)

  • D | center :: [Type => Bool]

    Modifies results obtained by -I by shifting the region to better align with the center of the data. (http://docs.generic-mapping-tools.org/latest/gmtinfo.html#d)

  • E | get_record :: [Type => Str | []]

    Returns the record whose column col contains the minimum (l) or maximum (h) value. (http://docs.generic-mapping-tools.org/latest/gmtinfo.html#e)

  • F | counts :: [Type => Str | []]

    Returns the counts of various records depending on the appended mode. (http://docs.generic-mapping-tools.org/latest/gmtinfo.html#f)

  • I | inc | increment | spacing :: [Type => Str | Number | Tuple]

    Report the min/max of the first n columns to the nearest multiple of the provided increments and output results in the form -Rw/e/s/n (http://docs.generic-mapping-tools.org/latest/gmtinfo.html#i)

  • L | common_limits :: [Type => Bool]

    Determines common limits across tables or segments. (http://docs.generic-mapping-tools.org/latest/gmtinfo.html#l)

  • S | forerrorbars :: [Type => Str | []]

    Add extra space for error bars. Useful together with I option and when later plotting with plot E. (http://docs.generic-mapping-tools.org/latest/gmtinfo.html#s)

  • T | nearest_multiple :: [Type => Str | Number] $Arg = dz[+ccol]$

    Report the min/max of the first (0’th) column to the nearest multiple of dz and output this as the string -Tzmin/zmax/dz. (http://docs.generic-mapping-tools.org/latest/gmtinfo.html#t)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • write | |> :: [Type => Str] $Arg = fname$

    Save result to ASCII file instead of returning to a Julia variable. Give file name as argument. Use the bo option to save as a binary file.

  • append :: [Type => Str] $Arg = fname$

    Append result to an existing file named $fname$ instead of returning to a Julia variable. Use the bo option to save as a binary file.

  • bi | binary_in :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary format for primary input (secondary inputs are always ASCII). (http://docs.generic-mapping-tools.org/latest/gmt.html#bi-full)

  • di | nodata_in :: [Type => Str or Number] $Arg = nodata$

    Examine all input columns and if any item equals nodata we interpret this value as a missing data item and substitute the value NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#di-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • g | gap :: [Type => Str] $Arg = [a]x|y|d|X|Y|D|[col]z[+|-]gap[u]$

    Examine the spacing between consecutive data points in order to impose breaks in the line. (http://docs.generic-mapping-tools.org/latest/gmt.html#g-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • o | outcols | outcol :: [Type => Str] $Arg = cols[,…]$

    Select specific data columns for primary output, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#ocols-full)

  • r | reg | registration :: [Type => Bool or []]

    Force pixel node registration [Default is gridline registration]. (http://docs.generic-mapping-tools.org/latest//gmt.html#r-full)

  • w | wrap | cyclic :: [Type => Str or Number] $Arg = [[-]n]$

    Convert input records to a cyclical coordinate. (http://docs.generic-mapping-tools.org/latest/gmt.html#w-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.gmtmathMethod
gmtmath(cmd::String, args...)

Call gmtmath with all commands in a single string 'cmd'. This is not useful in itself as compared to call gmt("gmtmath ....") but it's very useful in 'movie' because it can generate shell scripts from the julai command

Full option list at grdmath

GMT.gmtreadMethod
gmtread(fname::String; kwargs...)

Read GMT object from file. The object is one of "grid" or "grd", "image" or "img", "data" or "table", "cmap" or "cpt" and "ps" (for postscript), and OGR formats (shp, kml, json). Use a type specificatin to force a certain reading path (e.g. grd=true to read grids) or take the chance of letting the data type be guessed via the file extension. Known extensions are:

  • Grids: .grd, .nc
  • Images: .jpg, .png, .tif, .tiff, .bmp, .webp
  • Datasets: .dat, .txt, .csv
  • Datasets: .shp, .kml, .json, .geojson, .gmt, .gpkg
  • CPT: .cpt
  • PostScript: .ps, .eps

Parameters

Specify data type (with type=true, e.g. img=true). Choose among:

  • grd | grid :: [Type => Any]

    Load a grid.

  • img | image :: [Type => Any]

    Load an image.

  • cpt | cmap :: [Type => Any]

    Load a GMT color palette.

  • data | dataset | table :: [Type => Any]

    Load a dataset (a table of numbers).

  • ogr :: [Type => Any]

    Load a dataset via GDAL OGR (a table of numbers). Many things can happen here.

  • ps :: [Type => Any]

    Load a PostScript file

  • gdal :: [Type => Any]

    Force reading the file via GDAL. Should only be used to read grids.

  • varname :: [Type => Str]

    When netCDF files have more than one 2D (or higher) variables use varname to pick the wished variable. e.g. varname=:slp to read the variable named 'slp'. This option defaults data type to 'grid'

  • layer | band :: [Type => Str, Number, Array]

When files are multiband or nc files with 3D or 4D arrays, we access them via these keywords. layer=4 reads the fourth layer (or band) of the file. But the file can be a grid or an image. If it is a grid, layer can be a scalar (to read 3D arrays) or an array of two elements (to read a 4D array).

If file is an image layer can be a 1 or a 1x3 array (to read a RGB image). Not that in this later case bands do not need to be contiguous. A band=[1,5,2]` composes an RGB out of those bands. See more at http://docs.generic-mapping-tools.org/latest//GMT_Docs.html#modifiers-for-coards-compliant-netcdf-files) but note that we use 1 based indexing here.

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • bi | binary_in :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary format for primary input (secondary inputs are always ASCII). (http://docs.generic-mapping-tools.org/latest/gmt.html#bi-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

Example: to read a nc called 'lixo.grd'

G = gmtread("lixo.grd");

to read a jpg image with the bands reversed (this example is currently broken in GMT5. Needs GMT6dev)

I = gmtread("image.jpg", band=[2,1,0]);
GMT.gmtselectFunction
gmtselect(cmd0::String="", arg1=nothing, kwargs...)

Select data table subsets based on multiple spatial criteria.

Full option list at gmtselect

Parameters

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • A | area :: [Type => Str | Number]

    Features with an area smaller than minarea in km^2 or of hierarchical level that is lower than minlevel or higher than max_level will not be plotted. (http://docs.generic-mapping-tools.org/latest/gmtselect.html#a)

  • C | dist2pt | dist :: [Type => Str | NamedTuple] Arg = pointfile+ddist[unit] | (pts=Array, dist=xx)

    Pass all records whose location is within dist of any of the points in the ASCII file pointfile. If dist is zero then the 3rd column of pointfile must have each point’s individual radius of influence. (http://docs.generic-mapping-tools.org/latest/gmtselect.html#c)

  • D | res | resolution :: [Type => Str] Arg = c|l|i|h|f

    Ignored unless N is set. Selects the resolution of the coastline data set to use ((f)ull, (h)igh, (i)ntermediate, (l)ow, or (c)rude). (http://docs.generic-mapping-tools.org/latest/gmtselect.html#d)

  • E | boundary :: [Type => Str | []] Arg = [fn]

    Specify how points exactly on a polygon boundary should be considered. (http://docs.generic-mapping-tools.org/latest/gmtselect.html#e)

  • F | polygon :: [Type => Str | GMTdaset | Mx2 array] Arg = polygonfile

    Pass all records whose location is within one of the closed polygons in the multiple-segment file $polygonfile$ or a GMTdataset type or a Mx2 array defining the polygon. (http://docs.generic-mapping-tools.org/latest/gmtselect.html#f)

  • G | gridmask :: [Type => Str | GRDgrid] Arg = gridmask

    Pass all locations that are inside the valid data area of the grid gridmask. Nodes that are outside are either NaN or zero. (http://docs.generic-mapping-tools.org/latest/gmtselect.html#g)

  • I | reverse :: [Type => Str | []] Arg = [cflrsz]

    Reverses the sense of the test for each of the criteria specified. (http://docs.generic-mapping-tools.org/latest/gmtselect.html#i)

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • L | dist2line :: [Type => Str | NamedTuple] Arg = linefile+ddist[unit][+p] | (pts=Array, dist=xx, ortho=_)

    Pass all records whose location is within dist of any of the line segments in the ASCII multiple-segment file linefile. (http://docs.generic-mapping-tools.org/latest/gmtselect.html#l)

  • N | mask :: [Type => Str | List] Arg = ocean/land/lake/island/pond or wet/dry

    Pass all records whose location is inside specified geographical features. (http://docs.generic-mapping-tools.org/latest/gmtselect.html#n)

  • Z | in_range :: [Type => Str | List] Arg = min[/max][+a][+ccol][+i]

    Pass all records whose 3rd column (z; col = 2) lies within the given range or is NaN. (http://docs.generic-mapping-tools.org/latest/gmtselect.html#z)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • write | |> :: [Type => Str] $Arg = fname$

    Save result to ASCII file instead of returning to a Julia variable. Give file name as argument. Use the bo option to save as a binary file.

  • append :: [Type => Str] $Arg = fname$

    Append result to an existing file named $fname$ instead of returning to a Julia variable. Use the bo option to save as a binary file.

  • b | binary :: [Type => Str]

    (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • d | nodata :: [Type => Str or Number] $Arg = [i|o]nodata$

    Control how user-coded missing data values are translated to official NaN values in GMT. (http://docs.generic-mapping-tools.org/latest/gmt.html#d-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • g | gap :: [Type => Str] $Arg = [a]x|y|d|X|Y|D|[col]z[+|-]gap[u]$

    Examine the spacing between consecutive data points in order to impose breaks in the line. (http://docs.generic-mapping-tools.org/latest/gmt.html#g-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • o | outcols | outcol :: [Type => Str] $Arg = cols[,…]$

    Select specific data columns for primary output, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#ocols-full)

  • w | wrap | cyclic :: [Type => Str or Number] $Arg = [[-]n]$

    Convert input records to a cyclical coordinate. (http://docs.generic-mapping-tools.org/latest/gmt.html#w-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.gmtsetFunction
gmtset(cmd0::String="", kwargs...)

Adjust individual GMT defaults settings in the current directory’s gmt.conf file.

Full option list at gmtset

Parameters

  • D | units :: [Type => Str | []]

    Modify the GMT defaults based on the system settings. Append u for US defaults or s for SI defaults. (http://docs.generic-mapping-tools.org/latest/gmtinfo.html#d)

  • G | defaultsfile :: [Type => Str]

    Name of specific gmt.conf file to read and modify. (http://docs.generic-mapping-tools.org/latest/gmtinfo.html#g)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • write | |> :: [Type => Str] $Arg = fname$

    Save result to ASCII file instead of returning to a Julia variable. Give file name as argument. Use the bo option to save as a binary file.

GMT.gmtsimplifyFunction
gmtsimplify(cmd0::String="", arg1=nothing, kwargs...)

Line reduction using the Douglas-Peucker algorithm.

Full option list at gmtsimplify

Parameters

  • T | tol | tolerance :: [Type => Str | Number] Arg = tolerance[unit]

    Specifies the maximum mismatch tolerance in the user units. If the data is not Cartesian then append the distance unit. (http://docs.generic-mapping-tools.org/latest/gmtsimplify.html#t)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • write | |> :: [Type => Str] $Arg = fname$

    Save result to ASCII file instead of returning to a Julia variable. Give file name as argument. Use the bo option to save as a binary file.

  • append :: [Type => Str] $Arg = fname$

    Append result to an existing file named $fname$ instead of returning to a Julia variable. Use the bo option to save as a binary file.

  • b | binary :: [Type => Str]

    (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • d | nodata :: [Type => Str or Number] $Arg = [i|o]nodata$

    Control how user-coded missing data values are translated to official NaN values in GMT. (http://docs.generic-mapping-tools.org/latest/gmt.html#d-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • g | gap :: [Type => Str] $Arg = [a]x|y|d|X|Y|D|[col]z[+|-]gap[u]$

    Examine the spacing between consecutive data points in order to impose breaks in the line. (http://docs.generic-mapping-tools.org/latest/gmt.html#g-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • o | outcols | outcol :: [Type => Str] $Arg = cols[,…]$

    Select specific data columns for primary output, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#ocols-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.gmtspatialFunction
gmtspatial(cmd0::String="", arg1=nothing, kwargs...)

Geospatial operations on points, lines and polygons.

Full option list at gmtspatial

Parameters

  • A | nn | nearest_neighbor :: [Type => Str] Arg = [amin_dist][unit]

    Perform spatial nearest neighbor (NN) analysis: Determine the nearest neighbor of each point and report the NN distances and the point IDs involved in each pair. (http://docs.generic-mapping-tools.org/latest/gmtspatial.html#a)

  • C | clip :: [Type => Bool]

    Clips polygons to the map region, including map boundary to the polygon as needed. The result is a closed polygon. (http://docs.generic-mapping-tools.org/latest/gmtspatial.html#c)

  • D | duplicates :: [Type => Str] Arg = [+ffile][+aamax][+ddmax][+c|Ccmax][+sfact]

    Check for duplicates among the input lines or polygons, or, if file is given via +f, check if the input features already exist among the features in file. (http://docs.generic-mapping-tools.org/latest/gmtspatial.html#d)

  • E | handedness :: [Type => Str] Arg = +|-

    Reset the handedness of all polygons to match the given + (counter-clockwise) or - (clockwise). Implies Q+ (http://docs.generic-mapping-tools.org/latest/gmtspatial.html#e)

  • F | force_polygons :: [Type => Str | []] Arg = [l]

    Force input data to become polygons on output, i.e., close them explicitly if not already closed. Optionally, append l to force line geometry. (http://docs.generic-mapping-tools.org/latest/gmtspatial.html#f)

  • I | intersections :: [Type => Str | []] Arg = [e|i]

    Determine the intersection locations between all pairs of polygons. (http://docs.generic-mapping-tools.org/latest/gmtspatial.html#i)

  • N | in_polyg :: [Type => Str] Arg = pfile[+a][+pstart][+r][+z]

    Determine if one (or all, with +a) points of each feature in the input data are inside any of the polygons given in the pfile. (http://docs.generic-mapping-tools.org/latest/gmtspatial.html#n)

  • Q | area or length :: [Type => Str] Arg = [[-|+]unit][+cmin[/max]][+h][+l][+p][+s[a|d]]

    Measure the area of all polygons or length of line segments. (http://docs.generic-mapping-tools.org/latest/gmtspatial.html#q)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • S | polygons :: [Type => Str] Arg = h|i|j|s|u

    Spatial processing of polygons. (http://docs.generic-mapping-tools.org/latest/gmtspatial.html#s)

  • T | truncate :: [Type => Str | []] Arg = [clippolygon]

    Truncate polygons against the specified polygon given, possibly resulting in open polygons. (http://docs.generic-mapping-tools.org/latest/gmtspatial.html#t)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • W | extend :: [Type => Str | Tuple] Arg = <dist>[<unit>][+f|l]

    Extend all segments with extra first and last points that are <dist> units away from the original end points in the directions implied by the line ends. (http://docs.generic-mapping-tools.org/latest/gmtspatial.html#w)

  • write | |> :: [Type => Str] $Arg = fname$

    Save result to ASCII file instead of returning to a Julia variable. Give file name as argument. Use the bo option to save as a binary file.

  • append :: [Type => Str] $Arg = fname$

    Append result to an existing file named $fname$ instead of returning to a Julia variable. Use the bo option to save as a binary file.

  • b | binary :: [Type => Str]

    (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • d | nodata :: [Type => Str or Number] $Arg = [i|o]nodata$

    Control how user-coded missing data values are translated to official NaN values in GMT. (http://docs.generic-mapping-tools.org/latest/gmt.html#d-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • g | gap :: [Type => Str] $Arg = [a]x|y|d|X|Y|D|[col]z[+|-]gap[u]$

    Examine the spacing between consecutive data points in order to impose breaks in the line. (http://docs.generic-mapping-tools.org/latest/gmt.html#g-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • o | outcols | outcol :: [Type => Str] $Arg = cols[,…]$

    Select specific data columns for primary output, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#ocols-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.gmtsplitFunction
gmtsplit(cmd0::String="", arg1=nothing; kwargs...)

Reads a series of (x,y[,z]) records [or optionally (x,y,z,d,h)] and splits this into separate lists of (x,y[,z]) series, such that each series has a nearly constant azimuth through the x,y plane.

Full option list at gmtsplit

Parameters

  • A | azim_tol :: [Type => Str | Array]

    Write out only those segments which are within +/- tolerance degrees of azimuth in heading, measured clockwise from North, [0 - 360]. (http://docs.generic-mapping-tools.org/latest/gmtsplit.html#a)

  • C | course_change :: [Type => Number]

    Terminate a segment when a course change exceeding course_change degrees of heading is detected. (http://docs.generic-mapping-tools.org/latest/gmtsplit.html#c)

  • D | min_dist | min_distance :: [Type => Number]

    Do not write a segment out unless it is at least minimum_distance units long. (http://docs.generic-mapping-tools.org/latest/gmtsplit.html#d)

  • F | filter :: [Type => Str | Array]

    Filter the z values and/or the x,y values, assuming these are functions of d coordinate. xyfilter and zfilter are filter widths in distance units. (http://docs.generic-mapping-tools.org/latest/gmtsplit.html#f)

  • Q | xyzdh :: [Type => Str]

    Specify your desired output using any combination of xyzdh, in any order. (http://docs.generic-mapping-tools.org/latest/gmtsplit.html#q)

  • S | dh | dist_head :: [Type => Bool]

    Both d and h are supplied. In this case, input contains x,y,z,d,h. [Default expects (x,y,z) input, and d,h are computed from delta x, delta y. (http://docs.generic-mapping-tools.org/latest/gmtsplit.html#s)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • write | |> :: [Type => Str] $Arg = fname$

    Save result to ASCII file instead of returning to a Julia variable. Give file name as argument. Use the bo option to save as a binary file.

  • append :: [Type => Str] $Arg = fname$

    Append result to an existing file named $fname$ instead of returning to a Julia variable. Use the bo option to save as a binary file.

  • bi | binary_in :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary format for primary input (secondary inputs are always ASCII). (http://docs.generic-mapping-tools.org/latest/gmt.html#bi-full)

  • bo | binary_out :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary output. (http://docs.generic-mapping-tools.org/latest/gmt.html#bo-full)

  • di | nodata_in :: [Type => Str or Number] $Arg = nodata$

    Examine all input columns and if any item equals nodata we interpret this value as a missing data item and substitute the value NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#di-full)

  • do | nodata_out :: [Type => Str or Number] $Arg = nodata$

    Examine all output columns and if any item equals NAN substitute it with the chosen missing data value. (http://docs.generic-mapping-tools.org/latest/gmt.html#do-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • g | gap :: [Type => Str] $Arg = [a]x|y|d|X|Y|D|[col]z[+|-]gap[u]$

    Examine the spacing between consecutive data points in order to impose breaks in the line. (http://docs.generic-mapping-tools.org/latest/gmt.html#g-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.gmtvectorFunction
gmtvector(cmd0::String="", arg1=nothing, kwargs...)

Time domain filtering of 1-D data tables.

Full option list at gmtvector

Parameters

  • A | single_vec :: [Type => Str] Arg = m[conf]|vector

    Specify a single, primary vector instead of reading tables. (http://docs.generic-mapping-tools.org/latest/gmtvector.html#a)

  • C | cartesian :: [Type => Str | []] Arg = [i|o]

    Select Cartesian coordinates on input and output. (http://docs.generic-mapping-tools.org/latest/gmtvector.html#c)

  • E | geod2geoc :: [Type => Bool]

    Convert input geographic coordinates from geodetic to geocentric and output geographic coordinates from geocentric to geodetic. (http://docs.generic-mapping-tools.org/latest/gmtvector.html#e)

  • N | normalize :: [Type => Bool]

    Normalize the resultant vectors prior to reporting the output. (http://docs.generic-mapping-tools.org/latest/gmtvector.html#n)

  • S | secondary_vec :: [Type => Str | List] Arg = [vector]

    Specify a single, secondary vector in the same format as the first vector. (http://docs.generic-mapping-tools.org/latest/gmtvector.html#s)

  • T | transform :: [Type => Str | List] Arg = a|d|D|paz|s|r[arg|R|x]

    Specify the vector transformation of interest. (http://docs.generic-mapping-tools.org/latest/gmtvector.html#t)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • write | |> :: [Type => Str] $Arg = fname$

    Save result to ASCII file instead of returning to a Julia variable. Give file name as argument. Use the bo option to save as a binary file.

  • append :: [Type => Str] $Arg = fname$

    Append result to an existing file named $fname$ instead of returning to a Julia variable. Use the bo option to save as a binary file.

  • b | binary :: [Type => Str]

    (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • d | nodata :: [Type => Str or Number] $Arg = [i|o]nodata$

    Control how user-coded missing data values are translated to official NaN values in GMT. (http://docs.generic-mapping-tools.org/latest/gmt.html#d-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • g | gap :: [Type => Str] $Arg = [a]x|y|d|X|Y|D|[col]z[+|-]gap[u]$

    Examine the spacing between consecutive data points in order to impose breaks in the line. (http://docs.generic-mapping-tools.org/latest/gmt.html#g-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • o | outcols | outcol :: [Type => Str] $Arg = cols[,…]$

    Select specific data columns for primary output, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#ocols-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.gmtwhichMethod
gmtwhich(cmd0::String; kwargs...)

Find full path to specified files

Full option list at gmtwhich

Parameters

  • A | with_permissions :: [Type => Bool]
Only consider files that the user has permission to read [Default consider all files found].
(http://docs.generic-mapping-tools.org/latest/gmtwhich.html#a)
  • C | confirm :: [Type => Bool]
Instead of reporting the paths, print the confirmation Y if the file is found and N if it is not.
(http://docs.generic-mapping-tools.org/latest/gmtwhich.html#c)
  • D | report_dir :: [Type => Bool]
Instead of reporting the paths, print the directories that contains the files.
(http://docs.generic-mapping-tools.org/latest/gmtwhich.html#d)
  • G | download :: [Type => Str | []] $Arg = [c|l|u]$
If a file argument is a downloadable file (either a full URL, a @file for downloading from
the GMT Site Cache, or @earth_relief_*.grd) we will try to download the file if it is not
found in your local data or cache dirs.
(http://docs.generic-mapping-tools.org/latest/gmtwhich.html#g)
  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

GMT.gmtwriteFunction
gmtwrite(fname::AbstractString, data; kwargs...)

Write a GMT object to file. The object is one of "grid" or "grd", "image" or "img", "dataset" or "table", "cmap" or "cpt" and "ps" (for postscript).

When saving grids we have a panoply of formats at our disposal.

Parameters

  • id :: [Type => Str]

    Use an $id$ code when not not saving a grid into a standard COARDS-compliant netCDF grid. This $id$ is made up of two characters like $ef$ to save in ESRI Arc/Info ASCII Grid Interchange format (ASCII float). See the full list of ids at http://docs.generic-mapping-tools.org/latest/grdconvert.html#format-identifier.

    (http://docs.generic-mapping-tools.org/latest/grdconvert.html#g)

  • scale | offset :: [Type => Number]

    You may optionally ask to scale the data and then offset them with the specified amounts. These modifiers are particularly practical when storing the data as integers, by first removing an offset and then scaling down the values.

  • nan | novalue | invalid | missing :: [Type => Number]

    Lets you supply a value that represents an invalid grid entry, i.e., ‘Not-a-Number’.

  • gdal :: [Type => Bool]

    Force the use of the GDAL library to write the grid (to be used only with grids). (http://docs.generic-mapping-tools.org/latest/GMT_Docs.html#grid-file-format-specifications)

  • driver :: [Type => Str]

    When saving in other than the netCDF format we must tell the GDAL library what is wished format. That is done by specifying the driver name used by GDAL itself (e.g., netCDF, GTiFF, etc...).

  • datatype :: [Type => Str] $Arg = u8|u16|i16|u32|i32|float32$

    When saving with GDAL we can specify the data type from u8|u16|i16|u32|i32|float32 where ‘i’ and ‘u’ denote signed and unsigned integers respectively.

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • bo | binary_out :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary output. (http://docs.generic-mapping-tools.org/latest/gmt.html#bo-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

Example: write the GMTgrid 'G' object into a nc file called 'lixo.grd'

gmtwrite("lixo.grd", G);
GMT.gravfftFunction
gravfft(cmd0::String="", arg1=nothing, arg2=nothing; kwargs...)

Spectral calculations of gravity, isostasy, admittance, and coherence for grids.

Full option list at gravfft

Parameters

  • D | density :: [Type => Str | GMTgrid]

    Sets body density in SI. Provide either a constant density or a grid with a variable one. (http://docs.generic-mapping-tools.org/latest/gravfft.html#c)

  • E | n_terms :: [Type => Number]

    Number of terms used in Parker expansion [Default = 3]. (http://docs.generic-mapping-tools.org/latest/gravfft.html#e)

  • F | geopotential :: [Type => Str | Tuple]

    Specify desired geopotential field: compute geoid rather than gravity (http://docs.generic-mapping-tools.org/latest/gravfft.html#h)

  • I | admittance :: [Type => Number]

    Use ingrid2 and ingrid1 (a grid with topography/bathymetry) to estimate admittance|coherence and return a GMTdataset. (http://docs.generic-mapping-tools.org/latest/gravfft.html#l)

  • N | inquire :: [Type => Str] $Arg = [a|f|m|r|s|nx/ny][+a|[+d|h|l][+e|n|m][+twidth][+v][+w[suffix]][+z[p]]$

    Choose or inquire about suitable grid dimensions for FFT and set optional parameters. Control the FFT dimension: (http://docs.generic-mapping-tools.org/latest/gravfft.html#n)

  • Q | flex_topo | flexural_topography :: [Type => Bool]

    Computes grid with the flexural topography. (http://docs.generic-mapping-tools.org/latest/gravfft.html#q)

  • S | subplate | subplate_load :: [Type => Bool]

    Computes predicted gravity or geoid grid due to a subplate load produced by the current bathymetry and the theoretical model. (http://docs.generic-mapping-tools.org/latest/gravfft.html#s)

  • T | topo_load :: [Type => Str]

    Compute the isostatic compensation from the topography load (input grid file) on an elastic plate of thickness te. (http://docs.generic-mapping-tools.org/latest/gravfft.html#t)

  • W | z_obs | observation_level :: [Type => Number]

    Set water depth (or observation height) relative to topography in meters [0]. Append k to indicate km. (http://docs.generic-mapping-tools.org/latest/gravfft.html#w)

  • Z | moho_depth :: [Type => Number]

    Moho [and swell] average compensation depths (in meters positive down). (http://docs.generic-mapping-tools.org/latest/gravfft.html#z)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

Example. Compute the gravity effect of the Gorringe bank.

    G = grdcut("@earth_relief_10m", region=(-12.5,-10,35.5,37.5));
	G2 = gravfft(G, density=1700, F=(faa=6,slab=4), f=:g);
	imshow(G2)
GMT.grd2cptFunction
grd2cpt(cmd0::String="", arg1=nothing, kwargs...)

Make linear or histogram-equalized color palette table from grid

Full option list at grd2cpt

Parameters

  • A | alpha | transparency :: [Type => Str]

    Sets a constant level of transparency (0-100) for all color slices. (http://docs.generic-mapping-tools.org/latest/grd2cpt.html#a)

  • C | color | colormap | cmap | colorscale :: [Type => Str] $Arg = [cpt |master[+izinc] |color1,color2[,*color3*,…]]$

    Give a CPT name or specify -Ccolor1,color2[,color3,...] to build a linear continuous CPT from those colors automatically. (http://docs.generic-mapping-tools.org/latest/grdimage.html#c)

  • D | bg | background :: [Type => Str | []] Arg = [i|o]

    Select the back- and foreground colors to match the colors for lowest and highest z-values in the output CPT. (http://docs.generic-mapping-tools.org/latest/grd2cpt.html#d)

  • E | nlevels :: [Type => Int | []] Arg = [nlevels]

    Create a linear color table by using the grid z-range as the new limits in the CPT. Alternatively, append nlevels and we will resample the color table into nlevels equidistant slices. (http://docs.generic-mapping-tools.org/latest/grd2cpt.html#e)

  • F | color_model :: [Type => Str | []] Arg = [R|r|h|c][+c]]

    Force output CPT to written with r/g/b codes, gray-scale values or color name. (http://docs.generic-mapping-tools.org/latest/grd2cpt.html#f)

  • G | truncate :: [Type => Str] Arg = zlo/zhi

    Truncate the incoming CPT so that the lowest and highest z-levels are to zlo and zhi. (http://docs.generic-mapping-tools.org/latest/grd2cpt.html#g)

  • I | inverse | reverse :: [Type => Str] Arg = [c][z]

    Reverse the sense of color progression in the master CPT. (http://docs.generic-mapping-tools.org/latest/grd2cpt.html#i)

  • L | range :: [Type => Str] Arg = minlimit/maxlimit

    Limit range of CPT to minlimit/maxlimit, and don’t count data outside this range when estimating CDF(Z). Default uses min and max of data.

  • M | overrule_bg :: [Type => Bool]

    Overrule background, foreground, and NaN colors specified in the master CPT with the values of the parameters COLORBACKGROUND, COLORFOREGROUND, and COLOR_NAN. (http://docs.generic-mapping-tools.org/latest/grd2cpt.html#m)

  • N | no_bg | nobg :: [Type => Bool]

    Do not write out the background, foreground, and NaN-color fields. (http://docs.generic-mapping-tools.org/latest/grd2cpt.html#n)

  • Q | log :: [Type => Bool]

    Selects a logarithmic interpolation scheme [Default is linear]. (http://docs.generic-mapping-tools.org/latest/grd2cpt.html#q)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • S | symetric :: [Type => Str] Arg = h|l|m|u

    Force the color table to be symmetric about zero (from -R to +R). (http://docs.generic-mapping-tools.org/latest/grd2cpt.html#s)

  • T | range :: [Type => Str] Arg = (min,max,inc) or = "n"

    Set steps in CPT. Calculate entries in CPT from zstart to zstop in steps of (zinc). Default chooses arbitrary values by a crazy scheme based on equidistant values for a Gaussian CDF. (http://docs.generic-mapping-tools.org/latest/grd2cpt.html#t)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • W | wrap | categorical :: [Type => Bool | Str | []] Arg = [w]

    Do not interpolate the input color table but pick the output colors starting at the beginning of the color table, until colors for all intervals are assigned. (http://docs.generic-mapping-tools.org/latest/grd2cpt.html#w)

  • Z | continuous :: [Type => Bool]

    Creates a continuous CPT [Default is discontinuous, i.e., constant colors for each interval]. (http://docs.generic-mapping-tools.org/latest/grd2cpt.html#z)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • write | |> :: [Type => Str] $Arg = fname$

    Save result to ASCII file instead of returning to a Julia variable. Give file name as argument. Use the bo option to save as a binary file.

GMT.grd2kmlFunction
grd2kml(cmd0::String="", arg1=nothing, kwargs...)

Reads a 2-D grid file and makes a quadtree of PNG images and KML wrappers for Google Earth using the selected tile size [256x256 pixels].

Full option list at grd2kml

Parameters

  • C | color | colormap | cmap | colorscale :: [Type => Str] $Arg = [cpt |master[+izinc] |color1,color2[,*color3*,…]]$

    Give a CPT name or specify -Ccolor1,color2[,color3,...] to build a linear continuous CPT from those colors automatically. (http://docs.generic-mapping-tools.org/latest/grdimage.html#c)

  • E | url :: [Type => Str] Arg = url

    Instead of hosting the files locally, prepend a site URL. The top-level prefix.kml file will then use this URL to find the other files it references.`` (http://docs.generic-mapping-tools.org/latest/grd2kml.html#e)

  • F | filter :: [Type => Str]

    Specifies the filter to use for the downsampling of the grid for more distant viewing. Choose among boxcar, cosine arch, gaussian, or median [Gaussian]. (http://docs.generic-mapping-tools.org/latest/grd2kml.html#e)

  • H | sub_pixel :: [Type => Int] Arg = factor

    Improve the quality of rasterization by passing the sub-pixel smoothing factor to psconvert. (http://docs.generic-mapping-tools.org/latest/grd2kml.html#h)

  • I | shade | shading | intensity :: [Type => Str | GMTgrid]

    Gives the name of a grid file or GMTgrid with intensities in the (-1,+1) range, or a grdgradient shading flags. (http://docs.generic-mapping-tools.org/latest/grd2kml.html#i)

  • L | tile_size :: [Type => Number] Arg = tilesize

    Sets the fixed size of the image building blocks. Must be an integer that is radix 2. Typical values are 256 or 512 [256]. (http://docs.generic-mapping-tools.org/latest/grd2kml.html#l)

  • N | prefix [Type => Str] Arg = prefix

    Sets a unique name prefixed used for the top-level KML filename and the directory where all referenced KML files and PNG images will be written [GMT_Quadtree]. (http://docs.generic-mapping-tools.org/latest/grd2kml.html#n)

  • Q | nan_t | nan_alpha :: [Type => Bool]

    Make grid nodes with z = NaN transparent, using the color-masking feature in PostScript Level 3. (http://docs.generic-mapping-tools.org/latest/grd2kml.html#q)

  • T | title :: [Type => Str] Arg = title

    Sets the title of the top-level document (i.e., its description). (http://docs.generic-mapping-tools.org/latest/grd2kml.html#t)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • write | |> :: [Type => Str] $Arg = fname$

    Save result to ASCII file instead of returning to a Julia variable. Give file name as argument. Use the bo option to save as a binary file.

  • append :: [Type => Str] $Arg = fname$

    Append result to an existing file named $fname$ instead of returning to a Julia variable. Use the bo option to save as a binary file.

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

GMT.grd2xyzFunction
grd2xyz(cmd0::String="", arg1=nothing, kwargs...)

Reads one 2-D grid and returns xyz-triplets.

Full option list at grd2xyz

Parameters

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • C | row_col :: [Type => Bool]

    Replace the x- and y-coordinates on output with the corresponding column and row numbers. (http://docs.generic-mapping-tools.org/latest/grd2xyz.html#c)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • W | weight :: [Type => Str] Arg = [a|weight]

    Write out x,y,z,w, where w is the supplied weight (or 1 if not supplied) [Default writes x,y,z only]. (http://docs.generic-mapping-tools.org/latest/grd2xyz.html#w)

  • Z | flags :: [Type => Str]

    Write a 1-column table. Output will be organized according to the specified ordering convention contained in $flags$. (http://docs.generic-mapping-tools.org/latest/grd2xyz.html#z)

  • write | |> :: [Type => Str] $Arg = fname$

    Save result to ASCII file instead of returning to a Julia variable. Give file name as argument. Use the bo option to save as a binary file.

  • append :: [Type => Str] $Arg = fname$

    Append result to an existing file named $fname$ instead of returning to a Julia variable. Use the bo option to save as a binary file.

  • bo | binary_out :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary output. (http://docs.generic-mapping-tools.org/latest/gmt.html#bo-full)

  • d | nodata :: [Type => Str or Number] $Arg = [i|o]nodata$

    Control how user-coded missing data values are translated to official NaN values in GMT. (http://docs.generic-mapping-tools.org/latest/gmt.html#d-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • o | outcols | outcol :: [Type => Str] $Arg = cols[,…]$

    Select specific data columns for primary output, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#ocols-full)

  • s | skiprows | skip_NaN :: [Type => Str] $Arg = [cols][a|r]$

    Suppress output for records whose z-value equals NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#s-full)

GMT.grdblendFunction
grdblend(cmd0::String="", arg1=nothing, arg2=nothing, kwargs...)

Reads a listing of grid files and blend parameters, or up to 2 GTMgrid types, and creates a grid by blending the other grids using cosine-taper weights.

Full option list at grdblend

Parameters

  • I | inc | increment | spacing :: [Type => Str] $Arg = xinc[unit][+e|n][/yinc[unit][+e|n]]]$

    x_inc [and optionally y_inc] is the grid spacing. Optionally, append an increment unit. (http://docs.generic-mapping-tools.org/latest/grdblend.html#i)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • G | save | outgrid | outfile :: [Type => Str]

    Output grid file name. Note that this is optional and to be used only when saving the result directly on disk. Otherwise, just use the G = grdblend(....) form. (http://docs.generic-mapping-tools.org/latest/grdblend.html#g)

  • C | clobber :: [Type => Str | []] $Arg = f|l|o|u[±]$

    Clobber mode: Instead of blending, simply pick the value of one of the grids that covers a node. (http://docs.generic-mapping-tools.org/latest/grdproject.html#c)

  • N | nodata :: [Type => Str | Number]

    No data. Set nodes with no input grid to this value [Default is NaN]. (http://docs.generic-mapping-tools.org/latest/grdblend.html#n)

  • Q | headless :: [Type => Bool]

    Create plain header-less grid file (for use with external tools). Requires that the output grid file is a native format (i.e., not netCDF). DO NOT USE WITH G. (http://docs.generic-mapping-tools.org/latest/grdblend.html#q)

  • W | no_blend :: [Type => Str | []]

    Do not blend, just output the weights used for each node [Default makes the blend]. Append $z$ to write the weight*z sum instead. (http://docs.generic-mapping-tools.org/latest/grdblend.html#w)

  • Z | scale :: [Type => Number]

    Scale output values by scale before writing to file. (http://docs.generic-mapping-tools.org/latest/grdblend.html#z)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • n | interp | interpolation :: [Type => Str] $Arg = [b|c|l|n][+a][+bBC][+c][+tthreshold]$

    Select grid interpolation mode by adding b for B-spline smoothing, c for bicubic interpolation, l for bilinear interpolation, or n for nearest-neighbor value. (http://docs.generic-mapping-tools.org/latest/gmt.html#n-full)

  • r | reg | registration :: [Type => Bool or []]

    Force pixel node registration [Default is gridline registration]. (http://docs.generic-mapping-tools.org/latest//gmt.html#r-full)

GMT.grdclipFunction
grdclip(cmd0::String="", arg1=nothing, kwargs...)

Clip the range of grid values. will set values < low to below and/or values > high to above. You can also specify one or more intervals where all values should be set to $between$, or replace individual values.

Full option list at grdclip

Parameters

  • cmd0 :: [Type => Str]

    The input file name. Do not use this when the grid (a GMTgrid type) is passed via the $arg1$ argument.

  • G | save | outgrid | outfile :: [Type => Str]

    Output grid file name. Note that this is optional and to be used only when saving the result directly on disk. Otherwise, just use the G = grdclip(....) form. (http://docs.generic-mapping-tools.org/latest/grdclip.html#g)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • above | high :: [Type => Array | Str]

    Two elements array with $high$ and $above$ or a string with "high/above". It sets all data[i] > $high$ to $above$.

  • below | low :: [Type => Array | Str]

    Two elements array with $low$ and $below$ or a string with "low/below". It sets all data[i] < $low$ to $below$.

  • between :: [Type => Array | Str]

    Three elements array with $low, high$ and $between$ or a string with "low/high/between". It sets all data[i] >= $low$ and <= $high$ to $between$.

  • old | new :: [Type => Array | Str]

    Two elements array with $old$ and $new$ or a string with "old/new". It sets all data[i] == $old$ to $new$.

  • S :: [Type => Str]

    Condense all replacement options above in a single string. (http://docs.generic-mapping-tools.org/latest/grdclip.html#s)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • Examples:

      G=gmt("grdmath", "-R0/10/0/10 -I1 X");
      G2=grdclip(G, above=[5 6], low=[2 2], between="3/4/3.5")

    or (note the use of -S for second on options because we can't repeat a kwarg name)

      G2=grdclip(G, S="a5/6 -Sb2/2 -Si3/4/3.5")
GMT.grdcontourFunction
grdcontour(cmd0::String="", arg1=nothing; kwargs...)

Reads a 2-D grid file or a GMTgrid type and produces a contour map by tracing each contour through the grid.

Full option list at grdcontour

Parameters

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • A | annot :: [Type => Str or Number] $Arg = [-|[+]annot_int][labelinfo]$

    annot_int is annotation interval in data units; it is ignored if contour levels are given in a file. (http://docs.generic-mapping-tools.org/latest/grdcontour.html#a)

  • B | frame | axis | xaxis yaxis:: [Type => Str]

    Set map boundary frame and axes attributes. (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • C | cont | contour | contours | levels :: [Type => Str | Number | GMTcpt] $Arg = [+]cont_int$

    Contours to be drawn may be specified in one of three possible ways. (http://docs.generic-mapping-tools.org/latest/grdcontour.html#c)

  • D | dump :: [Type => Str]

    Dump contours as data line segments; no plotting takes place. (http://docs.generic-mapping-tools.org/latest/grdcontour.html#d)

  • F | force :: [Type => Str | []]

    Force dumped contours to be oriented so that higher z-values are to the left (-Fl [Default]) or right. (http://docs.generic-mapping-tools.org/latest/grdcontour.html#f)

  • G | labels :: [Type => Str]

    Controls the placement of labels along the quoted lines. (http://docs.generic-mapping-tools.org/latest/grdcontour.html#g)

  • Jz | zscale | zsize :: [Type => String]

  • L | range :: [Type => Str]

    Limit range: Do not draw contours for data values below low or above high. (http://docs.generic-mapping-tools.org/latest/grdcontour.html#l)

  • N | fill | colorize :: [Type => Bool]

    Fill the area between contours using the discrete color table given by cpt. (http://docs.generic-mapping-tools.org/latest/grdcontour.html#n)

  • P | portrait :: [Type => Bool or []]

    Tell GMT to NOT draw in portrait mode (that is, make a Landscape plot)

  • Q | cut :: [Type => Str | Number]

    Do not draw contours with less than cut number of points. (http://docs.generic-mapping-tools.org/latest/grdcontour.html#q)

  • S | smooth :: [Type => Number]

    Used to resample the contour lines at roughly every (gridbox_size/smoothfactor) interval. (http://docs.generic-mapping-tools.org/latest/grdcontour.html#s)

  • T | ticks :: [Type => Str]

    Draw tick marks pointing in the downward direction every gap along the innermost closed contours. (http://docs.generic-mapping-tools.org/latest/grdcontour.html#t)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • U | time_stamp | timestamp :: [Type => Str or Bool or []] $Arg = [[just]/dx/dy/][c|label]$

    Draw GMT time stamp logo on plot. (http://docs.generic-mapping-tools.org/latest/gmt.html#u-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • W | pen :: [Type => Str | Number]

    Sets the attributes for the particular line. (http://docs.generic-mapping-tools.org/latest/grdcontour.html#w)

  • X | x_offset | xshift :: [Type => Str] $Arg = [a|c|f|r][x-shift[u]]$

  • Y | y_offset | yshift :: [Type => Str] $Arg = [a|c|f|r][y-shift[u]]$

    Shift plot origin relative to the current origin by (x-shift,y-shift) and optionally append the length unit (c, i, or p). (http://docs.generic-mapping-tools.org/latest/gmt.html#xy-full)

  • Z | scale :: [Type => Str]

    Use to subtract shift from the data and multiply the results by factor before contouring starts. (http://docs.generic-mapping-tools.org/latest/grdcontour.html#z)

  • bo | binary_out :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary output. (http://docs.generic-mapping-tools.org/latest/gmt.html#bo-full)

  • do | nodata_out :: [Type => Str or Number] $Arg = nodata$

    Examine all output columns and if any item equals NAN substitute it with the chosen missing data value. (http://docs.generic-mapping-tools.org/latest/gmt.html#do-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • p | view | perspective :: [Type => Str or List] $Arg = [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]$

    Selects perspective view and sets the azimuth and elevation of the viewpoint [180/90]. (http://docs.generic-mapping-tools.org/latest/gmt.html#perspective-full)

  • t | alpha | transparency :: [Type => Str] $Arg = transp$

    Set PDF transparency level for an overlay, in (0-100] percent range. [Default is 0, i.e., opaque]. (http://docs.generic-mapping-tools.org/latest/gmt.html#t-full)

  • savefig | figname | name :: [Type => Str]

    Save the figure with the figname=name.ext where ext chooses the figure format (e.g. figname="name.png")

GMT.grdcutFunction
grdcut(cmd0::String="", arg1=[], kwargs...)

Produce a new outgrid which is a subregion of ingrid. The subregion is specified with $limits$ (the -R); the specified range must not exceed the range of ingrid (but see $extend$).

Full option list at grdcut

Parameters

  • F | clip | cutline :: [Type => Str | GMTdaset | Mx2 array | NamedTuple] Arg = array|fname[+c] | (polygon=Array|Str, crop2cutline=Bool, invert=Bool)

    Specify a closed polygon (either a file or a dataset). All grid nodes outside the polygon will be set to NaN (>= GMT6.2). (http://docs.generic-mapping-tools.org/latest/grdcut.html#f)

  • G | save | outgrid | outfile :: [Type => Str]

    Output grid file name. Note that this is optional and to be used only when saving the result directly on disk. Otherwise, just use the G = grdcut(....) form. (http://docs.generic-mapping-tools.org/latest/grdcut.html#g)

  • img | usegdal | gdal :: [Type => Any]

    Force the cut operation to be done by GDAL. Works for images where GMT fails or even crash.

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • N | extend :: [Type => Str or []]

    Allow grid to be extended if new region exceeds existing boundaries. Append nodata value to initialize nodes outside current region [Default is NaN]. (http://docs.generic-mapping-tools.org/latest/grdcut.html#n)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • S | circ_subregion :: [Type => Str] $Arg = [n]lon/lat/radius[unit]$

    Specify an origin and radius; append a distance unit and we determine the corresponding rectangular region so that all grid nodes on or inside the circle are contained in the subset. (http://docs.generic-mapping-tools.org/latest/grdcut.html#s)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • Z | z_subregion :: [Type => Str] $Arg = [n|N |r][min/max]$

    Determine a new rectangular region so that all nodes outside this region are also outside the given z-range. (http://docs.generic-mapping-tools.org/latest/grdcut.html#z)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

GMT.grdeditFunction
grdedit(cmd0::String="", arg1=nothing, kwargs...)

Reads the header information in a binary 2-D grid file and replaces the information with values provided on the command line.

If single input is a G GMTgrid object, it will update the z_min|max values of the G.range member

Full option list at grdedit

Parameters

  • A | adjust :: [Type => Bool]

    If necessary, adjust the file’s xinc, yinc to be compatible with its domain. (http://docs.generic-mapping-tools.org/latest/grdedit.html#a)

  • C | adjust :: [Type => Bool]

    Clear the command history from the grid header. (http://docs.generic-mapping-tools.org/latest/grdedit.html#c)

  • D | header :: [Type => Str] $Arg = [+xxname][+yyname][+zzname][+sscale][+ooffset][+ninvalid][+ttitle][+rremark$

    Change these header parameters. (http://docs.generic-mapping-tools.org/latest/grdedit.html#d)

  • E | header :: [Type => Str] $Arg = [a|h|l|r|t|v]$

    Transform the grid in one of six ways and (for l|r|t) interchange the x and y information (http://docs.generic-mapping-tools.org/latest/grdedit.html#e)

  • G | save | outgrid | outfile :: [Type => Str]

    Output grid file name. Note that this is optional and to be used only when saving the result directly on disk. Otherwise, just use the G = grdedit(....) form. (http://docs.generic-mapping-tools.org/latest/grdedit.html#g)

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • N | replace :: [Type => Str | Mx3 array] $Arg = replace=fname | replace=Array$

    Read the ASCII (or binary) file table and replace the corresponding nodal values in the grid with these x,y,z values. Alternatively, provide a Mx3 matrix with values to be changed. (http://docs.generic-mapping-tools.org/latest/grdedit.html#n)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • S | wrap :: [Type => Bool]

    For global, geographical grids only. Grid values will be shifted longitudinally according to the new borders given in $limits$ (R option). (http://docs.generic-mapping-tools.org/latest/grdedit.html#s)

  • T | toggle :: [Type => Bool]

    Make necessary changes in the header to convert a gridline-registered grid to a pixel-registered grid, or vice-versa. (http://docs.generic-mapping-tools.org/latest/grdedit.html#t)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • bi | binary_in :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary format for primary input (secondary inputs are always ASCII). (http://docs.generic-mapping-tools.org/latest/gmt.html#bi-full)

  • di | nodata_in :: [Type => Str or Number] $Arg = nodata$

    Examine all input columns and if any item equals nodata we interpret this value as a missing data item and substitute the value NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#di-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • w | wrap | cyclic :: [Type => Str or Number] $Arg = [[-]n]$

    Convert input records to a cyclical coordinate. (http://docs.generic-mapping-tools.org/latest/gmt.html#w-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.grdfftFunction
grdfft(cmd0::String="", arg1=nothing, [arg2=nothing,] kwargs...)

Take the 2-D forward Fast Fourier Transform and perform one or more mathematical operations in the frequency domain before transforming back to the space domain.

Full option list at grdfft

Parameters

  • A | azim :: [Type => Number] $Arg = azim$

    Take the directional derivative in the azimuth direction measured in degrees CW from north. (http://docs.generic-mapping-tools.org/latest/grdfft.html#a)

  • C | upward :: [Type => Number] $Arg = zlevel$

    Upward (for zlevel > 0) or downward (for zlevel < 0) continue the field zlevel meters. (http://docs.generic-mapping-tools.org/latest/grdfft.html#c)

  • D | dfdz :: [Type => Str or Number] $Arg = [scale|g]$

    Differentiate the field, i.e., take d(field)/dz. This is equivalent to multiplying by kr in the frequency domain (kr is radial wave number). (http://docs.generic-mapping-tools.org/latest/grdfft.html#d)

  • E | radial_power :: [Type => Str] $Arg = [r|x|y][+w[k]][+n]$

    Estimate power spectrum in the radial direction [r]. Place x or y immediately after E to compute the spectrum in the x or y direction instead. (http://docs.generic-mapping-tools.org/latest/grdfft.html#e)

  • F | filter :: [Type => Str or List– $Arg = [r|x|y]params$

    Filter the data. Place x or y immediately after -F to filter x or y direction only; default is isotropic [r]. Choose between a cosine-tapered band-pass, a Gaussian band-pass filter, or a Butterworth band-pass filter. (http://docs.generic-mapping-tools.org/latest/grdfft.html#f)

  • G | save | outgrid | outfile :: [Type => Str]

    Output grid file name (or table if radial_power is used). Note that this is optional and to be used only when saving the result directly on disk. Otherwise, just use the G = grdfft(....) form. (http://docs.generic-mapping-tools.org/latest/grdfft.html#g)

  • I | integrate :: [Type => Str or Number] $Arg = [scale|g]$

    Integrate the field, i.e., compute integraloverz (field * dz). This is equivalent to divide by kr in the frequency domain (kr is radial wave number). (http://docs.generic-mapping-tools.org/latest/grdfft.html#i)

  • N | inquire :: [Type => Str] $Arg = [a|f|m|r|s|nx/ny][+a|[+d|h|l][+e|n|m][+twidth][+v][+w[suffix]][+z[p]]$

    Choose or inquire about suitable grid dimensions for FFT and set optional parameters. Control the FFT dimension: (http://docs.generic-mapping-tools.org/latest/grdfft.html#n)

  • S | scale :: [Type => Number] $Arg = scale$

    Multiply each element by scale in the space domain (after the frequency domain operations). (http://docs.generic-mapping-tools.org/latest/grdfft.html#s)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

GMT.grdfillFunction
grdfill(cmd0::String="", arg1=nothing, kwargs...)

Reads a grid that presumably has unfilled holes that the user wants to fill in some fashion. Holes are identified by NaN values but this criteria can be changed.

Full option list at grdfill

Parameters

  • A | algo :: [Type => Str] $Arg = mode[arg]$

    Specify the hole-filling algorithm to use. Choose from c for constant fill and append the constant value, n for nearest neighbor (and optionally append a search radius in pixels). (http://docs.generic-mapping-tools.org/latest/grdfill.html#a)

  • G | save | outgrid | outfile :: [Type => Str]

    Output grid file name. Note that this is optional and to be used only when saving the result directly on disk. Otherwise, just use the G = grdfill(....) form. (http://docs.generic-mapping-tools.org/latest/grdfill.html#g)

  • L | list :: [Type => Str] $Arg = [p]$

    Just list the rectangular subregions west east south north of each hole. No grid fill takes place and outgrid is ignored. Optionally, append p to instead write closed polygons for all subregions.

  • N | nodata :: [Type => Str] $Arg = nodata$

    Sets the node value that identifies a point as a member of a hole [Default is NaN]. (http://docs.generic-mapping-tools.org/latest/grdfill.html#n)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

GMT.grdfilterFunction
grdfilter(cmd0::String="", arg1=nothing, kwargs...)

Filter a grid file in the time domain using one of the selected convolution or non-convolution isotropic or rectangular filters and compute distances using Cartesian or Spherical geometries.

Full option list at grdfilter

Parameters

  • F | filter :: [Type => Str]

    Sets the filter type. (http://docs.generic-mapping-tools.org/latest/grdfilter.html#f)

  • D | distflag | distance :: [Type => Number]

    Distance flag tells how grid (x,y) relates to filter width. (http://docs.generic-mapping-tools.org/latest/grdfilter.html#d)

  • G | save | outgrid | outfile :: [Type => Str]

    Output grid file name. Note that this is optional and to be used only when saving the result directly on disk. Otherwise, just use the G = grdfilter(....) form. (http://docs.generic-mapping-tools.org/latest/grdfilter.html#g)

  • I | inc | increment | spacing :: [Type => Str] $Arg = xinc[unit][+e|n][/yinc[unit][+e|n]]]$

    x_inc [and optionally y_inc] is the grid spacing. Optionally, append an increment unit. (http://docs.generic-mapping-tools.org/latest/grdfilter.html#i)

  • N | nans :: [Type => Str]

    Determine how NaN-values in the input grid affects the filtered output. Values are i|p|r (http://docs.generic-mapping-tools.org/latest/grdfilter.html#n)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • T | toggle :: [Type => Bool]

    Toggle the node registration for the output grid so as to become the opposite of the input grid (http://docs.generic-mapping-tools.org/latest/grdfilter.html#t)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

GMT.grdgradientFunction
grdgradient(cmd0::String="", arg1=nothing, kwargs...)

Compute the directional derivative in a given direction, or to find the direction [and the magnitude] of the vector gradient of the data.

Full option list at grdgradient

Parameters

  • A | azim :: [Type => Str | Number] $Arg = azim[/azim2]$

    Azimuthal direction for a directional derivative. (http://docs.generic-mapping-tools.org/latest/grdgradient.html#a)

  • D | find_dir :: [Type => Str] $Arg = [a][c][o][n]$

    Find the direction of the positive (up-slope) gradient of the data. (http://docs.generic-mapping-tools.org/latest/grdgradient.html#d)

  • G | save | write | outgrid | outfile :: [Type => Str]

    Output grid file name. Note that this is optional and to be used only when saving the result directly on disk. Otherwise, just use the G = grdgradient(....) form. (http://docs.generic-mapping-tools.org/latest/grdgradient.html#g)

  • E | lambert :: [Type => Str] $Arg = [m|s|p]azim/elev[+aambient][+ddiffuse][+pspecular][+sshine]$

    Compute Lambertian radiance appropriate to use with grdimage and grdview. (http://docs.generic-mapping-tools.org/latest/grdgradient.html#e)

  • N | norm | normalize :: [Type => Str] $Arg = [e|t][amp][+ssigma][+ooffset]$

    Normalization. [Default is no normalization.] The actual gradients g are offset and scaled to produce normalized gradients. (http://docs.generic-mapping-tools.org/latest/grdgradient.html#n)

  • Q | save_stats :: [Type => Str] $Arg = c|r|R$

    Controls how normalization via N is carried out. (http://docs.generic-mapping-tools.org/latest/grdgradient.html#q)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • S | slopegrid :: [Type => Str]

    Name of output grid file with scalar magnitudes of gradient vectors. Requires D but makes G optional. (http://docs.generic-mapping-tools.org/latest/grdgradient.html#s)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

GMT.grdgravmag3dFunction
grdgravmag3d(cmd0::String="", arg1=nothing, arg2=nothing; kwargs...)

Compute the gravity/magnetic anomaly of the volume contained between a surface provided by one grid and a plane, or between a top and a bottom surface provided by two grids.

Full option list at grdgravmag3d

Parameters

  • C | density :: [Type => Str | GMTgrid]

    Sets body density in SI. Provide either a constant density or a grid with a variable one. (http://docs.generic-mapping-tools.org/latest/grdgravmag3d.html#c)

  • F | track :: [Type => Str | Matrix | GMTdataset]

    Provide locations where the anomaly will be computed. Note this option is mutually exclusive with outgrid. (http://docs.generic-mapping-tools.org/latest/grdgravmag3d.html#f)

  • G | save | outgrid | outfile :: [Type => Str]

    Output grid file name. Note that this is optional and to be used only when saving the result directly on disk. Otherwise, just use the G = grdgravmag3d(....) form. (http://docs.generic-mapping-tools.org/latest/grdgravmag3d.html#g)

  • E | thickness :: [Type => Number]

    Provide the layer thickness in m [Default = 500 m]. (http://docs.generic-mapping-tools.org/latest/grdgravmag3d.html#e)

  • H | mag_params :: [Type => Number]

    Sets parameters for computation of magnetic anomaly. Alternatively, provide a magnetic intensity grid. (http://docs.generic-mapping-tools.org/latest/grdgravmag3d.html#h)

  • I | inc | increment | spacing :: [Type => Str] $Arg = xinc[unit][+e|n][/yinc[unit][+e|n]]]$

    x_inc [and optionally y_inc] is the grid spacing. Optionally, append an increment unit. (http://docs.generic-mapping-tools.org/latest/grdgravmag3d.html#i)

  • L | z_obs | observation_level :: [Type => Number]

    Sets level of observation [Default = 0]. That is the height (z) at which anomalies are computed. (http://docs.generic-mapping-tools.org/latest/grdgravmag3d.html#l)

  • Q | pad :: [Type => Number]

    Extend the domain of computation with respect to output region. (http://docs.generic-mapping-tools.org/latest/grdgravmag3d.html#q)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • S | radius :: [Type => Number]

    Set search radius in km (valid only in the two grids mode OR when thickness) [Default = 30 km]. (http://docs.generic-mapping-tools.org/latest/grdgravmag3d.html#s)

  • Z | z_level | reference_level :: [Type => Number]

    Level of reference plane [Default = 0]. (http://docs.generic-mapping-tools.org/latest/grdgravmag3d.html#z)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • x | cores | n_threads :: [Type => Str or Number] $Arg = [[-]n]$

    Limit the number of cores to be used in any OpenMP-enabled multi-threaded algorithms. (http://docs.generic-mapping-tools.org/latest/gmt.html#x-full)

Example. Compute the gravity effect of the Gorringe bank.

	G = grdgravmag3d("@earth_relief_10m", region=(-12.5,-10,35.5,37.5), density=2700, inc=0.05, pad=0.5, z_level=:bottom, f=:g);
	imshow(G)
GMT.grdhisteqFunction
grdhisteq(cmd0::String="", arg1=nothing, kwargs...)

Find the data values which divide a given grid file into patches of equal area. One common use of grdhisteq is in a kind of histogram equalization of an image.

Full option list at grdhisteq

Parameters

  • D | dump :: [Type => Str or []]

    Dump level information to file, or standard output if no file is provided. (http://docs.generic-mapping-tools.org/latest/grdhisteq.html#d)

  • G | save | outgrid | outfile :: [Type => Str]

    Output grid file name. Note that this is optional and to be used only when saving the result directly on disk. Otherwise, just use the G = grdhisteq(....) form. (http://docs.generic-mapping-tools.org/latest/grdhisteq.html#g)

  • N | gaussian :: [Type => Number or []]

    Gaussian output. (http://docs.generic-mapping-tools.org/latest/grdhisteq.html#n)

  • Q | quadratic :: [Type => Bool]

    Quadratic output. Selects quadratic histogram equalization. [Default is linear]. (http://docs.generic-mapping-tools.org/latest/grdhisteq.html#q)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

GMT.grdimageFunction
grdimage(cmd0::String="", arg1=nothing, arg2=nothing, arg3=nothing; kwargs...)

Produces a gray-shaded (or colored) map by plotting rectangles centered on each grid node and assigning them a gray-shade (or color) based on the z-value.

Full option list at grdimage

Parameters

  • A | img_out | image_out :: [Type => Str]

    Save an image in a raster format instead of PostScript. (http://docs.generic-mapping-tools.org/latest/grdimage.html#a)

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • B | frame | axis | xaxis yaxis:: [Type => Str]

    Set map boundary frame and axes attributes. (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • C | color | colormap | cmap | colorscale :: [Type => Str] $Arg = [cpt |master[+izinc] |color1,color2[,*color3*,…]]$

    Give a CPT name or specify -Ccolor1,color2[,color3,...] to build a linear continuous CPT from those colors automatically. (http://docs.generic-mapping-tools.org/latest/grdimage.html#c)

  • D | img_in | image_in :: [Type => Str]

    Specifies that the grid supplied is an image file to be read via GDAL. (http://docs.generic-mapping-tools.org/latest/grdimage.html#d)

  • E | dpi :: [Type => Int]

    Sets the resolution of the projected grid that will be created. (http://docs.generic-mapping-tools.org/latest/grdimage.html#e)

  • G | bit_color :: [Type => Int]

    (http://docs.generic-mapping-tools.org/latest/grdimage.html#g)

  • I | shade | shading | intensity :: [Type => Bool | Str | GMTgrid]

    Gives the name of a grid file or GMTgrid with intensities in the (-1,+1) range, or a grdgradient shading flags. (http://docs.generic-mapping-tools.org/latest/grdimage.html#i)

  • M | monochrome :: [Type => Bool]

    Force conversion to monochrome image using the (television) YIQ transformation. (http://docs.generic-mapping-tools.org/latest/grdimage.html#m)

  • N | noclip :: [Type => Bool]

    Do not clip the image at the map boundary. (http://docs.generic-mapping-tools.org/latest/grdimage.html#n)

  • P | portrait :: [Type => Bool or []]

    Tell GMT to NOT draw in portrait mode (that is, make a Landscape plot)

  • Q | alpha_color | nan_alpha :: [Type => Bool | Tuple | Str] $Q = true | Q = (r,g,b)$

Make grid nodes with z = NaN transparent, or pick a color for transparency in a image.
  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • U | time_stamp | timestamp :: [Type => Str or Bool or []] $Arg = [[just]/dx/dy/][c|label]$

    Draw GMT time stamp logo on plot. (http://docs.generic-mapping-tools.org/latest/gmt.html#u-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • X | x_offset | xshift :: [Type => Str] $Arg = [a|c|f|r][x-shift[u]]$

  • Y | y_offset | yshift :: [Type => Str] $Arg = [a|c|f|r][y-shift[u]]$

    Shift plot origin relative to the current origin by (x-shift,y-shift) and optionally append the length unit (c, i, or p). (http://docs.generic-mapping-tools.org/latest/gmt.html#xy-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • n | interp | interpolation :: [Type => Str] $Arg = [b|c|l|n][+a][+bBC][+c][+tthreshold]$

    Select grid interpolation mode by adding b for B-spline smoothing, c for bicubic interpolation, l for bilinear interpolation, or n for nearest-neighbor value. (http://docs.generic-mapping-tools.org/latest/gmt.html#n-full)

  • p | view | perspective :: [Type => Str or List] $Arg = [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]$

    Selects perspective view and sets the azimuth and elevation of the viewpoint [180/90]. (http://docs.generic-mapping-tools.org/latest/gmt.html#perspective-full)

  • t | alpha | transparency :: [Type => Str] $Arg = transp$

    Set PDF transparency level for an overlay, in (0-100] percent range. [Default is 0, i.e., opaque]. (http://docs.generic-mapping-tools.org/latest/gmt.html#t-full)

  • savefig | figname | name :: [Type => Str]

    Save the figure with the figname=name.ext where ext chooses the figure format (e.g. figname="name.png")

GMT.grdinfoFunction
grdinfo(cmd0::String="", arg1=nothing; kwargs...)

Reads a 2-D grid file and reports metadata and various statistics for the (x,y,z) data in the grid file

Full option list at grdinfo

Parameters

  • C | numeric :: [Type => Str | Number]

    Formats the report using tab-separated fields on a single line. (http://docs.generic-mapping-tools.org/latest/grdinfo.html#c)

  • D | tiles :: [Type => Number | Str]

    Divide a single grid’s domain (or the -R domain, if no grid given) into tiles of size dx times dy (set via -I). (http://docs.generic-mapping-tools.org/latest/grdinfo.html#d)

  • F :: [Type => Bool]

    Report grid domain and x/y-increments in world mapping format. (http://docs.generic-mapping-tools.org/latest/grdinfo.html#f)

  • G | force_download :: [Type => Bool]

    Force (possible) download and mosaicing of all tiles of tiled global remote grids in order to report the requested information. (http://docs.generic-mapping-tools.org/latest/grdinfo.html#g)

  • I | nearest :: [Type => Number | Str] $Arg = [dx[/dy]|b|i|r]$

    Report the min/max of the region to the nearest multiple of dx and dy, and output this in the form -Rw/e/s/n (http://docs.generic-mapping-tools.org/latest/grdinfo.html#i)

  • L | force_scan :: [Type => Number | Str]

    Report stats after actually scanning the data. (http://docs.generic-mapping-tools.org/latest/grdinfo.html#l)

  • M | minmax_pos :: [Type => Bool]

    Find and report the location of min/max z-values. (http://docs.generic-mapping-tools.org/latest/grdinfo.html#m)

  • Q | cube :: [Type => Bool]

    Input files must be data 3-D netCDF data cube. Not compatible with D, E, F, and Ib (GMT6.2) (http://docs.generic-mapping-tools.org/latest/grdinfo.html#q)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • T | zmin_max :: [Type => Number | Str] Determine min and max z-value. (http://docs.generic-mapping-tools.org/latest/grdinfo.html#t)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

GMT.grdinterpolateFunction
grdinterpolate(cmd0="", arg1=nothing, arg2=nothing; kwargs...)

Interpolate a 3-D cube, 2-D grids or 1-D series from a 3-D data cube or stack of 2-D grids.

Full option list at grdinterpolate

Parameters

  • D | meta | metadata :: [Type => Str | NamedTuple]

    Give one or more combinations for values xname, yname, zname (3rd dimension in cube), and dname (data value name) and give the names of those variables and in square bracket their units (http://docs.generic-mapping-tools.org/latest/grdinterpolate.html#d)

  • E | crossection :: [Type => Str | GMTdtaset | NamedTuple]

    Specify a crossectinonal profile via a file or from specified line coordinates and modifiers. If a file, it must be contain a single segment with either lon lat or lon lat dist records. These must be equidistant. (http://docs.generic-mapping-tools.org/latest/grdinterpolate.html#e)

  • F | interp_type :: [Type => Str] $Arg = l|a|c|n[+1|+2]$

    Choose from l (Linear), a (Akima spline), c (natural cubic spline), and n (no interpolation: nearest point) [Default is Akima].

  • G | outfile | outgrid :: [Type => Str]

    Output file name. If range only selects a single layer then the data cube collapses to a regular 2-D grid file (http://docs.generic-mapping-tools.org/latest/grdinterpolate.html#g)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • S | pt | track :: [Type => Str | Tuple | Dataset] Arg = x/y|pointfile[+hheader]

    Rather than compute gridded output, create tile/spatial series through the stacked grids at the given point (x/y) or the list of points in pointfile. (http://docs.generic-mapping-tools.org/latest/grdinterpolate.html#s)

  • T | range :: [Type => Str] Arg = [min/max/]inc[+i|n] |-Tfile|list

    Make evenly spaced time-steps from min to max by inc [Default uses input times]. (http://docs.generic-mapping-tools.org/latest/grdinterpolate.html#t)

  • Z | levels :: [Type => range] Arg = [levels]

    The levels may be specified the same way as in range. If not given then we default to an integer levels array starting at 0. (http://docs.generic-mapping-tools.org/latest/grdinterpolate.html#z)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • bi | binary_in :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary format for primary input (secondary inputs are always ASCII). (http://docs.generic-mapping-tools.org/latest/gmt.html#bi-full)

  • bo | binary_out :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary output. (http://docs.generic-mapping-tools.org/latest/gmt.html#bo-full)

  • di | nodata_in :: [Type => Str or Number] $Arg = nodata$

    Examine all input columns and if any item equals nodata we interpret this value as a missing data item and substitute the value NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#di-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • g | gap :: [Type => Str] $Arg = [a]x|y|d|X|Y|D|[col]z[+|-]gap[u]$

    Examine the spacing between consecutive data points in order to impose breaks in the line. (http://docs.generic-mapping-tools.org/latest/gmt.html#g-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • n | interp | interpolation :: [Type => Str] $Arg = [b|c|l|n][+a][+bBC][+c][+tthreshold]$

    Select grid interpolation mode by adding b for B-spline smoothing, c for bicubic interpolation, l for bilinear interpolation, or n for nearest-neighbor value. (http://docs.generic-mapping-tools.org/latest/gmt.html#n-full)

  • o | outcols | outcol :: [Type => Str] $Arg = cols[,…]$

    Select specific data columns for primary output, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#ocols-full)

  • q | inrow | inrows :: [Type => Str] $Arg = [i|o][~]rows[+ccol][+a|f|s]$

    Select specific data rows to be read (-qi [Default]) or written (-qo) [all]. (http://docs.generic-mapping-tools.org/latest/gmt.html#q-full)

  • s | skiprows | skip_NaN :: [Type => Str] $Arg = [cols][a|r]$

    Suppress output for records whose z-value equals NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#s-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

When using two numeric inputs and no G option, the order of the x,y and grid is not important. That is, both of this will work: D = grdinterpolate([0 0], G); or D = grdinterpolate(G, [0 0]);

When using the pt or crossection options the default is to NOT ouput the redundant horizontal x,y coordinates (contrary to the GMT default). If you want to have them, use option colinfo, e.g. colinfo="0-3"

GMT.grdlandmaskFunction
grdlandmask([monolithic::String="";] area=, resolution=, bordervalues=, save=, maskvalues=, registration=, verbose=, cores=)

Create a grid file with set values for land and water.

Read the selected shoreline database and create a grid to specify which nodes in the specified grid are over land or over water. The nodes defined by the selected region and lattice spacing will be set according to one of two criteria: (1) land vs water, or (2) the more detailed (hierarchical) ocean vs land vs lake vs island vs pond.

Full option list at grdlandmask

Parameters

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • I | inc | increment | spacing :: [Type => Str] $Arg = xinc[unit][+e|n][/yinc[unit][+e|n]]]$

    x_inc [and optionally y_inc] is the grid spacing. Optionally, append an increment unit. (http://docs.generic-mapping-tools.org/latest/grdlandmask.html#i)

  • A | area :: [Type => Str | Number]

    Features with an area smaller than minarea in km^2 or of hierarchical level that is lower than minlevel or higher than max_level will not be plotted. (http://docs.generic-mapping-tools.org/latest/grdlandmask.html#a)

  • D | res | resolution :: [Type => Str]

    Selects the resolution of the data set to use ((f)ull, (h)igh, (i)ntermediate, (l)ow, and (c)rude). (http://docs.generic-mapping-tools.org/latest/grdlandmask.html#d)

  • E | bordervalues :: [Type => Str | List] $Arg = cborder/lborder/iborder/pborder or bordervalue$

    Nodes that fall exactly on a polygon boundary should be considered to be outside the polygon [Default considers them to be inside]. (http://docs.generic-mapping-tools.org/latest/grdlandmask.html#e)

  • G | save | outgrid | outfile :: [Type => Str]

    Output grid file name. Note that this is optional and to be used only when saving the result directly on disk. Otherwise, just use the G = grdlandmask(....) form. (http://docs.generic-mapping-tools.org/latest/grdlandmask.html#g)

  • N | maskvalues | mask :: [Type => Str | List] $Arg = wet/dry or ocean/land/lake/island/pond$

    Sets the values that will be assigned to nodes. Values can be any number, including the textstring NaN (http://docs.generic-mapping-tools.org/latest/grdlandmask.html#n)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • r | reg | registration :: [Type => Bool or []]

    Force pixel node registration [Default is gridline registration]. (http://docs.generic-mapping-tools.org/latest//gmt.html#r-full)

  • x | cores | n_threads :: [Type => Str or Number] $Arg = [[-]n]$

    Limit the number of cores to be used in any OpenMP-enabled multi-threaded algorithms. (http://docs.generic-mapping-tools.org/latest/gmt.html#x-full)

GMT.grdmaskFunction
grdmask(cmd0::String="", arg1=nothing, kwargs...)
  1. It reads one or more pathfiles that each define a closed polygon.
  2. The pathfiles simply represent data point locations and the mask is set to the inside or outside value depending on whether a node is within a maximum distance from the nearest data point.

Full option list at grdmask

Parameters

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • I | inc | increment | spacing :: [Type => Str] $Arg = xinc[unit][+e|n][/yinc[unit][+e|n]]]$

    x_inc [and optionally y_inc] is the grid spacing. Optionally, append an increment unit. (http://docs.generic-mapping-tools.org/latest/grdmask.html#i)

  • A | steps | straight_lines :: [Type => Str | Number] $Arg = m|p|x|y$

    If the input data are geographic then the sides in the polygons will be approximated by great circle arcs. When using this option sides will be regarded as straight lines. (http://docs.generic-mapping-tools.org/latest/grdmask.html#a)

  • G | save | outgrid | outfile :: [Type => Str]

    Output grid file name. Note that this is optional and to be used only when saving the result directly on disk. Otherwise, just use the G = grdmask(....) form. (http://docs.generic-mapping-tools.org/latest/grdmask.html#g)

  • N | outedgein :: [Type => Str | List] $Arg = [z|Z|p|P]values$

    Sets the out/edge/in that will be assigned to nodes that are outside the polygons, on the edge, or inside. Values can be any number, including the textstring NaN [Default is 0/0/1]. (http://docs.generic-mapping-tools.org/latest/grdmask.html#n)

  • S | search_radius :: [Type => Str | List] $Arg = search_radius[unit] |xlim/ylim$

    Set nodes to inside, on edge, or outside depending on their distance to the nearest data point.

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • bi | binary_in :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary format for primary input (secondary inputs are always ASCII). (http://docs.generic-mapping-tools.org/latest/gmt.html#bi-full)

  • di | nodata_in :: [Type => Str or Number] $Arg = nodata$

    Examine all input columns and if any item equals nodata we interpret this value as a missing data item and substitute the value NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#di-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • g | gap :: [Type => Str] $Arg = [a]x|y|d|X|Y|D|[col]z[+|-]gap[u]$

    Examine the spacing between consecutive data points in order to impose breaks in the line. (http://docs.generic-mapping-tools.org/latest/gmt.html#g-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • j | spherical_dist | spherical :: [Type => Str] $Arg = e|f|g$

    Determine how spherical distances are calculated in modules that support this. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • n | interp | interpolation :: [Type => Str] $Arg = [b|c|l|n][+a][+bBC][+c][+tthreshold]$

    Select grid interpolation mode by adding b for B-spline smoothing, c for bicubic interpolation, l for bilinear interpolation, or n for nearest-neighbor value. (http://docs.generic-mapping-tools.org/latest/gmt.html#n-full)

  • r | reg | registration :: [Type => Bool or []]

    Force pixel node registration [Default is gridline registration]. (http://docs.generic-mapping-tools.org/latest//gmt.html#r-full)

  • x | cores | n_threads :: [Type => Str or Number] $Arg = [[-]n]$

    Limit the number of cores to be used in any OpenMP-enabled multi-threaded algorithms. (http://docs.generic-mapping-tools.org/latest/gmt.html#x-full)

  • w | wrap | cyclic :: [Type => Str or Number] $Arg = [[-]n]$

    Convert input records to a cyclical coordinate. (http://docs.generic-mapping-tools.org/latest/gmt.html#w-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.grdmathMethod
grdmath(cmd::String, args...)

Call grdmath with all commands in a single string 'cmd'. This is not useful in itself as compared to call gmt("grdmath ....") but it's very useful in 'movie' because it can generate shell scripts from the julai command

Full option list at grdmath

GMT.grdpasteFunction
grdpaste(cmd0::String="", arg1=nothing, arg2=nothing, kwargs...)

Combine grids $grid1$ and $grid2$ into $grid3$ by pasting them together along their common edge. Both grids must have the same dx, dy and have one edge in common.

Full option list at grdpaste

Parameters

  • G | save | outgrid | outfile :: [Type => Str]

    Output grid file name. Note that this is optional and to be used only when saving the result directly on disk. Otherwise, just use the G = grdpaste(....) form. (http://docs.generic-mapping-tools.org/latest/grdpaste.html#g)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

GMT.grdprojectFunction
grdproject(cmd0::String="", arg1=nothing, kwargs...)

Project a geographical gridded data set onto a rectangular grid or do the inverse projection.

Full option list at grdproject

Parameters

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • C | center :: [Type => Str | []] $Arg = [dx/dy]$

    Let projected coordinates be relative to projection center [Default is relative to lower left corner]. (http://docs.generic-mapping-tools.org/latest/grdproject.html#c)

  • D | inc :: [Type => Str | number] $Arg = xinc[unit][+e|n][/yinc[unit][+e|n]]$

    Set the grid spacing for the new grid. Append m for arc minute, s for arc second. (http://docs.generic-mapping-tools.org/latest/grdproject.html#d)

  • E | dpi :: [Type => Number]

    Set the resolution for the new grid in dots per inch. (http://docs.generic-mapping-tools.org/latest/grdproject.html#e)

  • F | one2one :: [Type => Str] $Arg = [c|i|p|e|f|k|M|n|u]$

    Force 1:1 scaling, i.e., output (or input, see -I) data are in actual projected meters [e]. (http://docs.generic-mapping-tools.org/latest/grdproject.html#f)

  • G | save | outgrid | outfile :: [Type => Str]

    Output grid file name. Note that this is optional and to be used only when saving the result directly on disk. Otherwise, just use the G = grdproject(....) form. (http://docs.generic-mapping-tools.org/latest/grdproject.html#g)

  • I | inverse :: [Type => Bool]

    Do the Inverse transformation, from rectangular to geographical. (http://docs.generic-mapping-tools.org/latest/grdproject.html#i)

  • M | projected_unit :: [Type => Str] $Arg = c|i|p$

    Append c, i, or p to indicate that cm, inch, or point should be the projected measure unit. (http://docs.generic-mapping-tools.org/latest/grdproject.html#m)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • n | interp | interpolation :: [Type => Str] $Arg = [b|c|l|n][+a][+bBC][+c][+tthreshold]$

    Select grid interpolation mode by adding b for B-spline smoothing, c for bicubic interpolation, l for bilinear interpolation, or n for nearest-neighbor value. (http://docs.generic-mapping-tools.org/latest/gmt.html#n-full)

  • r | reg | registration :: [Type => Bool or []]

    Force pixel node registration [Default is gridline registration]. (http://docs.generic-mapping-tools.org/latest//gmt.html#r-full)

GMT.grdrotaterFunction
grdrotater(cmd0::String="", arg1=nothing; kwargs...)

Takes a geographical grid and reconstructs it given total reconstruction rotations.

Full option list at grdrotater

Parameters

  • A | rot_region :: [Type => Str | Tuple | Vec]

    Specify directly the region of the rotated grid. (http://docs.generic-mapping-tools.org/latest/grdrotater.html#a)

  • D | rot_outline :: [Type => Bool or Str] $Arg = true | filename$

    Name of the grid polygon outline file. This represents the outline of the grid reconstructed to the specified time. (http://docs.generic-mapping-tools.org/latest/grdrotater.html#d)

  • F | rot_polyg | rot_polygon :: [Type => Str | GMTdaset | Mx2 array] $Arg = filename | dataset)$

    Specify a multisegment closed polygon file that describes the inside area of the grid that should be rotated. (http://docs.generic-mapping-tools.org/latest/grdrotater.html#f)

  • G | save | outgrid | outfile :: [Type => Str]

    Output grid file name. Note that this is optional and to be used only when saving the result directly on disk. Otherwise, just use the G = grdrotater(....) form. (http://docs.generic-mapping-tools.org/latest/grdrotater.html#g)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • T | ages :: [Type => Str | Tuple]

    Sets the desired reconstruction times. For a single time append the desired time. (http://docs.generic-mapping-tools.org/latest/grdrotater.html#t)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • b | binary :: [Type => Str]

    (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • d | nodata :: [Type => Str or Number] $Arg = [i|o]nodata$

    Control how user-coded missing data values are translated to official NaN values in GMT. (http://docs.generic-mapping-tools.org/latest/gmt.html#d-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • g | gap :: [Type => Str] $Arg = [a]x|y|d|X|Y|D|[col]z[+|-]gap[u]$

    Examine the spacing between consecutive data points in order to impose breaks in the line. (http://docs.generic-mapping-tools.org/latest/gmt.html#g-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • n | interp | interpolation :: [Type => Str] $Arg = [b|c|l|n][+a][+bBC][+c][+tthreshold]$

    Select grid interpolation mode by adding b for B-spline smoothing, c for bicubic interpolation, l for bilinear interpolation, or n for nearest-neighbor value. (http://docs.generic-mapping-tools.org/latest/gmt.html#n-full)

  • o | outcols | outcol :: [Type => Str] $Arg = cols[,…]$

    Select specific data columns for primary output, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#ocols-full)

Example

G = grdmath("-R-5/5/-5/5 -I0.1 -fg X Y HYPOT");
tri = [-2.411 -1.629; -0.124 2.601; 2.201 -1.629; -2.410 -1.629];
Gr, tri_rot = grdrotater(G, rotation="-40.8/32.8/-12.9", rot_outline=true, rot_polygon=tri);
imshow(Gr, plot=(data=tri_rot,))
GMT.grdsampleFunction
grdsample(cmd0::String="", arg1=nothing, kwargs...)

Reads a grid file and interpolates it to create a new grid file with either: a different registration; or a new grid-spacing or number of nodes, and perhaps also a new sub-region

Full option list at grdsample

Parameters

  • G | save | outgrid | outfile :: [Type => Str]

    Output grid file name. Note that this is optional and to be used only when saving the result directly on disk. Otherwise, just use the G = grdsample(....) form. (http://docs.generic-mapping-tools.org/latest/grdsample.html#g)

  • I | inc | increment | spacing :: [Type => Str] $Arg = xinc[unit][+e|n][/yinc[unit][+e|n]]]$

    x_inc [and optionally y_inc] is the grid spacing. Optionally, append an increment unit. (http://docs.generic-mapping-tools.org/latest/grdsample.html#i)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • T | toggle :: [Type => Bool]

    Toggle the node registration for the output grid so as to become the opposite of the input grid (http://docs.generic-mapping-tools.org/latest/grdsample.html#t)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • n | interp | interpolation :: [Type => Str] $Arg = [b|c|l|n][+a][+bBC][+c][+tthreshold]$

    Select grid interpolation mode by adding b for B-spline smoothing, c for bicubic interpolation, l for bilinear interpolation, or n for nearest-neighbor value. (http://docs.generic-mapping-tools.org/latest/gmt.html#n-full)

  • r | reg | registration :: [Type => Bool or []]

    Force pixel node registration [Default is gridline registration]. (http://docs.generic-mapping-tools.org/latest//gmt.html#r-full)

  • x | cores | n_threads :: [Type => Str or Number] $Arg = [[-]n]$

    Limit the number of cores to be used in any OpenMP-enabled multi-threaded algorithms. (http://docs.generic-mapping-tools.org/latest/gmt.html#x-full)

GMT.grdtrackFunction
grdtrack(cmd0::String="", arg1=nothing, arg2=nothing; kwargs...)

Interpolates the grid(s) at the positions in the table and returns the table with the interpolated values added as (one or more) new columns.

Full option list at grdtrack

Parameters

  • A | interp_path :: [Type => Str] Arg = f|p|m|r|R[+l]

    For track resampling (if crossprofile or profile are set) we can select how this is to be performed. (http://docs.generic-mapping-tools.org/latest/grdtrack.html#a)

  • C | crossprofile :: [Type => Str] Arg = length/ds[/spacing][+a|+v][l|r]

    Use input line segments to create an equidistant and (optionally) equally-spaced set of crossing profiles along which we sample the grid(s) (http://docs.generic-mapping-tools.org/latest/grdtrack.html#c)

  • D | dfile :: [Type => Str]

    In concert with crossprofile we can save the (possibly resampled) original lines to the file dfile (http://docs.generic-mapping-tools.org/latest/grdtrack.html#d)

  • E | profile :: [Type => Str]

    Instead of reading input track coordinates, specify profiles via coordinates and modifiers. (http://docs.generic-mapping-tools.org/latest/grdtrack.html#e)

  • F | critical :: [Type => Str]

    Find critical points along each cross-profile as a function of along-track distance. Requires crossprofile and a single input grid. (http://docs.generic-mapping-tools.org/latest/grdtrack.html#e)

  • G | grid :: [Type => Str | GMTgrid | Tuple(GMTgrid's)]

    (http://docs.generic-mapping-tools.org/latest/grdtrack.html#g)

  • N | no_skip :: [Type => Bool]

    (http://docs.generic-mapping-tools.org/latest/grdtrack.html#n)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • S | stack :: [Type => Str]

    (http://docs.generic-mapping-tools.org/latest/grdtrack.html#s)

  • T | radius :: [Type => Number, Str | []]

    (http://docs.generic-mapping-tools.org/latest/grdtrack.html#t)

  • Z | z_only :: [Type => Bool]

    (http://docs.generic-mapping-tools.org/latest/grdtrack.html#z)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • bi | binary_in :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary format for primary input (secondary inputs are always ASCII). (http://docs.generic-mapping-tools.org/latest/gmt.html#bi-full)

  • bo | binary_out :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary output. (http://docs.generic-mapping-tools.org/latest/gmt.html#bo-full)

  • di | nodata_in :: [Type => Str or Number] $Arg = nodata$

    Examine all input columns and if any item equals nodata we interpret this value as a missing data item and substitute the value NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#di-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • g | gap :: [Type => Str] $Arg = [a]x|y|d|X|Y|D|[col]z[+|-]gap[u]$

    Examine the spacing between consecutive data points in order to impose breaks in the line. (http://docs.generic-mapping-tools.org/latest/gmt.html#g-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • n | interp | interpolation :: [Type => Str] $Arg = [b|c|l|n][+a][+bBC][+c][+tthreshold]$

    Select grid interpolation mode by adding b for B-spline smoothing, c for bicubic interpolation, l for bilinear interpolation, or n for nearest-neighbor value. (http://docs.generic-mapping-tools.org/latest/gmt.html#n-full)

  • o | outcols | outcol :: [Type => Str] $Arg = cols[,…]$

    Select specific data columns for primary output, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#ocols-full)

  • s | skiprows | skip_NaN :: [Type => Str] $Arg = [cols][a|r]$

    Suppress output for records whose z-value equals NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#s-full)

  • w | wrap | cyclic :: [Type => Str or Number] $Arg = [[-]n]$

    Convert input records to a cyclical coordinate. (http://docs.generic-mapping-tools.org/latest/gmt.html#w-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

When using two numeric inputs and no G option, the order of the x,y and grid is not important. That is, both of this will work: D = grdtrack([0 0], G); or D = grdtrack(G, [0 0]);

GMT.grdtrendFunction
grdtrend(cmd0::String="", arg1=nothing, arg2=nothing; kwargs...)

reads a 2-D grid file and fits a low-order polynomial trend to these data by [optionally weighted] least-squares.

Full option list at grdtrend

Parameters

  • N | model :: [Type => Str | Number]

    Sets the number of model parameters to fit. (http://docs.generic-mapping-tools.org/latest/grdtrend.html#n)

  • D | diff :: [Type => Str | []]

    Compute the difference (input data - trend). Optionaly provide a file name to save result on disk. (http://docs.generic-mapping-tools.org/latest/grdtrend.html#d)

  • T | trend :: [Type => Str | []]

    Compute the trend surface. Optionaly provide a file name to save result on disk. (http://docs.generic-mapping-tools.org/latest/grdtrend.html#t)

  • W | weights :: [Type => Str]

    If weight.nc exists, it will be read and used to solve a weighted least-squares problem. (http://docs.generic-mapping-tools.org/latest/grdtrend.html#w)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

GMT.grdvectorFunction
grdvector(cmd0::String="", arg1=nothing, arg2=nothing, kwargs...)

Takes two 2-D grid files which represents the x- and y-components of a vector field and produces a vector field plot by drawing vectors with orientation and length according to the information in the files. Alternatively, polar coordinate r, theta grids may be given instead.

Full option list at grdvector

Parameters

  • A | polar :: [Type => Bool]

    The grid contain polar (r, theta) components instead of Cartesian (x, y) [Default is Cartesian components]. (http://docs.generic-mapping-tools.org/latest/grdvector.html#a)

  • B | frame | axis | xaxis yaxis:: [Type => Str]

    Set map boundary frame and axes attributes. (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • C | color | colormap | cmap | colorscale :: [Type => Str] $Arg = [cpt |master[+izinc] |color1,color2[,*color3*,…]]$

    Give a CPT name or specify -Ccolor1,color2[,color3,...] to build a linear continuous CPT from those colors automatically. (http://docs.generic-mapping-tools.org/latest/grdimage.html#c)

  • G | fill :: [Type => Str | Number]

    Sets color or shade for vector interiors [Default is no fill]. (http://docs.generic-mapping-tools.org/latest/grdvector.html#g)

  • I | inc :: [Type => Sytr | Number] $Arg=[x]dx[/dy]$

    Only plot vectors at nodes every xinc, yinc apart (must be multiples of original grid spacing). (http://docs.generic-mapping-tools.org/latest/grdvector.html#i)

  • N | noclip | no_clip :: [Type => Bool]

    Do NOT clip symbols that fall outside map border (http://docs.generic-mapping-tools.org/latest/grdvector.html#n)

  • Q | vec | vector | arrow :: [Type => Str]

    Modify vector parameters. For vector heads, append vector head size [Default is 0, i.e., stick-plot]. (http://docs.generic-mapping-tools.org/latest/grdvector.html#q)

  • P | portrait :: [Type => Bool or []]

    Tell GMT to NOT draw in portrait mode (that is, make a Landscape plot)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • S | vec_scale :: [Type => Str | Number] $Arg = [i|l]scale[unit]$

    Sets scale for vector plot length in data units per plot distance measurement unit [1]. (http://docs.generic-mapping-tools.org/latest/grdvector.html#s)

  • T | sign_scale :: [Type => Bool]

    Means the azimuths of Cartesian data sets should be adjusted according to the signs of the scales in the x- and y-directions [Leave alone]. (http://docs.generic-mapping-tools.org/latest/grdvector.html#t)

  • U | time_stamp | timestamp :: [Type => Str or Bool or []] $Arg = [[just]/dx/dy/][c|label]$

    Draw GMT time stamp logo on plot. (http://docs.generic-mapping-tools.org/latest/gmt.html#u-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • W | pen :: [Type => Str | Number]

    Sets the attributes for the particular line. (http://docs.generic-mapping-tools.org/latest/grdvector.html#w)

  • X | x_offset | xshift :: [Type => Str] $Arg = [a|c|f|r][x-shift[u]]$

  • Y | y_offset | yshift :: [Type => Str] $Arg = [a|c|f|r][y-shift[u]]$

    Shift plot origin relative to the current origin by (x-shift,y-shift) and optionally append the length unit (c, i, or p). (http://docs.generic-mapping-tools.org/latest/gmt.html#xy-full)

  • Z | azimuth :: [Type => Bool]

    The theta grid provided contains azimuths rather than directions (implies -A). (http://docs.generic-mapping-tools.org/latest/grdvector.html#z)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

GMT.grdviewFunction
grdview(cmd0::String="", arg1=nothing, arg2=nothing, arg3=nothing; kwargs...)

Reads a 2-D grid and produces a 3-D perspective plot by drawing a mesh, painting a colored/grayshaded surface made up of polygons, or by scanline conversion of these polygons to a raster image.

Full option list at grdview

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • Jz | zscale | zsize :: [Type => String]

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • B | frame | axis | xaxis yaxis:: [Type => Str]

    Set map boundary frame and axes attributes. (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • C | color | colormap | cmap | colorscale :: [Type => Str] $Arg = [cpt |master[+izinc] |color1,color2[,*color3*,…]]$

    Give a CPT name or specify -Ccolor1,color2[,color3,...] to build a linear continuous CPT from those colors automatically. (http://docs.generic-mapping-tools.org/latest/grdimage.html#c)

  • G | drape | drapefile :: [Type => Str | GMTgrid | a Tuple with 3 GMTgrid types]

    Drape the image in drapefile on top of the relief provided by relief_file. (http://docs.generic-mapping-tools.org/latest/grdview.html#g)

  • I | shade | shading | intensity :: [Type => Str | GMTgrid] $Arg = GMTgrid | filename$

    Gives the name of a grid file or GMTgrid with intensities in the (-1,+1) range, or a grdgradient shading flags. (http://docs.generic-mapping-tools.org/latest/grdview.html#i)

  • N | plane :: [Type => Str | Int] $Arg = (level [,fill])$

    Draws a plane at this z-level. (http://docs.generic-mapping-tools.org/latest/grdview.html#n)

  • P | portrait :: [Type => Bool or []]

    Tell GMT to NOT draw in portrait mode (that is, make a Landscape plot)

  • Q | surftype | surf :: [Type => Str | Int] $Arg = mesh=Bool, surface=Bool, image=Bool, wterfall=(:rows|cols,[fill])$

    Specify m for mesh plot, s for surface, i for image. (http://docs.generic-mapping-tools.org/latest/grdview.html#q)

  • S | smoothfactor :: [Type => Number]

    Used to resample the contour lines at roughly every (gridbox_size/smoothfactor) interval.. (http://docs.generic-mapping-tools.org/latest/grdview.html#s)

  • T | tiles | no_interp :: [Type => Str | NT] $Arg = (skip|skip_nan=Bool, outlines=Bool|pen)$

    Plot image without any interpolation. (http://docs.generic-mapping-tools.org/latest/grdview.html#t)

  • W | pens | pen :: [Type => Str] $Arg = (contour=Bool|pen, mesh=Bool|pen, facade=Bool|pen)$

    Draw contour, mesh or facade. Append pen attributes. (http://docs.generic-mapping-tools.org/latest/grdview.html#w)

  • isgeog :: [Type => Any]

    When drapping an image that has projection info over a grid that is in geographics but does not carry any information about this fact we may need to use this option to help the program finding the common BoundingBox.

  • U | time_stamp | timestamp :: [Type => Str or Bool or []] $Arg = [[just]/dx/dy/][c|label]$

    Draw GMT time stamp logo on plot. (http://docs.generic-mapping-tools.org/latest/gmt.html#u-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • X | x_offset | xshift :: [Type => Str] $Arg = [a|c|f|r][x-shift[u]]$

  • Y | y_offset | yshift :: [Type => Str] $Arg = [a|c|f|r][y-shift[u]]$

    Shift plot origin relative to the current origin by (x-shift,y-shift) and optionally append the length unit (c, i, or p). (http://docs.generic-mapping-tools.org/latest/gmt.html#xy-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • n | interp | interpolation :: [Type => Str] $Arg = [b|c|l|n][+a][+bBC][+c][+tthreshold]$

    Select grid interpolation mode by adding b for B-spline smoothing, c for bicubic interpolation, l for bilinear interpolation, or n for nearest-neighbor value. (http://docs.generic-mapping-tools.org/latest/gmt.html#n-full)

  • p | view | perspective :: [Type => Str or List] $Arg = [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]$

    Selects perspective view and sets the azimuth and elevation of the viewpoint [180/90]. (http://docs.generic-mapping-tools.org/latest/gmt.html#perspective-full)

  • t | alpha | transparency :: [Type => Str] $Arg = transp$

    Set PDF transparency level for an overlay, in (0-100] percent range. [Default is 0, i.e., opaque]. (http://docs.generic-mapping-tools.org/latest/gmt.html#t-full)

  • savefig | figname | name :: [Type => Str]

    Save the figure with the figname=name.ext where ext chooses the figure format (e.g. figname="name.png")

GMT.grdvolumeFunction
grdvolume(cmd0::String="", arg1=nothing, kwargs...)

Reads one 2-D grid and returns xyz-triplets.

Full option list at grdvolume

Parameters

  • C | cont | contour :: [Type => Str | List] $Arg = cval or low/high/delta or rlow/high or rcval$

    Find area, volume and mean height (volume/area) inside the cval contour. (http://docs.generic-mapping-tools.org/latest/grdvolume.html#c)

  • L | base_level :: [Type => Number] $Arg = base$

    Also add in the volume from the level of the contour down to base [Default base is contour]. (http://docs.generic-mapping-tools.org/latest/grdvolume.html#l)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • S | unit :: [Type => Str] $Arg = e|f|k|M|n|u$

    For geographical grids, append a unit from e|f|k|M|n|u [Default is meter (e)]. (http://docs.generic-mapping-tools.org/latest/grdvolume.html#s)

  • T :: [Type => Str] $Arg = [c|h]$

    Determine the single contour that maximized the average height (= volume/area). (http://docs.generic-mapping-tools.org/latest/grdvolume.html#t)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • Z | scale :: [Type => Str or List] $Arg = fact[/shift]$

    Optionally subtract shift before scaling data by fact. [Default is no scaling]. (http://docs.generic-mapping-tools.org/latest/grdvolume.html#z)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • o | outcols | outcol :: [Type => Str] $Arg = cols[,…]$

    Select specific data columns for primary output, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#ocols-full)

GMT.greensplineFunction
greenspline(cmd0::String="", arg1=nothing; kwargs...)

Reads randomly-spaced (x,y,z) triples and produces a binary grid file of gridded values z(x,y) by solving:

	(1 - T) * L (L (z)) + T * L (z) = 0

Full option list at greenspline

Parameters

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • I | inc :: [Type => Str | Number]

    x_inc [and optionally y_inc] is the grid spacing. (http://docs.generic-mapping-tools.org/latest/greenspline.html#i)

  • A | gradient :: [Type => Str | Array] $Arg = gradfile+f1|2|3|4|5 | (data=Array, format=x)$

    The solution will partly be constrained by surface gradients v = v*n, where v is the gradient magnitude and n its unit vector direction. (http://docs.generic-mapping-tools.org/latest/greenspline.html#a)

  • C | approx | approximate :: [Type => Str | Number] $Arg = [n]value[+ffile]$

    Find an approximate surface fit: Solve the linear system for the spline coefficients by SVD and eliminate the contribution from all eigenvalues whose ratio to the largest eigenvalue is less than value. (http://docs.generic-mapping-tools.org/latest/greenspline.html#c)

  • G | grid :: [Type => Str | []]

    Output grid file name. Note that this is optional and to be used only when saving the result directly on disk. Otherwise, just use the G = greenspline(....) form. (http://docs.generic-mapping-tools.org/latest/greenspline.html#g)

  • D | mode :: [Type => Number]

    Sets the distance flag that determines how we calculate distances between data points. (http://docs.generic-mapping-tools.org/latest/greenspline.html#d)

  • E :|misfit :: [Type => Str | []] $Arg = [misfitfile]$

    Evaluate the spline exactly at the input data locations and report statistics of the misfit (mean, standard deviation, and rms). (http://docs.generic-mapping-tools.org/latest/greenspline.html#e)

  • L | leave_trend :: [Type => Bool]

    Do not remove a linear (1-D) or planer (2-D) trend when -D selects mode 0-3. (http://docs.generic-mapping-tools.org/latest/greenspline.html#l)

  • N | nodes :: [Type => Number | Array] $Arg = nodefile$

    ASCII file with coordinates of desired output locations x in the first column(s). (http://docs.generic-mapping-tools.org/latest/greenspline.html#n)

  • Q | dir_derivative :: [Type => Str] $Arg = az|x/y/z$

    Rather than evaluate the surface, take the directional derivative in the az azimuth and return the magnitude of this derivative instead. (http://docs.generic-mapping-tools.org/latest/greenspline.html#q)

  • S | splines :: [Type => Str] $Arg = c|t|l|r|p|q[pars]$

    Select one of six different splines. The first two are used for 1-D, 2-D, or 3-D Cartesian splines. (http://docs.generic-mapping-tools.org/latest/greenspline.html#s)

  • T | mask :: [Type => Str] $Arg = maskgrid$

    For 2-D interpolation only. Only evaluate the solution at the nodes in the maskgrid that are not equal to NaN. (http://docs.generic-mapping-tools.org/latest/greenspline.html#t)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • W | uncertainties :: [Type => Str | []] $Arg = [w]$

Data one-sigma uncertainties are provided in the last column. We then compute weights that
are inversely proportional to the uncertainties squared.
(http://docs.generic-mapping-tools.org/latest/greenspline.html#w)
  • b | binary :: [Type => Str]

    (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • d | nodata :: [Type => Str or Number] $Arg = [i|o]nodata$

    Control how user-coded missing data values are translated to official NaN values in GMT. (http://docs.generic-mapping-tools.org/latest/gmt.html#d-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • o | outcols | outcol :: [Type => Str] $Arg = cols[,…]$

    Select specific data columns for primary output, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#ocols-full)

  • r | reg | registration :: [Type => Bool or []]

    Force pixel node registration [Default is gridline registration]. (http://docs.generic-mapping-tools.org/latest//gmt.html#r-full)

  • x | cores | n_threads :: [Type => Str or Number] $Arg = [[-]n]$

    Limit the number of cores to be used in any OpenMP-enabled multi-threaded algorithms. (http://docs.generic-mapping-tools.org/latest/gmt.html#x-full)

  • w | wrap | cyclic :: [Type => Str or Number] $Arg = [[-]n]$

    Convert input records to a cyclical coordinate. (http://docs.generic-mapping-tools.org/latest/gmt.html#w-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.histogramFunction
histogram(cmd0::String="", arg1=nothing; kwargs...)

Examines the first data column to calculate histogram parameters based on the bin-width provided. Alternatively, show histograms of GMTimage & GMTgrid objects directly. The options 'auto=true' or 'thresholds=(0, 0.1)' will find the histogram bounds convenient for contrast enhancement (histogram stretch). The values represent the percentage of countings used to estimate the boundings. The option 'zoom=true' will set 'auto=true' and show histogram only on the region of interest.

Full option list at pshistogram

Parameters

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • A | horizontal :: [Type => Bool]

    Plot the histogram horizontally from x = 0 [Default is vertically from y = 0]. (http://docs.generic-mapping-tools.org/latest/histogram.html#a)

  • Jz | zscale | zsize :: [Type => String]

  • B | frame | axis | xaxis yaxis:: [Type => Str]

    Set map boundary frame and axes attributes. (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • C | color | cmap :: [Type => Str | GMTcpt]

    Give a CPT. The mid x-value for each bar is used to look-up the bar color. (http://docs.generic-mapping-tools.org/latest/histogram.html#c)

  • D | annot | annotate | counts :: [Type => Str | Tuple]

    Annotate each bar with the count it represents. (http://docs.generic-mapping-tools.org/latest/histogram.html#d)

  • E | width :: [Type => Bool] Arg = width[+ooffset]

    Use an alternative histogram bar width than the default set via T, and optionally shift all bars by an offset. (http://docs.generic-mapping-tools.org/latest/histogram.html#e)

  • binmethod | *BinMethod** :: [Type => Str] Arg = method

    Binning algorithm: "scott", "fd", "sturges" or "sqrt" for floating point data. "second", "minute", "hour", "day", "week", "month" or "year" for DateTime data.

  • F | center :: [Type => Bool]

    Center bin on each value. [Default is left edge]. (http://docs.generic-mapping-tools.org/latest/histogram.html#f)

  • G | fill :: [Type => Number | Str]

    Select filling of bars [if no G, L or C set G=100]. (http://docs.generic-mapping-tools.org/latest/histogram.html#g)

  • I | inquire | bins :: [Type => Bool | :O | :o | bins=(all=true,) | bins=(no_zero=true,) ]

    Inquire about min/max x and y after binning OR output the binned array. (http://docs.generic-mapping-tools.org/latest/histogram.html#i)

  • L | out_range :: [Type => Str] Arg = l|h|b

    Handling of extreme values that fall outside the range set by T. (http://docs.generic-mapping-tools.org/latest/histogram.html#l)

  • N | distribution | normal :: [Type => Str]

    Draw the equivalent normal distribution; append desired pen [0.5p,black]. (http://docs.generic-mapping-tools.org/latest/histogram.html#n)

  • P | portrait :: [Type => Bool or []]

    Tell GMT to NOT draw in portrait mode (that is, make a Landscape plot)

  • Q | cumulative :: [Type => Bool | "r"]

    Draw a cumulative histogram. Append r to instead compute the reverse cumulative histogram. (http://docs.generic-mapping-tools.org/latest/histogram.html#q)

  • R | region :: [Type => Str]

    Specifies the ‘region’ of interest in (r,azimuth) space. r0 is 0, r1 is max length in units. (http://docs.generic-mapping-tools.org/latest/histogram.html#r)

  • S | stairs :: [Type => Str | number]

    Draws a stairs-step diagram which does not include the internal bars of the default histogram. (http://docs.generic-mapping-tools.org/latest/histogram.html#s)

  • T | range | bin :: [Type => Str] Arg = [min/max/]inc[+n] | file|list]

    Make evenly spaced array of bin boundaries from min to max by inc. If min/max are not given then we default to the range in region. For constant bin width use bin=val.. (http://docs.generic-mapping-tools.org/latest/histogram.html#t)

  • W | pen :: [Type => Str | Tuple]

    Set pen attributes for sector outline or rose plot. [Default is no outline]. (http://docs.generic-mapping-tools.org/latest/histogram.html#w)

  • Z | kind :: [Type => Number | Str]

    Choose between 6 types of histograms. (http://docs.generic-mapping-tools.org/latest/histogram.html#z)

  • U | time_stamp | timestamp :: [Type => Str or Bool or []] $Arg = [[just]/dx/dy/][c|label]$

    Draw GMT time stamp logo on plot. (http://docs.generic-mapping-tools.org/latest/gmt.html#u-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • X | x_offset | xshift :: [Type => Str] $Arg = [a|c|f|r][x-shift[u]]$

  • Y | y_offset | yshift :: [Type => Str] $Arg = [a|c|f|r][y-shift[u]]$

    Shift plot origin relative to the current origin by (x-shift,y-shift) and optionally append the length unit (c, i, or p). (http://docs.generic-mapping-tools.org/latest/gmt.html#xy-full)

  • bi | binary_in :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary format for primary input (secondary inputs are always ASCII). (http://docs.generic-mapping-tools.org/latest/gmt.html#bi-full)

  • di | nodata_in :: [Type => Str or Number] $Arg = nodata$

    Examine all input columns and if any item equals nodata we interpret this value as a missing data item and substitute the value NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#di-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • p | view | perspective :: [Type => Str or List] $Arg = [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]$

    Selects perspective view and sets the azimuth and elevation of the viewpoint [180/90]. (http://docs.generic-mapping-tools.org/latest/gmt.html#perspective-full)

  • t | alpha | transparency :: [Type => Str] $Arg = transp$

    Set PDF transparency level for an overlay, in (0-100] percent range. [Default is 0, i.e., opaque]. (http://docs.generic-mapping-tools.org/latest/gmt.html#t-full)

  • w | wrap | cyclic :: [Type => Str or Number] $Arg = [[-]n]$

    Convert input records to a cyclical coordinate. (http://docs.generic-mapping-tools.org/latest/gmt.html#w-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

  • savefig | figname | name :: [Type => Str]

    Save the figure with the figname=name.ext where ext chooses the figure format (e.g. figname="name.png")

GMT.hlinesFunction
hlines(arg; decorated=(...), kwargs...)

Plots one or a collection of horizontal lines with eventual decorations

  • B | frame | axis | xaxis yaxis:: [Type => Str]

    Set map boundary frame and axes attributes. (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • W | pen | line_attrib :: [Type => Str]

    Set pen attributes for the horizontal lines (http://docs.generic-mapping-tools.org/latest/plot.html#w)

Example:

plot(rand(5,3))
hlines!([0.2, 0.6], pen=(1, :red), show=true)
GMT.imageFunction
image(cmd0::String="", arg1=nothing; kwargs...)

Place images or EPS files on maps.

Full option list at psimage

Parameters

  • B | frame | axis | xaxis yaxis:: [Type => Str]

    Set map boundary frame and axes attributes. (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • D | pos | position :: [Type => Str]

    Sets reference point on the map for the image using one of four coordinate systems. (http://docs.generic-mapping-tools.org/latest/image.html#d)

  • F | box :: [Type => Str | []]

    Without further options, draws a rectangular border around the image using MAPFRAMEPEN. (http://docs.generic-mapping-tools.org/latest/image.html#f)

  • I | invert_1bit :: [Type => Str | Number]

    Invert 1-bit image before plotting. (http://docs.generic-mapping-tools.org/latest/image.html#i)

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • Jz | zscale | zsize :: [Type => String]

  • M | monochrome :: [Type => Bool]

    Convert color image to monochrome grayshades using the (television) YIQ-transformation. (http://docs.generic-mapping-tools.org/latest/image.html#m)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • U | time_stamp | timestamp :: [Type => Str or Bool or []] $Arg = [[just]/dx/dy/][c|label]$

    Draw GMT time stamp logo on plot. (http://docs.generic-mapping-tools.org/latest/gmt.html#u-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • X | x_offset | xshift :: [Type => Str] $Arg = [a|c|f|r][x-shift[u]]$

  • Y | y_offset | yshift :: [Type => Str] $Arg = [a|c|f|r][y-shift[u]]$

    Shift plot origin relative to the current origin by (x-shift,y-shift) and optionally append the length unit (c, i, or p). (http://docs.generic-mapping-tools.org/latest/gmt.html#xy-full)

  • p | view | perspective :: [Type => Str or List] $Arg = [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]$

    Selects perspective view and sets the azimuth and elevation of the viewpoint [180/90]. (http://docs.generic-mapping-tools.org/latest/gmt.html#perspective-full)

  • t | alpha | transparency :: [Type => Str] $Arg = transp$

    Set PDF transparency level for an overlay, in (0-100] percent range. [Default is 0, i.e., opaque]. (http://docs.generic-mapping-tools.org/latest/gmt.html#t-full)

  • savefig | figname | name :: [Type => Str]

    Save the figure with the figname=name.ext where ext chooses the figure format (e.g. figname="name.png")

GMT.image_alpha!Method
I = image_alpha!(img::GMTimage; alpha_ind::Integer, alpha_vec::Vector{Integer}, alpha_band::UInt8)

Change the alpha transparency of the GMTimage object img. If the image is indexed, one can either change just the color index that will be made transparent by uing alpha_ind=n or provide a vector of transaparency values in the range [0 255]; This vector can be shorter than the orginal number of colors. Use alpha_band to change, or add, the alpha of true color images (RGB).

Example1: change to the third color in cmap to represent the new transparent color
    image_alpha!(img, alpha_ind=3)

Example2: change to the first 6 colors in cmap by assigning them random values
    image_alpha!(img, alpha_vec=round.(Int32,rand(6).*255))
GMT.image_cpt!Method
image_cpt!(img::GMTimage, cpt::GMTcpt, clear=false)

or

image_cpt!(img::GMTimage, cpt::String, clear=false)

Add (or replace) a colormap to a GMTimage object from the colors in the cpt. This should have effect only if IMG is indexed. Use image_cpt!(img, clear=true) to remove a previously existent colormap field in IMG

GMT.imshowFunction
imshow(arg1; kw...)

Is a simple front end to the grdimage grdview programs that accepts GMTgrid, GMTimage, 2D array of floats or strings with file names of grids or images. The normal options of the grdimage and grdview programs also apply here but some clever guessing of suitable necessary parameters is done if they are not provided. Contrary to other image producing modules the "show' keyword is not necessary to display the image. Here it is set by default. If user wants to use imshow to create layers of a more complex fig he can use show=false for the intermediate layers.

This module uses some internal logic to decide whether use grdimge, grdview or plot. Namely, when the view option is used grdview is choosed and a default vertical scale is assigned. However, sometimes we want a rotated plot, optionally tilted, but not 3D view. In that case use the option flat=true, which forces the use of grdimage.

Examples

# Plot vertical shaded illuminated view of the Mexican hat
julia> G = gmt("grdmath -R-15/15/-15/15 -I0.3 X Y HYPOT DUP 2 MUL PI MUL 8 DIV COS EXCH NEG 10 DIV EXP MUL =");
julia> imshow(G, shade="+a45")

# Same as above but add automatic contours
julia> imshow(G, shade="+a45", contour=true)

# Plot a random heat map
julia> imshow(rand(128,128))

# Display a web downloaded jpeg image wrapped into a sinusoidal projection
julia> imshow("http://larryfire.files.wordpress.com/2009/07/untooned_jessicarabbit.jpg", region="d", frame="g", proj="I15", img_in="r", fmt=:jpg)

See also: grdimage

GMT.ind2rgbMethod
I = ind2rgb(I)

Convert an indexed image I to RGB. It uses the internal colormap to do the conversion.

GMT.intlutMethod
intlut(I, lut)

Creates an array containing new values of I based on the lookup table, lut. I can be a GMTimage or an uint matrix. The types of I and lut must be the same and the number of elements of lut is eaqual to intmax of that type. E.g. if eltype(lut) == UInt8 then it must contain 256 elements.

Returns

An object of the same type as I

GMT.invgeodMethod
d, az1, az2 = invgeod(lonlat1::Vector{<:Real}, lonlat2::Vector{<:Real}; proj::String="", s_srs::String="", epsg::Integer=0)

Solve the inverse geodesic problem.

Args:

  • lonlat1: - coordinates of point 1 in the given projection
  • lonlat2: - coordinates of point 2 in the given projection
  • proj or s_srs: - the given projection whose ellipsoid we move along. Can be a proj4 string or an WKT
  • epsg: - Alternative way of specifying the projection [Default is WGS84]

Returns

dist - distance between point 1 and point 2 (meters). azi1 - azimuth at point 1 (degrees) ∈ [-180, 180) azi2 - (forward) azimuth at point 2 (degrees) ∈ [-180, 180)

Remarks:

If either point is at a pole, the azimuth is defined by keeping the longitude fixed, writing lat = 90 +/- eps, and taking the limit as eps -> 0+.

GMT.inwhichpolygonMethod
inwhichpolygon(D::Vector{GMTdataset}, point::Matrix{Real})

or

inwhichpolygon(D::Vector{GMTdataset}, x, y)

Finds the IDs of the polygons enclosing the query points in point. Each row in the matrix point contains the coordinates of a query point. Query points that don't fall in any polygon get an ID = 0. Returns either an $Int$ or a $Vector{Int}$ depending on the number of input quiery points.

  • D: A Vector of GMTdadaset defining the polygons.
  • point: A Mx2 matrix or a two elements vector with the x and y point coordinates.
  • x, y: Specifies the x-coordinates and y-coordinates of 2-D query points as separate vectors (or two scalars).

Example:

pts = [[1 2 3;1 2 3;1 2 3][:] [1 1 1;2 2 2; 3 3 3][:]];
D = triplot(pts, noplot=true);
points = [2.4 1.2; 1.4 1.4];
ids = inwhichpolygon(D, points);
# Plot the triangulation and the query points.
plot(D)
plot!(D[ids[1]], fill=:grey)
plot!(D[ids[2]], fill=:green)
plot!(points, marker=:star, ms="12p", fill=:blue, show=true)
GMT.kml2gmtFunction
kml2gmt(cmd0::String="", arg1=nothing, kwargs...)

kml2gmt - Extract GMT table data from Google Earth KML files

Full option list at kml2gmt

Parameters

  • F | select :: [Type => Str] $Arg = s|l|p$

    Specify a particular feature type to output. Choose from points (s), line (l), or polygon (p). By default we output all geometries. (http://docs.generic-mapping-tools.org/latest/kml2gmt.html#f)

  • Z | altitudes :: [Type => Bool]

    Output the altitude coordinates as GMT z coordinates [Default will output just longitude and latitude]. (http://docs.generic-mapping-tools.org/latest/kml2gmt.html#z)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • bo | binary_out :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary output. (http://docs.generic-mapping-tools.org/latest/gmt.html#bo-full)

  • do | nodata_out :: [Type => Str or Number] $Arg = nodata$

    Examine all output columns and if any item equals NAN substitute it with the chosen missing data value. (http://docs.generic-mapping-tools.org/latest/gmt.html#do-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.legendFunction
legend(cmd0::String="", arg1=nothing; kwargs...)

Make legends that can be overlaid on maps. It reads specific legend-related information from input or file file.

Full option list at legend

Parameters

  • B | frame | axis | xaxis yaxis:: [Type => Str]

    Set map boundary frame and axes attributes. (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • C | clearance :: [Type => Str]

    Sets the clearance between the legend frame and the internal items [4p/4p]. (http://docs.generic-mapping-tools.org/latest/legend.html#c)

  • D | pos | position :: [Type => Str] Arg=[g|j|J|n|x]refpoint+wwidth[/height][+jjustify][+lspacing][+odx[/dy]]

    Defines the reference point on the map for the legend using one of four coordinate systems. (http://docs.generic-mapping-tools.org/latest/legend.html#d)

  • F | box :: [Type => Str | Number] Arg=[+cclearances][+gfill][+i[[gap/]pen]][+p[pen]][+r[radius]][+s[[dx/dy/][shade]]]

    Without further options, draws a rectangular border around the legend using MAPFRAMEPEN. (http://docs.generic-mapping-tools.org/latest/legend.html#f)

  • M :: [Type => Bool]

    Modern mode only: (http://docs.generic-mapping-tools.org/latest/legend.html#m)

  • S | scale :: [Type => Number]

    Scale all symbol sizes by a common scale (http://docs.generic-mapping-tools.org/latest/legend.html#s)

  • T | leg_file :: [Type => Str]

    Modern mode only: Write hidden legend specification file to fname. (http://docs.generic-mapping-tools.org/latest/legend.html#t)

  • Jz | zscale | zsize :: [Type => String]

  • P | portrait :: [Type => Bool or []]

    Tell GMT to NOT draw in portrait mode (that is, make a Landscape plot)

  • U | time_stamp | timestamp :: [Type => Str or Bool or []] $Arg = [[just]/dx/dy/][c|label]$

    Draw GMT time stamp logo on plot. (http://docs.generic-mapping-tools.org/latest/gmt.html#u-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • X | x_offset | xshift :: [Type => Str] $Arg = [a|c|f|r][x-shift[u]]$

  • Y | y_offset | yshift :: [Type => Str] $Arg = [a|c|f|r][y-shift[u]]$

    Shift plot origin relative to the current origin by (x-shift,y-shift) and optionally append the length unit (c, i, or p). (http://docs.generic-mapping-tools.org/latest/gmt.html#xy-full)

  • p | view | perspective :: [Type => Str or List] $Arg = [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]$

    Selects perspective view and sets the azimuth and elevation of the viewpoint [180/90]. (http://docs.generic-mapping-tools.org/latest/gmt.html#perspective-full)

  • q | inrow | inrows :: [Type => Str] $Arg = [i|o][~]rows[+ccol][+a|f|s]$

    Select specific data rows to be read (-qi [Default]) or written (-qo) [all]. (http://docs.generic-mapping-tools.org/latest/gmt.html#q-full)

  • t | alpha | transparency :: [Type => Str] $Arg = transp$

    Set PDF transparency level for an overlay, in (0-100] percent range. [Default is 0, i.e., opaque]. (http://docs.generic-mapping-tools.org/latest/gmt.html#t-full)

  • savefig | figname | name :: [Type => Str]

    Save the figure with the figname=name.ext where ext chooses the figure format (e.g. figname="name.png")

GMT.linesFunction
lines(cmd0::String="", arg1=nothing; decorated=(...), kwargs...)

Reads a file or (x,y) pairs and plots a collection of different line with decorations

  • B | frame | axis | xaxis yaxis:: [Type => Str]

    Set map boundary frame and axes attributes. (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • W | pen | line_attrib :: [Type => Str]

    Set pen attributes for lines or the outline of symbols (http://docs.generic-mapping-tools.org/latest/plot.html#w)

  • savefig | figname | name :: [Type => Str]

    Save the figure with the figname=name.ext where ext chooses the figure format (e.g. figname="name.png")

Examples:

lines([0, 10]; [0, 20], limits=(-2,12,-2,22), proj="M2.5", pen=1, fill=:red,
	  decorated=(dist=(val=1,size=0.25), symbol=:box), show=true)

lines(x -> cos(x) * x, y -> sin(y) * y, linspace(0,2pi,100), region=(-4,7,-5.5,2.5), lw=2, lc=:sienna,
      decorated=(quoted=true, const_label=" In Vino Veritas  - In Aqua, Rãs & Toads", font=(25,"Times-Italic"),
                 curved=true, pen=(0.5,:red)), aspect=:equal, fmt=:png, show=true)
Function
logo(cmd0::String=""; kwargs...)

Plots the GMT logo on a map. By default, the GMT logo is 5 cm wide and 2.5 cm high and will be positioned relative to the current plot origin. Use various options to change this and to place a transparent or opaque rectangular map panel behind the GMT logo.

Full option list at gmtlogo

Parameters

  • D | pos | position :: [Type => Str]

    Sets reference point on the map for the image using one of four coordinate systems. (http://docs.generic-mapping-tools.org/latest/gmtlogo.html#d)

  • F | box :: [Type => Str]

    Without further options, draws a rectangular border around the GMT logo using MAP_FRAME_PEN. or map rose (T) (http://docs.generic-mapping-tools.org/latest/gmtlogo.html#f)

  • julia :: [Type => Number]

    Create the Julia instead of the GMT logo. Provide circle diameter in centimeters

  • GMTjulia :: [Type => Number]

    Create the GMT Julia GMT logo. Provide circle diameter in centimeters

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • Jz | zscale | zsize :: [Type => String]

  • P | portrait :: [Type => Bool or []]

    Tell GMT to NOT draw in portrait mode (that is, make a Landscape plot)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • U | time_stamp | timestamp :: [Type => Str or Bool or []] $Arg = [[just]/dx/dy/][c|label]$

    Draw GMT time stamp logo on plot. (http://docs.generic-mapping-tools.org/latest/gmt.html#u-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • X | x_offset | xshift :: [Type => Str] $Arg = [a|c|f|r][x-shift[u]]$

  • Y | y_offset | yshift :: [Type => Str] $Arg = [a|c|f|r][y-shift[u]]$

    Shift plot origin relative to the current origin by (x-shift,y-shift) and optionally append the length unit (c, i, or p). (http://docs.generic-mapping-tools.org/latest/gmt.html#xy-full)

  • t | alpha | transparency :: [Type => Str] $Arg = transp$

    Set PDF transparency level for an overlay, in (0-100] percent range. [Default is 0, i.e., opaque]. (http://docs.generic-mapping-tools.org/latest/gmt.html#t-full)

  • savefig | figname | name :: [Type => Str]

    Save the figure with the figname=name.ext where ext chooses the figure format (e.g. figname="name.png")

  • Example, make a GMT Julia logo with circles of 1 cm: logo(GMTjulia=1, show=true)

GMT.lonlat2xyFunction
lonlat2xy(lonlat::Matrix{<:Real}; t_srs, s_srs="+proj=longlat +datum=WGS84")

or

lonlat2xy(D::GMTdataset; t_srs, s_srs="+proj=longlat +datum=WGS84")

Computes the forward projection from LatLon to XY in the given projection. The input is assumed to be in WGS84. If it isn't, pass the appropriate projection info via the s_srs option (PROJ4, WKT, EPSG).

Parameters

  • lonlat: The input data. It can be a Matrix, or a GMTdataset (or vector of it)
  • t_srs: The destiny projection system. This can be a PROJ4, a WKT string or EPSG code

Returns

A Matrix if input is a Matrix or a GMTdadaset if input had that type

GMT.loxodromeMethod
function loxodrome(lon1,lat1,lon2,lat2; step=0, unit=:m, np=0, proj::String="", epsg::Integer=0)

or

function loxodrome(D; step=0, unit=:m, np=0, proj::String="", epsg::Integer=0)

Generate a loxodrome (rhumb line) on an ellipsoid. Input data can be two or more points. In later case each line segment is descretized at step increments,

Parameters

  • D: - the input points. This can either be a 2x2 matrix or a GMTdataset. Note that only the first 2 points are used.
  • step: - Incremental distance at which the segment line is descretized in meters(the default), but see unit
  • unit: - If step is not in meters use one of unit=:km, or unit=:Nautical or unit=:Miles
  • np: - Number of intermediate points to be generated between end points (alternative to step)
  • proj - If line data is in Cartesians but with a known projection pass in a PROJ4 string
  • epsg - Same as proj but using an EPSG code

Returns

A Mx2 matrix with the on lat of the points along the loxodrome when input is a matrix or the 2 pairs of points. A GMTdataset when the input is GMTdataset.

Example: Compute an loxodrome between points (0,0) and (30,50) discretized at 100 km steps.

loxo = loxodrome([0 0; 30 50], step=100, unit=:k);
GMT.loxodrome_directFunction
loxodrome_direct(lon, lat, azimuth, distance, a=6378137.0, f=0.0033528106647474805)

Compute the direct problem of a loxodrome on the ellipsoid.

Given latitude and longitude of P1, azimuth a12 of the loxodrome P1P2 and the arc length s along the loxodrome curve, compute the latitude and longitude of P2.

Args:

  • lon, lat: - longitude, latitude (degrees) of starting point.
  • azimuth: - azimuth (degrees)
  • distance: - distance to move from (lat,lon) in meters
  • a - major axis of the ellipsoid (meters). Default values for WGS84
  • f - flattening od the ellipsoid (default = 1 / 298.257223563)

Returns

  • [lon lat] of destination after moving for [distance] metres in [azimuth] direction.

Example: Compute the end point at a bearing of 45 degrees 10000 meters from point 0,0

loxo = loxodrome_direct(0,0,45, 10000)
GMT.loxodrome_inverseFunction
function loxodrome_inverse(lon1, lat1, lon2, lat2, a=6378137.0, f=0.0033528106647474805)

Compute the inverse problem of a loxodrome on the ellipsoid.

Given latitudes and longitudes of P1 and P2 on the ellipsoid, compute the azimuth a12 of the loxodrome P1P2, the arc length s along the loxodrome curve.

Args:

  • lon1, lat1, lon2, lat2: - longitude and latitude of starting and end points (degrees).
  • a - major axis of the ellipsoid (meters). Default values for WGS84
  • f - flattening od the ellipsoid (default = 1 / 298.257223563)

Returns

  • Distance (meters) and azimuth from P1 to P2

Example: Compute the distance and azimuth beyween points (0,0) and (5,5)

dist, azim = loxodrome_inverse(0,0,5,5)
GMT.makecptMethod
makecpt(cmd0::String="", arg1=nothing; kwargs...)

or

makecpt(name::Symbol; kwargs...)

Make static color palette tables (CPTs). The second form accepts a name of one of the GMT CPT defaults.

Full option list at makecpt

  • A | alpha | transparency :: [Type => Str]

    Sets a constant level of transparency (0-100) for all color slices. (http://docs.generic-mapping-tools.org/latest/makecpt.html#a)

  • C | color | colormap | cmap | colorscale :: [Type => Str] $Arg = [cpt |master[+izinc] |color1,color2[,*color3*,…]]$

    Give a CPT name or specify -Ccolor1,color2[,color3,...] to build a linear continuous CPT from those colors automatically. (http://docs.generic-mapping-tools.org/latest/grdimage.html#c)

  • D | bg | background :: [Type => Str | []] Arg = [i|o]

    Select the back- and foreground colors to match the colors for lowest and highest z-values in the output CPT. (http://docs.generic-mapping-tools.org/latest/makecpt.html#d)

  • E | nlevels :: [Type => Int | []] Arg = [nlevels]

    Implies reading data table(s) from file or arrays. We use the last data column to determine the data range (http://docs.generic-mapping-tools.org/latest/makecpt.html#e)

  • F | color_model :: [Type => Str | []] Arg = [R|r|h|c][+c]]

    Force output CPT to written with r/g/b codes, gray-scale values or color name. (http://docs.generic-mapping-tools.org/latest/makecpt.html#f)

  • G | truncate :: [Type => Str] Arg = zlo/zhi

    Truncate the incoming CPT so that the lowest and highest z-levels are to zlo and zhi. (http://docs.generic-mapping-tools.org/latest/makecpt.html#g)

  • H | save :: [Type => Bool]

    Modern mode only: Write the CPT to disk [Default saves the CPT as the session current CPT]. Required for scripts used to make animations via movie where we must pass named CPT files. (http://docs.generic-mapping-tools.org/latest/makecpt.html#h)

  • I | inverse | reverse :: [Type => Str] Arg = [c][z]

    Reverse the sense of color progression in the master CPT. (http://docs.generic-mapping-tools.org/latest/makecpt.html#i)

  • M | overrule_bg :: [Type => Bool]

    Overrule background, foreground, and NaN colors specified in the master CPT with the values of the parameters COLORBACKGROUND, COLORFOREGROUND, and COLOR_NAN. (http://docs.generic-mapping-tools.org/latest/makecpt.html#m)

  • N | no_bg | nobg :: [Type => Bool]

    Do not write out the background, foreground, and NaN-color fields. (http://docs.generic-mapping-tools.org/latest/makecpt.html#n)

  • Q | log :: [Type => Bool | Str] Arg = [i|o]

    Selects a logarithmic interpolation scheme [Default is linear]. (http://docs.generic-mapping-tools.org/latest/makecpt.html#q)

  • S | auto :: [Type => Bool | Str] Arg = [mode]

    Determine a suitable range for the -T option from the input table(s) (or stdin). (http://docs.generic-mapping-tools.org/latest/makecpt.html#s)

  • T | range :: [Type => Str] Arg = [min/max/inc[+b|l|n]|file|list]

    Defines the range of the new CPT by giving the lowest and highest z-value and interval. (http://docs.generic-mapping-tools.org/latest/makecpt.html#t)

  • W | wrap | categorical :: [Type => Bool | Str | []] Arg = [w]

    Do not interpolate the input color table but pick the output colors starting at the beginning of the color table, until colors for all intervals are assigned. (http://docs.generic-mapping-tools.org/latest/makecpt.html#w)

  • Z | continuous :: [Type => Bool]

    Creates a continuous CPT [Default is discontinuous, i.e., constant colors for each interval]. (http://docs.generic-mapping-tools.org/latest/makecpt.html#z)

  • bi | binary_in :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary format for primary input (secondary inputs are always ASCII). (http://docs.generic-mapping-tools.org/latest/gmt.html#bi-full)

  • di | nodata_in :: [Type => Str or Number] $Arg = nodata$

    Examine all input columns and if any item equals nodata we interpret this value as a missing data item and substitute the value NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#di-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

GMT.mapprojectFunction
mapproject(cmd0::String="", arg1=nothing, kwargs...)

Forward and inverse map transformations, datum conversions and geodesy.

Full option list at mapproject

Parameters

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • A | origin :: [Type => Str] $Arg = b|B|f|F|o|O[lon0/lat0][+v]$

    Calculate azimuth along track or to the optional fixed point set with lon0/lat0. (http://docs.generic-mapping-tools.org/latest/mapproject.html#a)

  • C | center :: [Type => Str | List | []] $Arg = [dx/dy]$

    Set center of projected coordinates to be at map projection center [Default is lower left corner]. (http://docs.generic-mapping-tools.org/latest/mapproject.html#c)

  • D | override_units :: [Type => Str] $Arg = c|i|p$

    Temporarily override PROJLENGTHUNIT and use c (cm), i (inch), or p (points) instead. (http://docs.generic-mapping-tools.org/latest/mapproject.html#d)

  • E | geod2ecef | ecef :: [Type => Str | []] $Arg = [datum]$

    Convert from geodetic (lon, lat, height) to Earth Centered Earth Fixed (ECEF) (x,y,z) coordinates. (http://docs.generic-mapping-tools.org/latest/mapproject.html#e)

  • F | one2one :: [Type => Str | []] $Arg = [unit]$

    Force 1:1 scaling, i.e., output (or input, see I) data are in actual projected meters. (http://docs.generic-mapping-tools.org/latest/mapproject.html#f)

  • G | track_distances :: [Type => Str | List] $Arg = [lon0/lat0][+a][+i][+u[+|-]unit][+v]$

    Calculate distances along track or to the optional fixed point set with G="lon0/lat0". (http://docs.generic-mapping-tools.org/latest/mapproject.html#g)

  • I | inverse :: [Type => Bool]

    Do the Inverse transformation, i.e., get (longitude,latitude) from (x,y) data. (http://docs.generic-mapping-tools.org/latest/mapproject.html#i)

  • L | dist2line :: [Type => Str | NamedTuple] $Arg = line.xy[+u[+|-]unit][+p] | (line=Matrix, unit=x, fractional_pt=_,cartesian=true, projected=true)$

    Determine the shortest distance from the input data points to the line(s) given in the ASCII multisegment file line.xy. (http://docs.generic-mapping-tools.org/latest/mapproject.html#l)

  • N | geod2aux :: [Type => Str | []] $Arg = [a|c|g|m]$

    Convert from geodetic latitudes to one of four different auxiliary latitudes (longitudes are unaffected). (http://docs.generic-mapping-tools.org/latest/mapproject.html#n)

  • Q | list :: [Type => Str | []] $Arg = [d|e]$

    List all projection parameters. To only list datums, use Q=:d, to only list ellipsoids, use Q=:e. (http://docs.generic-mapping-tools.org/latest/mapproject.html#q)

  • S | supress :: [Type => Bool]

    Suppress points that fall outside the region. (http://docs.generic-mapping-tools.org/latest/mapproject.html#s)

  • T | change_datum :: [Type => Str] $Arg = [h]from[/to]$

    Coordinate conversions between datums from and to using the standard Molodensky transformation. (http://docs.generic-mapping-tools.org/latest/mapproject.html#t)

  • W | map_size :: [Type => Str | []] $Arg = [w|h]$

    Prints map width and height on standard output. No input files are read. (http://docs.generic-mapping-tools.org/latest/mapproject.html#w)

  • Z | travel_times :: [Type => Str | Number] $Arg = [speed][+a][+i][+f][+tepoch]$

    Calculate travel times along track as specified with -G. (http://docs.generic-mapping-tools.org/latest/mapproject.html#z)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • b | binary :: [Type => Str]

    (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • d | nodata :: [Type => Str or Number] $Arg = [i|o]nodata$

    Control how user-coded missing data values are translated to official NaN values in GMT. (http://docs.generic-mapping-tools.org/latest/gmt.html#d-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • g | gap :: [Type => Str] $Arg = [a]x|y|d|X|Y|D|[col]z[+|-]gap[u]$

    Examine the spacing between consecutive data points in order to impose breaks in the line. (http://docs.generic-mapping-tools.org/latest/gmt.html#g-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • o | outcols | outcol :: [Type => Str] $Arg = cols[,…]$

    Select specific data columns for primary output, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#ocols-full)

  • p | view | perspective :: [Type => Str or List] $Arg = [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]$

    Selects perspective view and sets the azimuth and elevation of the viewpoint [180/90]. (http://docs.generic-mapping-tools.org/latest/gmt.html#perspective-full)

  • s | skiprows | skip_NaN :: [Type => Str] $Arg = [cols][a|r]$

    Suppress output for records whose z-value equals NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#s-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.maskFunction
mask(cmd0::String="", arg1=nothing; kwargs...)

Reads (length,azimuth) pairs from file and plot a windmask diagram.

Full option list at psmask

Parameters

  • I | inc | increment | spacing :: [Type => Str] $Arg = xinc[unit][+e|n][/yinc[unit][+e|n]]]$

    x_inc [and optionally y_inc] is the grid spacing. Optionally, append an increment unit. (http://docs.generic-mapping-tools.org/latest/mask.html#i)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • B | frame | axis | xaxis yaxis:: [Type => Str]

    Set map boundary frame and axes attributes. (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • C | endclippath :: [Type => Bool]

    Mark end of existing clip path. No input file is needed. (http://docs.generic-mapping-tools.org/latest/mask.html#c)

  • D | dump :: [Type => Str]

    Dump the (x,y) coordinates of each clipping polygon to one or more output files (or stdout if template is not given). (http://docs.generic-mapping-tools.org/latest/mask.html#d)

  • F | oriented_polygons :: [Type => Str | []]

    Force clip contours (polygons) to be oriented so that data points are to the left (-Fl [Default]) or right (-Fr) (http://docs.generic-mapping-tools.org/latest/mask.html#f)

  • G | fill :: [Type => Number | Str]

    Set fill shade, color or pattern for positive and/or negative masks [Default is no fill]. (http://docs.generic-mapping-tools.org/latest/mask.html#g)

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • Jz | zscale | zsize :: [Type => String]

  • L | node_grid :: [Type => Str]

    Save the internal grid with ones (data constraint) and zeros (no data) to the named nodegrid. (http://docs.generic-mapping-tools.org/latest/mask.html#l)

  • N | invert :: [Type => Bool]

    Invert the sense of the test, i.e., clip regions where there is data coverage. (http://docs.generic-mapping-tools.org/latest/mask.html#n)

  • P | portrait :: [Type => Bool or []]

    Tell GMT to NOT draw in portrait mode (that is, make a Landscape plot)

  • Q | cut_number :: [Type => Number | Str]

    Do not dump polygons with less than cut number of points [Dumps all polygons]. (http://docs.generic-mapping-tools.org/latest/mask.html#q)

  • S | search_radius :: [Type => Number | Str]

    Sets radius of influence. Grid nodes within radius of a data point are considered reliable. (http://docs.generic-mapping-tools.org/latest/mask.html#s)

  • T | tiles :: [Type => Bool]

    Plot tiles instead of clip polygons. Use -G to set tile color or pattern. Cannot be used with -D. (http://docs.generic-mapping-tools.org/latest/mask.html#t)

  • U | time_stamp | timestamp :: [Type => Str or Bool or []] $Arg = [[just]/dx/dy/][c|label]$

    Draw GMT time stamp logo on plot. (http://docs.generic-mapping-tools.org/latest/gmt.html#u-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • X | x_offset | xshift :: [Type => Str] $Arg = [a|c|f|r][x-shift[u]]$

  • Y | y_offset | yshift :: [Type => Str] $Arg = [a|c|f|r][y-shift[u]]$

    Shift plot origin relative to the current origin by (x-shift,y-shift) and optionally append the length unit (c, i, or p). (http://docs.generic-mapping-tools.org/latest/gmt.html#xy-full)

  • bi | binary_in :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary format for primary input (secondary inputs are always ASCII). (http://docs.generic-mapping-tools.org/latest/gmt.html#bi-full)

  • di | nodata_in :: [Type => Str or Number] $Arg = nodata$

    Examine all input columns and if any item equals nodata we interpret this value as a missing data item and substitute the value NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#di-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • p | view | perspective :: [Type => Str or List] $Arg = [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]$

    Selects perspective view and sets the azimuth and elevation of the viewpoint [180/90]. (http://docs.generic-mapping-tools.org/latest/gmt.html#perspective-full)

  • r | reg | registration :: [Type => Bool or []]

    Force pixel node registration [Default is gridline registration]. (http://docs.generic-mapping-tools.org/latest//gmt.html#r-full)

  • t | alpha | transparency :: [Type => Str] $Arg = transp$

    Set PDF transparency level for an overlay, in (0-100] percent range. [Default is 0, i.e., opaque]. (http://docs.generic-mapping-tools.org/latest/gmt.html#t-full)

  • w | wrap | cyclic :: [Type => Str or Number] $Arg = [[-]n]$

    Convert input records to a cyclical coordinate. (http://docs.generic-mapping-tools.org/latest/gmt.html#w-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.mat2dsMethod
D = mat2ds(mat [,txt]; x=nothing, text=nothing, multi=false, geom=0, kwargs...)

Take a 2D mat array and convert it into a GMTdataset. x is an optional coordinates vector (must have the same number of elements as rows in mat). Use x=:ny to generate a coords array 1:n_rows of mat.

  • txt: Return a Text record which is a Dataset with data = Mx2 and text in third column. The $text$ can be an array with same size as $mat$ rows or a string (will be reapeated n_rows times.)
  • x: An optional vector with the xx coordinates
  • hdr: optional String vector with either one or n_rows multisegment headers.
  • color: optional array of strings with color names/values. Its length can be smaller than n_rows, case in which colors will be cycled.
  • linethick or lt: for selecting different line thicknesses. Works like color, but should be a vector of numbers, or just a single number that is then applied to all lines.
  • fill: Optional string array with color names or array of "patterns".
  • ls or linestyle: Line style. A string or an array of strings with $length = size(mat,1)$ with line styles.
  • lt or linethick: Line thickness.
  • multi: When number of columns in mat > 2, or == 2 and x != nothing, make an multisegment Dataset with first column and 2, first and 3, etc. Convenient when want to plot a matrix where each column is a line.
  • datatype: Keep the original data type of mat. Default, converts to Float64.
  • geom: The data geometry. By default we set $wkbUnknown$ but try to do some basic guess.
  • proj or proj4: A proj4 string for dataset SRS.
  • wkt: A WKT SRS.
  • colnames: Optional string vector with names for each column of mat.
GMT.mat2gridFunction
G = mat2grid(mat; reg=nothing, x=[], y=[], v=[], hdr=nothing, proj4::String="", wkt::String="", tit::String="",
             rem::String="", cmd::String="", names::Vector{String}=String[], scale::Float32=1f0, offset::Float32=0f0)

Take a 2/3D mat array and a HDR 1x9 [xmin xmax ymin ymax zmin zmax reg xinc yinc] header descriptor and return a grid GMTgrid type. Alternatively to HDR, provide a pair of vectors, x & y, with the X and Y coordinates. Optionaly add a v vector with vertical coordinates if mat is a 3D array and one wants to create a $cube$. Optionaly, the HDR arg may be ommited and it will computed from mat alone, but then x=1:ncol, y=1:nrow When HDR is not used, REG == nothing [default] means create a gridline registration grid and REG == 1, or REG="pixel" a pixel registered grid.

For 3D arrays the names option is used to give a description for each layer (also saved to file when using a GDAL function).

The scale and offset options are used when mat is an Integer type and we want to save the grid with an scale/offset.

Other methods of this function do:

G = mat2grid([val]; hdr=hdr_vec, reg=nothing, proj4::String="", wkt::String="", tit::String="", rem::String="")

Create Float GMTgrid with size, coordinates and increment determined by the contents of the HDR var. This array, which is now MANDATORY, has either the same meaning as above OR, alternatively, containng only [xmin xmax ymin ymax xinc yinc] VAL is the value that will be fill the matrix (default VAL = Float32(0)). To get a Float64 array use, for example, VAL = 1.0 Ay other non Float64 will be converted to Float32

Example: mat2grid(1, hdr=[0. 5 0 5 1 1])

G = mat2grid(f::Function, x, y; reg=nothing, proj4::String="", wkt::String="", epsg::Int=0, tit::String="", rem::String="")

Where F is a function and X,Y the vectors coordinates defining it's domain. Creates a Float32 GMTgrid with size determined by the sizes of the X & Y vectors.

Example: f(x,y) = x^2 + y^2;  G = mat2grid(f, x = -2:0.05:2, y = -2:0.05:2)

G = mat2grid(f::String, x=[], y=[])

Whre F is a pre-set function name. Currently available:

  • "ackley", "eggbox", "sombrero", "parabola" and "rosenbrock"

X,Y are vectors coordinates defining the function's domain, but default values are provided for each function. creates a Float32 GMTgrid.

Example: G = mat2grid("sombrero")
GMT.mat2imgFunction
I = mat2img(mat::Array{<:Unsigned}; x=[], y=[], hdr=nothing, proj4="", wkt="", cmap=nothing, kw...)

Take a 2D 'mat' array and a HDR 1x9 [xmin xmax ymin ymax zmin zmax reg xinc yinc] header descriptor and return a GMTimage type. Alternatively to HDR, provide a pair of vectors, x & y, with the X and Y coordinates. Optionaly, the HDR arg may be ommited and it will computed from 'mat' alone, but then x=1:ncol, y=1:nrow When 'mat' is a 3D UInt16 array we automatically compute a UInt8 RGB image. In that case 'cmap' is ignored. But if no conversion is wanted use option noconv=true

I = mat2img(mat::Array{UInt16}; x=[], y=[], hdr=nothing, proj4::String="", wkt::String="", kw...)

Take a mat array of UInt16 and scale it down to UInt8. Input can be 2D or 3D. If the kw variable stretch is used, we stretch the intervals in stretch to [0 255]. Use this option to stretch the image histogram. If stretch is a scalar, scale the values > stretch to [0 255]

  • stretch = [v1 v2] scales all values >= v1 && <= v2 to [0 255]
  • stretch = [v1 v2 v3 v4 v5 v6] scales firts band >= v1 && <= v2 to [0 255], second >= v3 && <= v4, same for third
  • stretch = :auto | "auto" | true | 1 will do an automatic stretching from values obtained from histogram thresholds

The kw... kwargs search for [:layout :mem_layout], [:names] and [:metadata]

GMT.mbgetdataFunction
mbgetdata(cmd0::String=""; kwargs...)

Extract bathymetry, sidescan or amplitude data from datafiles.

Parameters

  • A | flagged :: [Type => Number] $Arg = value$

    Replace flagged beans with NaN. Use -A<val> to assign a constant value to the flagged beans.

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • C | datatype | data_type :: [Type => Number | Str | Tuple] $Arg = 0 or "a"$

    Output SideScan, or amplitude, instead of bathymetry. This case ignores A

  • D | scaling :: [Type => Str | Tuple] $Arg = <mode>/<ampscale>/<ampmin>/<ampmax>$

    Sets scaling of beam amplitude or sidescan pixel values which can be applied before plotting.

  • F | format :: [Type => Int]

    Sets the format for the input swath sonar data using MBIO integer format identifiers.

  • S | speed :: [Type => Number]

    Sets the parameters controlng simulated illumination of bathymetry.

  • T | timegap :: [Type => number]

    Sets the maximum time gap in minutes between adjacent pings before being considered a gap.

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • n | interp | interpolation :: [Type => Str] $Arg = [b|c|l|n][+a][+bBC][+c][+tthreshold]$

    Select grid interpolation mode by adding b for B-spline smoothing, c for bicubic interpolation, l for bilinear interpolation, or n for nearest-neighbor value. (http://docs.generic-mapping-tools.org/latest/gmt.html#n-full)

  • t | alpha | transparency :: [Type => Str] $Arg = transp$

    Set PDF transparency level for an overlay, in (0-100] percent range. [Default is 0, i.e., opaque]. (http://docs.generic-mapping-tools.org/latest/gmt.html#t-full)

GMT.mbimportFunction
mbimport(cmd0::String="", arg1=nothing, arg2=nothing, arg3=nothing; kwargs...)

Produces a gray-shaded (or colored) map by plotting rectangles centered on each grid node and assigning them a gray-shade (or color) based on the z-value.

Parameters

  • A | footprint :: [Type => Str | Tuple] $Arg = factor/mode/depth$

    Determines how the along-track dimension of the beam or pixel footprints is calculated.

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • C | color | colormap | cmap | colorscale :: [Type => Str] $Arg = [cpt |master[+izinc] |color1,color2[,*color3*,…]]$

    Give a CPT name or specify -Ccolor1,color2[,color3,...] to build a linear continuous CPT from those colors automatically. (http://docs.generic-mapping-tools.org/latest/grdimage.html#c)

  • D | scaling :: [Type => Str | Tuple] $Arg = mode/scale/min/max$

    Sets scaling of beam amplitude or sidescan pixel values which can be applied before plotting.

  • E | dpi :: [Type => Int]

    Sets the resolution of the projected image that will be created.

  • G | bit_color :: [Type => Str | Tuple] $Arg = magnitude/azimuth or magnitude/median$

    Sets the parameters controlng simulated illumination of bathymetry.

  • S | speed :: [Type => Number]

    Sets the minimum speed in km/hr (5.5 kts ~ 10 km/hr) allowed in the input data.

  • T | timegap :: [Type => number]

    Sets the maximum time gap in minutes between adjacent pings before being considered a gap.

  • Z | type_plot :: [Type => Str | Number]

    Sets the style of the plot.

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • U | time_stamp | timestamp :: [Type => Str or Bool or []] $Arg = [[just]/dx/dy/][c|label]$

    Draw GMT time stamp logo on plot. (http://docs.generic-mapping-tools.org/latest/gmt.html#u-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • X | x_offset | xshift :: [Type => Str] $Arg = [a|c|f|r][x-shift[u]]$

  • Y | y_offset | yshift :: [Type => Str] $Arg = [a|c|f|r][y-shift[u]]$

    Shift plot origin relative to the current origin by (x-shift,y-shift) and optionally append the length unit (c, i, or p). (http://docs.generic-mapping-tools.org/latest/gmt.html#xy-full)

  • n | interp | interpolation :: [Type => Str] $Arg = [b|c|l|n][+a][+bBC][+c][+tthreshold]$

    Select grid interpolation mode by adding b for B-spline smoothing, c for bicubic interpolation, l for bilinear interpolation, or n for nearest-neighbor value. (http://docs.generic-mapping-tools.org/latest/gmt.html#n-full)

  • t | alpha | transparency :: [Type => Str] $Arg = transp$

    Set PDF transparency level for an overlay, in (0-100] percent range. [Default is 0, i.e., opaque]. (http://docs.generic-mapping-tools.org/latest/gmt.html#t-full)

GMT.mblevitusFunction
mblevitus(cmd0::String=""; kwargs...)

Create a water velocity profile which is representative of the mean annual water column for a specified 1 degree by 1 degree region.

Parameters

  • A | all4 :: [Type => Bool]

    Pint also depth, velocity, temperature, salinity.

  • L | location :: [Type => Str | Tuple] $Arg = lon/lat$

    Sets the longitude and latitude of the location of the water velocity profile.

  • O | outfile | out_file :: [Type => Str]

    Write the SVP to <outfile>.

  • H | help :: [Type => Bool]

    Print out program's description.

  • z | z_down :: [Type => Bool]

    Makes Z axes positive down (default here is Z-up).

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

GMT.mbsvplistFunction
mbsvplist(cmd0::String=""; kwargs...)

List water sound velocity profiles in swath sonar data files.

Parameters

  • C | uniquesvp :: [Type => Bool]

    Output the number of unique SVPs in each file.

  • F | format :: [Type => Int]

    Sets the format for the input swath sonar data.

  • M | mode :: [Type => Int] $Arg = 1 or 2 or 3$

    Sets the SVP output mode..

  • S | ssv :: [Type => Bool]

    Sets the minimum speed in km/hr (5.5 kts ~ 10 km/hr) allowed in the input data.

  • Z | firstiszero :: [Type => Bool]

    Sets the style of the plot.

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

GMT.mecaFunction
meca(cmd0::String="", arg1=nothing; kwargs...)

Plot focal mechanisms.

Full option list at meca

Parameters

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • B | frame | axis | xaxis yaxis:: [Type => Str]

    Set map boundary frame and axes attributes. (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • C | offset :: [Type => Bool | Str | GMTcpt]

    Offsets focal mechanisms to the longitude, latitude specified in the last two columns of the input (http://docs.generic-mapping-tools.org/latest/meca.html#c)

  • D | depth_limits :: [Type => Str | Tuple]

    Plots events between depmin and depmax. (http://docs.generic-mapping-tools.org/latest/meca.html#d)

  • E | fill_extensive :: [Type => Str | Number]

    Selects filling of extensive quadrants. [Default is white]. (http://docs.generic-mapping-tools.org/latest/meca.html#e)

  • Fa | Fe | Fg | Fo | Fp | Fr | Ft | Fz :: [Type => ]

    Sets one or more attributes. (http://docs.generic-mapping-tools.org/latest/meca.html#f)

  • G | fill :: [Type => Str | Number]

    Selects shade, color or pattern for filling the sectors [Default is no fill]. (http://docs.generic-mapping-tools.org/latest/meca.html#g)

  • P | portrait :: [Type => Bool or []]

    Tell GMT to NOT draw in portrait mode (that is, make a Landscape plot)

  • L | outline_pen | pen_outline :: [Type => Str | Number | Tuple]

    Draws the “beach ball” outline with pen attributes instead of with the default pen set by pen (http://docs.generic-mapping-tools.org/latest/meca.html#l)

  • M | same_size | samesize :: [Type => Bool]

    Use the same size for any magnitude. Size is given with S (http://docs.generic-mapping-tools.org/latest/meca.html#m)

  • N | no_clip | noclip :: [Type => Str | []]

    Do NOT skip symbols that fall outside frame boundary. (http://docs.generic-mapping-tools.org/latest/meca.html#n)

  • Sc|aki | Sc|CMT|gcmt | Sm|mt|moment_tensor | ... :: [Type => Str]

    Selects the meaning of the columns in the input data. (http://docs.generic-mapping-tools.org/latest/meca.html#s)

  • T | nodal :: [Type => Number | Str]

    Plots the nodal planes and outlines the bubble which is transparent. (http://docs.generic-mapping-tools.org/latest/meca.html#t)

  • W | pen :: [Type => Str | Tuple]

    Set pen attributes for all lines and the outline of symbols. (http://docs.generic-mapping-tools.org/latest/meca.html#w)

  • Z | color | cmap :: [Type => Number | Str | GMTcpt]

    Give a CPT and let compressive part color be determined by the z-value in the third column. (http://docs.generic-mapping-tools.org/latest/meca.html#z)

  • U | time_stamp | timestamp :: [Type => Str or Bool or []] $Arg = [[just]/dx/dy/][c|label]$

    Draw GMT time stamp logo on plot. (http://docs.generic-mapping-tools.org/latest/gmt.html#u-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • X | x_offset | xshift :: [Type => Str] $Arg = [a|c|f|r][x-shift[u]]$

  • Y | y_offset | yshift :: [Type => Str] $Arg = [a|c|f|r][y-shift[u]]$

    Shift plot origin relative to the current origin by (x-shift,y-shift) and optionally append the length unit (c, i, or p). (http://docs.generic-mapping-tools.org/latest/gmt.html#xy-full)

  • di | nodata_in :: [Type => Str or Number] $Arg = nodata$

    Examine all input columns and if any item equals nodata we interpret this value as a missing data item and substitute the value NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#di-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • p | view | perspective :: [Type => Str or List] $Arg = [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]$

    Selects perspective view and sets the azimuth and elevation of the viewpoint [180/90]. (http://docs.generic-mapping-tools.org/latest/gmt.html#perspective-full)

  • t | alpha | transparency :: [Type => Str] $Arg = transp$

    Set PDF transparency level for an overlay, in (0-100] percent range. [Default is 0, i.e., opaque]. (http://docs.generic-mapping-tools.org/latest/gmt.html#t-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

Example: Plot a focal mechanism using the Aki & Richards convention

    psmeca([0.0 3.0 0.0 0 45 90 5 0 0], aki=true, fill=:black, region=(-1,4,0,6), proj=:Merc, show=1)

The same but add a Label

    psmeca(mat2ds([0.0 3.0 0.0 0 45 90 5 0 0], "Thrust"), aki=true, fill=:black, region=(-1,4,0,6), proj=:Merc, show=1)
GMT.movieMethod
movie(main; pre=nothing, post=nothing, kwargs...)

Create animation sequences and movies.

Full option list at movie

Parameters

  • main :: [Type => Str]

    Name of a stand-alone GMT.jl script that makes the frame-dependent plot.``

  • C | canvas :: [Type => Str]

    Specify the canvas size used when composing the movie frames. (http://docs.generic-mapping-tools.org/latest/movie.html#c)

  • N | name :: [Type => Str]

    Determines the name of a sub-directory with frame images as well as the final movie file. (http://docs.generic-mapping-tools.org/latest/movie.html#n)

  • T | frames :: [Type => Int | Str]

    Either specify how many image frames to make or supply a file with a set of parameters, one record per frame (i.e., row). (http://docs.generic-mapping-tools.org/latest/movie.html#t)

  • pre :: [Type => Str]

The optional *backgroundscript* file (a GMT.jl script) can be used one or two purposes: (1) It may create files
(such as timefile) that will be needed by mainscript to make the movie, and (2) It may make a static background
plot that should form the background for all frames.
(http://docs.generic-mapping-tools.org/latest/movie.html#s)
  • post :: [Type => Str]

    The optional foregroundscript file (a GMT.jl script) can be used to make a static foreground plot that should be overlain on all frames. (http://docs.generic-mapping-tools.org/latest/movie.html#s)

  • A | gif :: [Type => Str] $Args = [+l[n]][+sstride]$

    Build an animated GIF file. You may specify if the movie should play more than once and if so append how many times to repeat. (http://docs.generic-mapping-tools.org/latest/movie.html#a)

  • D | frame_rate :: [Type => Int]

    Set the display frame rate in frames per seconds for the final animation [24]. (http://docs.generic-mapping-tools.org/latest/movie.html#d)

  • E | titlepage :: [Type => Str | tuple]

    Give a titlepage script that creates a static title page for the movie [no title]. (http://docs.generic-mapping-tools.org/latest/movie.html#e)

  • F | format :: [Type => Str] $Arg = format[+ooptions]$

    Set the format of the final video product. Choose either mp4 (MPEG-4 movie) or webm (WebM movie). (http://docs.generic-mapping-tools.org/latest/movie.html#f)

  • G | fill :: [Type => Str | Int | Touple]

    Set the canvas color or fill before plotting commences [none]. (http://docs.generic-mapping-tools.org/latest/movie.html#g)

  • H | scale :: [Type => Number]

    Temporarily increases the effective dots-per-unit by factor, rasterizes the frame, then downsamples the image by the same factor at the end. (http://docs.generic-mapping-tools.org/latest/movie.html#h)

  • I | includefile :: [Type => Str]

    Insert the contents of includefile into the movie_init script that is accessed by all movie scripts. (http://docs.generic-mapping-tools.org/latest/movie.html#i)

  • K | fading :: [Type => Number | Str | Tuple] $Arg = [+f[i|o]fade[s]][+gfill][+p] ]$

    Add fading in and out for the main animation sequence [no fading]. (http://docs.generic-mapping-tools.org/latest/movie.html#k)

  • L | label :: [Type => Str]

    Automatic labeling of individual frames. (http://docs.generic-mapping-tools.org/latest/movie.html#l)

  • M | cover_page :: [Type => number] $Arg = frame[,format]$

    Select a single frame for a cover page. This frame will be written to the current directory. (http://docs.generic-mapping-tools.org/latest/movie.html#m)

  • P | progress :: [Type => Str | Tuple]

    Automatic placement of progress indicator(s). (http://docs.generic-mapping-tools.org/latest/movie.html#p)

  • Q | debug :: [Type => Bool | Str] $Arg = [s]$

    Debugging: Leave all files and directories we create behind for inspection. (http://docs.generic-mapping-tools.org/latest/movie.html#q)

  • Sb | background :: [Type => Str | Function]

    Optional background script or bg PS file GMT6.1 only

  • Sf | foreground :: [Type => Str | Function]

    Optional foreground script or fg PS file GMT6.1 only

  • W | work_dir :: [Type => Str]

By default, all temporary files and frame PNG file are built in the subdirectory prefix set via **name**.
You can override that by giving another workdir as a relative or full directory path.
(http://docs.generic-mapping-tools.org/latest/movie.html#w)
  • Z | clean :: [Type => Bool]

    Erase the entire name directory after assembling the final movie [Default leaves directory with all images. (http://docs.generic-mapping-tools.org/latest/movie.html#z)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • x | cores | n_threads :: [Type => Str or Number] $Arg = [[-]n]$

    Limit the number of cores to be used in any OpenMP-enabled multi-threaded algorithms. (http://docs.generic-mapping-tools.org/latest/gmt.html#x-full)

GMT.nearneighborFunction
nearneighbor(cmd0::String="", arg1=nothing; kwargs...)

Reads arbitrarily located (x,y,z[,w]) triples [quadruplets] and uses a nearest neighbor algorithm to assign an average value to each node that have one or more points within a radius centered on the node. The average value is computed as a weighted mean of the nearest point from each sector inside the search radius. The weighting function used is w(r) = 1 / (1 + d ^ 2), where d = 3 * r / search_radius and r is distance from the node. This weight is modulated by the weights of the observation points [if supplied].

Full option list at nearneighbor

Parameters

  • I | inc | increment | spacing :: [Type => Str] $Arg = xinc[unit][+e|n][/yinc[unit][+e|n]]]$

    x_inc [and optionally y_inc] is the grid spacing. Optionally, append an increment unit. (http://docs.generic-mapping-tools.org/latest/nearneighbor.html#i)

  • N | sectors | nn | nearest :: [Type => Number | Str | Bool (for nn or nearest)]

    The circular area centered on each node is divided into sectors sectors. (http://docs.generic-mapping-tools.org/latest/nearneighbor.html#n)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • S | search_radius :: [Type => Number]

    Sets the search_radius that determines which data points are considered close to a node. (http://docs.generic-mapping-tools.org/latest/nearneighbor.html#s)

  • E | empty :: [Type => Bool]

    Set the value assigned to empty nodes when G is set [NaN]. (http://docs.generic-mapping-tools.org/latest/nearneighbor.html#e)

  • G | save | outgrid | outfile :: [Type => Str]

    Output grid file name. Note that this is optional and to be used only when saving the result directly on disk. Otherwise, just use the G = nearneighbor(....) form. (http://docs.generic-mapping-tools.org/latest/nearneighbor.html#g)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • W | weights :: [Type => Bool]

    Input data have a 4th column containing observation point weights. (http://docs.generic-mapping-tools.org/latest/nearneighbor.html#w)

  • bi | binary_in :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary format for primary input (secondary inputs are always ASCII). (http://docs.generic-mapping-tools.org/latest/gmt.html#bi-full)

  • di | nodata_in :: [Type => Str or Number] $Arg = nodata$

    Examine all input columns and if any item equals nodata we interpret this value as a missing data item and substitute the value NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#di-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • n | interp | interpolation :: [Type => Str] $Arg = [b|c|l|n][+a][+bBC][+c][+tthreshold]$

    Select grid interpolation mode by adding b for B-spline smoothing, c for bicubic interpolation, l for bilinear interpolation, or n for nearest-neighbor value. (http://docs.generic-mapping-tools.org/latest/gmt.html#n-full)

  • r | reg | registration :: [Type => Bool or []]

    Force pixel node registration [Default is gridline registration]. (http://docs.generic-mapping-tools.org/latest//gmt.html#r-full)

  • w | wrap | cyclic :: [Type => Str or Number] $Arg = [[-]n]$

    Convert input records to a cyclical coordinate. (http://docs.generic-mapping-tools.org/latest/gmt.html#w-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.orthodromeMethod
function orthodrome(D; step=0, unit=:m, np=0, proj::String="", epsg::Integer=0)

Generate a orthodrome line(s) (shortest distace) on an ellipsoid. Input data can be two or more points. In later case each line segment is descretized at step increments,

Parameters

  • D: - the input points. This can either be a GMTdataset (or vector of it), a Mx2 matrix, the name of file that can be read as a GMTdataset by gmtread() or a GDAL AbstractDataset object
  • step: - Incremental distance at which the segment line is descretized in meters(the default), but see unit
  • unit: - If step is not in meters use one of unit=:km, or unit=:Nautical or unit=:Miles
  • np: - Number of intermediate points between poly-line vertices (alternative to step)
  • proj - If line data is in Cartesians but with a known projection pass in a PROJ4 string
  • epsg - Same as proj but using an EPSG code

Returns

A Mx2 matrix with the lon lat of the points along the orthodrome when input is a matrix. A GMT dataset or a vector of it (when input is Vector{GMTdataset}).

Example: Compute an orthodrome between points (0,0) and (30,50) discretized at 100 km steps.

mat = orthodrome([0 0; 30 50], step=100, unit=:k);
GMT.pcolorMethod
pcolor(X, Y, C::Matrix{<:Real}; kwargs...)

Creates a colored cells plot using the values in matrix C. The color of each cell depends on the value of each value of C after consulting a color table (cpt). If a color table is not provided via option cmap=xxx we compute a default one.

  • X, Y: Vectors or 1 row matrices with the x- and y-coordinates for the vertices. The number of elements of X must match the number of columns in C (is using the grid registration model) or exceed it by one (pixel registration). The same for Y and the number of rows in C. Notice that X and Y do not need to be equispaced.
  • X, Y: Matrices with the x- and y-coordinates for the vertices. In this case the if X and Y define an m-by-n grid, then C should be an (m-1)-by-(n-1) matrix, though we also allow it to be m-by-n but we then drop the last row and column from C
  • C: A matrix with the values that will be used to color the cells.
  • kwargs: This form of pcolor is in fact a wrap up of $plot$ so any option of that module can be used here.
  • labels: If this $keyword$ is used then plot the value of each node in the corresponding cell. Use label=n, where $n$ is integer and represents the number of printed decimals. Any other value like $true$, $"y"$ or $:y$ tells the program to guess the number of decimals.
  • font: When label is used one may also control text font settings. Options are a subset of the $text$ attrib option. Namelly, the angle and the $font$. Example: $font=(angle=45, font=(5,:red))$. If not specified, it defaults to $font=(font=(6,:black),)$.
pcolor(G::GMTgrid; kwargs...)

This form takes a grid (or the file name of one) as input an paints it's cell with a constant color.

  • outline: Draw the tile outlines, and specify a custom pen if the default pen is not to your liking.
  • kwargs: This form of pcolor is a wrap of $grdview$ so any option of that module can be used here. One can for example control the tilling option via $grdview's$ $tiles$ option.

Examples

# Create an example grid
G = GMT.peaks(N=21);

pcolor(G, outline=(0.5,:dot), show=true)

# Now use the G x,y coordinates in the non-regular form
pcolor(G.x, G.y, G.z, show=true)

# Add labels to cells using default settings (font size = 6p)
pcolor(G.x, G.y, G.z, labels=:y, show=true)

# Similar to above but now set the number of decimlas in labels as well as it font settings
pcolor(G.x, G.y, G.z, labels=2, font=(angle=45, font=(5,:red)), show=1)

# An irregular grid
X,Y = GMT.meshgrid(-3:6/17:3);
XX = 2*X .* Y;	YY = X.^2 .- Y.^2;
pcolor(XX,YY, reshape(repeat([1:18; 18:-1:1], 9,1), size(XX)), lc=:black, show=true)
GMT.plotMethod
plot(arg1::Array; kwargs...)

reads (x,y) pairs from files [or standard input] and generates PostScript code that will plot lines, polygons, or symbols at those locations on a map.

Full option list at psxy

Parameters

  • A | steps | straight_lines :: [Type => Str]
By default, geographic line segments are drawn as great circle arcs.
To draw them as straight lines, use this option.
(http://docs.generic-mapping-tools.org/latest/plot.html#a)
  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • B | frame | axis | xaxis yaxis:: [Type => Str]

    Set map boundary frame and axes attributes. (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • C | color | colormap | cmap | colorscale :: [Type => Str] $Arg = [cpt |master[+izinc] |color1,color2[,*color3*,…]]$

    Give a CPT name or specify -Ccolor1,color2[,color3,...] to build a linear continuous CPT from those colors automatically. (http://docs.generic-mapping-tools.org/latest/grdimage.html#c)

  • D | shift | offset :: [Type => Str]

    Offset the plot symbol or line locations by the given amounts dx/dy in cm, inch or points. (http://docs.generic-mapping-tools.org/latest/plot.html#d)

  • E | error | error_bars :: [Type => Str]

    Draw symmetrical error bars. (http://docs.generic-mapping-tools.org/latest/plot.html#e)

  • F | conn | connection :: [Type => Str]

    Alter the way points are connected (http://docs.generic-mapping-tools.org/latest/plot.html#f)

  • G | fill | markerfacecolor | MarkerFaceColor | markercolor | mc :: [Type => Str]

    Select color or pattern for filling of symbols or polygons. BUT WARN: the alias 'fill' will set the color of polygons OR symbols but not the two together. If your plot has polygons and symbols, use 'fill' for the polygons and 'markerfacecolor' for filling the symbols. Same applyies for W bellow (http://docs.generic-mapping-tools.org/latest/plot.html#g)

  • I | intens :: [Type => Str | number]

    Use the supplied intens value (in the [-1 1] range) to modulate the fill color by simulating illumination. (http://docs.generic-mapping-tools.org/latest/plot.html#i)

  • L | close | polygon :: [Type => Str]

    Force closed polygons. (http://docs.generic-mapping-tools.org/latest/plot.html#l)

  • N | no_clip | noclip :: [Type => Str or []]

    Do NOT clip symbols that fall outside map border (http://docs.generic-mapping-tools.org/latest/plot.html#n)

  • P | portrait :: [Type => Bool or []]

    Tell GMT to NOT draw in portrait mode (that is, make a Landscape plot)

  • S | symbol | marker | Marker :: [Type => Str]

    Plot symbols (including vectors, pie slices, fronts, decorated or quoted lines). (http://docs.generic-mapping-tools.org/latest/plot.html#s) Alternatively select a sub-set of symbols using the aliases: marker or Marker and values:

    • -, x_dash
    • +, plus
    • a, *, star
    • c, circle
    • d, diamond
    • g, octagon
    • h, hexagon
    • i, v, inverted_tri
    • n, pentagon
    • p, ., point
    • r, rectangle
    • s, square
    • t, ^, triangle
    • x, cross
    • y, y_dash

    and select their sizes with the markersize or size keyword [default is 7p]. The marker size can be a scalar or a vector with same size numeber of rows of data. Units are points unless specified otherwise with (for example for cm) par=(PROJLENGTHUNIT="c")

  • W | pen | markeredgecolor | mec :: [Type => Str]

    Set pen attributes for lines or the outline of symbols (http://docs.generic-mapping-tools.org/latest/plot.html#w) WARNING: the pen attributes will set the pen of polygons OR symbols but not the two together. If your plot has polygons and symbols, use W or pen for the polygons and markeredgecolor for filling the symbols. Similar to S above.

  • U | time_stamp | timestamp :: [Type => Str or Bool or []] $Arg = [[just]/dx/dy/][c|label]$

    Draw GMT time stamp logo on plot. (http://docs.generic-mapping-tools.org/latest/gmt.html#u-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • X | x_offset | xshift :: [Type => Str] $Arg = [a|c|f|r][x-shift[u]]$

  • Y | y_offset | yshift :: [Type => Str] $Arg = [a|c|f|r][y-shift[u]]$

    Shift plot origin relative to the current origin by (x-shift,y-shift) and optionally append the length unit (c, i, or p). (http://docs.generic-mapping-tools.org/latest/gmt.html#xy-full)

  • Z | level :: [Type => Str | NamedTuple] Arg = value|file[+f|+l] | (data=Array|Number, outline=_, fill=_)

    Paint polygons after the level given as a cte or a vector with same size of number of polygons. Needs a color map. (http://docs.generic-mapping-tools.org/latest/plot.html#z)

  • axis | aspect :: [Type => Str]

    When equal to "equal" makes a square plot.

  • a | aspatial :: [Type => Str] $Arg = [col=]name[…]$

    Control how aspatial data are handled in GMT during input and output. (http://docs.generic-mapping-tools.org/latest/gmt.html#aspatial-full)

  • bi | binary_in :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary format for primary input (secondary inputs are always ASCII). (http://docs.generic-mapping-tools.org/latest/gmt.html#bi-full)

  • di | nodata_in :: [Type => Str or Number] $Arg = nodata$

    Examine all input columns and if any item equals nodata we interpret this value as a missing data item and substitute the value NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#di-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • g | gap :: [Type => Str] $Arg = [a]x|y|d|X|Y|D|[col]z[+|-]gap[u]$

    Examine the spacing between consecutive data points in order to impose breaks in the line. (http://docs.generic-mapping-tools.org/latest/gmt.html#g-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • p | view | perspective :: [Type => Str or List] $Arg = [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]$

    Selects perspective view and sets the azimuth and elevation of the viewpoint [180/90]. (http://docs.generic-mapping-tools.org/latest/gmt.html#perspective-full)

  • t | alpha | transparency :: [Type => Str] $Arg = transp$

    Set PDF transparency level for an overlay, in (0-100] percent range. [Default is 0, i.e., opaque]. (http://docs.generic-mapping-tools.org/latest/gmt.html#t-full)

  • w | wrap | cyclic :: [Type => Str or Number] $Arg = [[-]n]$

    Convert input records to a cyclical coordinate. (http://docs.generic-mapping-tools.org/latest/gmt.html#w-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

  • savefig | figname | name :: [Type => Str]

    Save the figure with the figname=name.ext where ext chooses the figure format (e.g. figname="name.png")

GMT.plot3dMethod

plot3d(arg1::Array; kwargs...)

reads (x,y,z) triplets and generates PostScript code that will plot lines, polygons, or symbols at those locations in 3-D.

Full option list at plot3d

Parameters

  • A | steps | straight_lines :: [Type => Str]

    By default, geographic line segments are drawn as great circle arcs. To draw them as straight lines, use this option.

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • Jz | zscale | zsize :: [Type => String]

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • B | frame | axis | xaxis yaxis:: [Type => Str]

    Set map boundary frame and axes attributes. (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • C | color :: [Type => Str]

    Give a CPT or specify -Ccolor1,color2[,color3,...] to build a linear continuous CPT from those colors automatically. (http://docs.generic-mapping-tools.org/latest/plot3d.html#c)

  • D | offset :: [Type => Str]

    Offset the plot symbol or line locations by the given amounts dx/dy. (http://docs.generic-mapping-tools.org/latest/plot3d.html#d)

  • E | error_bars :: [Type => Str]

    Draw symmetrical error bars. (http://docs.generic-mapping-tools.org/latest/plot3d.html#e)

  • F | conn | connection :: [Type => Str]

    Alter the way points are connected (http://docs.generic-mapping-tools.org/latest/plot3d.html#f)

  • G | fill | markerfacecolor | MarkerFaceColor | markercolor | mc :: [Type => Str]

    Select color or pattern for filling of symbols or polygons. BUT WARN: the alias 'fill' will set the color of polygons OR symbols but not the two together. If your plot has polygons and symbols, use 'fill' for the polygons and 'markerfacecolor' for filling the symbols. Same applyies for W bellow (http://docs.generic-mapping-tools.org/latest/plot3d.html#g)

  • I | intens :: [Type => Str or number]

    Use the supplied intens value (in the [-1 1] range) to modulate the fill color by simulating illumination. (http://docs.generic-mapping-tools.org/latest/plot3d.html#i)

  • L | closed_polygon :: [Type => Str]

    Force closed polygons. (http://docs.generic-mapping-tools.org/latest/plot3d.html#l)

  • N | no_clip :: [Type => Str | []]

    Do NOT clip symbols that fall outside map border (http://docs.generic-mapping-tools.org/latest/plot3d.html#n)

  • P | portrait :: [Type => Bool or []]

    Tell GMT to NOT draw in portrait mode (that is, make a Landscape plot)

  • S | symbol | marker | Marker :: [Type => Str]

    Plot symbols (including vectors, pie slices, fronts, decorated or quoted lines). (http://docs.generic-mapping-tools.org/latest/plot3d.html#s) Alternatively select a sub-set of symbols using the aliases: marker or Marker and values:

    • -, x_dash
    • +, plus
    • a, *, star
    • c, circle
    • d, diamond
    • g, octagon
    • h, hexagon
    • i, v, inverted_tri
    • n, pentagon
    • p, ., point
    • r, rectangle
    • s, square
    • t, ^, triangle
    • x, cross
    • y, y_dash
  • W | pen | line_attribs | markeredgecolor | MarkerEdgeColor | mec:: [Type => Str] Set pen attributes for lines or the outline of symbols (http://docs.generic-mapping-tools.org/latest/plot3d.html#w) WARNING: the pen attributes will set the pen of polygons OR symbols but not the two together. If your plot has polygons and symbols, use W or line_attribs for the polygons and markeredgecolor or MarkerEdgeColor for filling the symbols. Similar to S above.

  • U | time_stamp | timestamp :: [Type => Str or Bool or []] $Arg = [[just]/dx/dy/][c|label]$

    Draw GMT time stamp logo on plot. (http://docs.generic-mapping-tools.org/latest/gmt.html#u-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • X | x_offset | xshift :: [Type => Str] $Arg = [a|c|f|r][x-shift[u]]$

  • Y | y_offset | yshift :: [Type => Str] $Arg = [a|c|f|r][y-shift[u]]$

    Shift plot origin relative to the current origin by (x-shift,y-shift) and optionally append the length unit (c, i, or p). (http://docs.generic-mapping-tools.org/latest/gmt.html#xy-full)

  • Z | level :: [Type => Str | NamedTuple] Arg = value|file[+f|+l] | (data=Array|Number, outline=_, fill=_)

    Paint polygons after the level given as a cte or a vector with same size of number of polygons. Needs a color map. (http://docs.generic-mapping-tools.org/latest/plot3d.html#z)

  • a | aspatial :: [Type => Str] $Arg = [col=]name[…]$

    Control how aspatial data are handled in GMT during input and output. (http://docs.generic-mapping-tools.org/latest/gmt.html#aspatial-full)

  • bi | binary_in :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary format for primary input (secondary inputs are always ASCII). (http://docs.generic-mapping-tools.org/latest/gmt.html#bi-full)

  • di | nodata_in :: [Type => Str or Number] $Arg = nodata$

    Examine all input columns and if any item equals nodata we interpret this value as a missing data item and substitute the value NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#di-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • g | gap :: [Type => Str] $Arg = [a]x|y|d|X|Y|D|[col]z[+|-]gap[u]$

    Examine the spacing between consecutive data points in order to impose breaks in the line. (http://docs.generic-mapping-tools.org/latest/gmt.html#g-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • p | view | perspective :: [Type => Str or List] $Arg = [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]$

    Selects perspective view and sets the azimuth and elevation of the viewpoint [180/90]. (http://docs.generic-mapping-tools.org/latest/gmt.html#perspective-full)

  • t | alpha | transparency :: [Type => Str] $Arg = transp$

    Set PDF transparency level for an overlay, in (0-100] percent range. [Default is 0, i.e., opaque]. (http://docs.generic-mapping-tools.org/latest/gmt.html#t-full)

  • w | wrap | cyclic :: [Type => Str or Number] $Arg = [[-]n]$

    Convert input records to a cyclical coordinate. (http://docs.generic-mapping-tools.org/latest/gmt.html#w-full)

  • savefig | figname | name :: [Type => Str]

    Save the figure with the figname=name.ext where ext chooses the figure format (e.g. figname="name.png")

Example:

plot3d(x -> sin(x)*cos(10x), y -> sin(y)*sin(10y), z -> cos(z), 0:pi/100:pi, show=true, aspect3=:equal)
GMT.plotyyMethod

plotyy(arg1, arg2; kwargs...)

Example:

plotyy([1 1; 2 2], [1.5 1.5; 3 3], R="0.8/3/0/5", title="Ai", ylabel=:Bla, xlabel=:Ble, seclabel=:Bli, show=1)
GMT.polygonlevelsMethod
polygonlevels(D::GDtype, ids::Vector{String}, vals::Vector{<:Real}; kw...) -> Vector{Float64}

or

polygonlevels(D::GDtype, ids::Matrix{String}, vals::Vector{<:Real}; kw...) -> Vector{Float64}

Creates a vector with ZVALS to use in $plot$ and where length(ZVALS) == length(D) The elements of ZVALS are made up from the vals.

  • ids: is a string Vector or Matrix with the ids (attrinute names) of the GMTdataset D. If a Matrix (2 columns only) then the att bellow must also have two names (string vector with two elements) that will be matched against the two eements of each line of user_ids. The idea here is to match two conditions: $att[1] == ids[n,1] && att[2] == ids[n,2]$
  • vals: is a vector with the numbers to be used in plot $level$ to color the polygons.
  • attrib or att: keyword to selecect which attribute to use when matching with contents of the ids strings.
  • nocase or insensitive: a keyword from kw. Perform a case insensitive comparision between the contents of ids and the attribute specified with attrib. Default compares as case sensistive.
  • repeat: keyword to replicate the previously known value until it finds a new segment ID for the case when a polygon have no attributes (may happen for the islands of country).

Returns a Vector{Float64} with the same length as the number of segments in D. Its content are made up after the contents of vals but may be repeated such that each polygon of the same family, i.e. with the same ids, has the same value.

GMT.proj2wktMethod
proj2wkt(proj4_str::String, pretty::Bool=false)

Convert a PROJ4 string into the WKT form. Use pretty=true to return a more human readable text.

GMT.projectFunction
project(cmd0::String="", arg1=nothing, kwargs...)

Project data onto lines or great circles, generate tracks, or translate coordinates.

Full option list at project

Parameters

  • C | origin | start_pt :: [Type => list/tuple] $Arg = (x,y)$

    Sets the origin of the projection, in Definition 1 or 2. (http://docs.generic-mapping-tools.org/latest/project.html#c)

  • A | azim :: [Type => Number] $Arg = azimuth$

    Defines the azimuth of the projection (Definition 1). (http://docs.generic-mapping-tools.org/latest/project.html#a)

  • E | end_pt :: [Type => list/tuple] $Arg = (bx,by)$

    bx,by defines the end point of the projection path (Definition 2). (http://docs.generic-mapping-tools.org/latest/project.html#e)

  • F | out_flags :: [Type => Str] $Arg = xyzpqrs$

    Specify your desired output using any combination of xyzpqrs, in any order [Default is xyzpqrs]. (http://docs.generic-mapping-tools.org/latest/project.html#f)

  • G | step | small_circle: [Type => Number or list/tuple– $Arg = dist[/colat][+h]$

    Generate mode. No input is read. Create (r, s, p) output points every dist units of p. See Q option. (http://docs.generic-mapping-tools.org/latest/project.html#g)

  • L | length_control :: [Type => Number or list/tuple] $Arg = [w|l_{min}/l_{max}]$

    Length controls. Project only those points whose p coordinate is within l_min < p < l_max. (http://docs.generic-mapping-tools.org/latest/project.html#l)

  • N | flat_earth :: [Type => Bool or []]

    Flat Earth. Make a Cartesian coordinate transformation in the plane. Default uses spherical trigonometry.

  • Q | km :: [Type => Bool or []]

    Map type units. (http://docs.generic-mapping-tools.org/latest/project.html#q)

  • S | sort :: [Type => Bool or []]

    Sort the output into increasing p order. Useful when projecting random data into a sequential profile. (http://docs.generic-mapping-tools.org/latest/project.html#s)

  • T | pole :: [Type => list/tuple] $Arg = (px,py)$

    px,py sets the position of the rotation pole of the projection. (Definition 3). (http://docs.generic-mapping-tools.org/latest/project.html#t)

  • W | width_control :: [Type => list/tuple] $Arg = (w_{min},w_{max})$

    Width controls. Project only those points whose q coordinate is within w_min < q < w_max. (http://docs.generic-mapping-tools.org/latest/project.html#w)

  • Z | ellipse :: [Type => Number | Tuple | String] $Arg = major/minor/azimuth[+e|n]$

    Make ellipse with major and minor axes given in km (unless N is given for a Cartesian ellipse) and the azimuth of the major axis in degrees; used in conjunction with origin (sets its center) and step (sets the distance increment). (http://docs.generic-mapping-tools.org/latest/project.html#z)

  • write | |> :: [Type => Str] $Arg = fname$

    Save result to ASCII file instead of returning to a Julia variable. Give file name as argument. Use the bo option to save as a binary file.

  • append :: [Type => Str] $Arg = fname$

    Append result to an existing file named $fname$ instead of returning to a Julia variable. Use the bo option to save as a binary file.

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • b | binary :: [Type => Str]

    (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • d | nodata :: [Type => Str or Number] $Arg = [i|o]nodata$

    Control how user-coded missing data values are translated to official NaN values in GMT. (http://docs.generic-mapping-tools.org/latest/gmt.html#d-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • g | gap :: [Type => Str] $Arg = [a]x|y|d|X|Y|D|[col]z[+|-]gap[u]$

    Examine the spacing between consecutive data points in order to impose breaks in the line. (http://docs.generic-mapping-tools.org/latest/gmt.html#g-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • o | outcols | outcol :: [Type => Str] $Arg = cols[,…]$

    Select specific data columns for primary output, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#ocols-full)

  • s | skiprows | skip_NaN :: [Type => Str] $Arg = [cols][a|r]$

    Suppress output for records whose z-value equals NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#s-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.psconvertFunction
psconvert(cmd0::String="", arg1=nothing; kwargs...)

Place images or EPS files on maps.

Full option list at psconvert

Parameters

  • A | adjust | crop :: [Type => Str or Number]

    Adjust the BoundingBox and HiResBoundingBox to the minimum required by the image content. (http://docs.generic-mapping-tools.org/latest/psconvert.html#a)

  • C | gs_option :: [Type => Str or Array os strings]

    Specify a single, or an araay of, custom option that will be passed on to GhostScript as is. (http://docs.generic-mapping-tools.org/latest/psconvert.html#c)

  • D | out_dir | output_dir :: [Type => Str]

    Sets an alternative output directory (which must exist) [Default is the same directory as the PS files]. (http://docs.generic-mapping-tools.org/latest/psconvert.html#d)

  • E | dpi :: [Type => Number]

    Set raster resolution in dpi [default = 720 for PDF, 300 for others]. (http://docs.generic-mapping-tools.org/latest/psconvert.html#e)

  • F | :out_name | output_name :: [Type => Str]

    Force the output file name. (http://docs.generic-mapping-tools.org/latest/psconvert.html#f)

  • G | ghost_path :: [Type => Bool]

    Full path to your GhostScript executable. (http://docs.generic-mapping-tools.org/latest/psconvert.html#g)

  • I | icc_gray :: [Type => Bool]

    Enforce gray-shades by using ICC profiles. (http://docs.generic-mapping-tools.org/latest/psconvert.html#i)

  • in_memory :: [Type => Bool]

    Process a in memory PS file. No other input file should be provided. Currently works on Windows only.

  • L | list_file :: [Type => Str]

    The listfile is an ASCII file with the names of the PostScript files to be converted. (http://docs.generic-mapping-tools.org/latest/psconvert.html#l)

  • Q | anti_aliasing :: [Type => Str]

    Set the anti-aliasing options for graphics or text. Append the size of the subsample box (1, 2, or 4) [4]. This option is set by default. (http://docs.generic-mapping-tools.org/latest/psconvert.html#q)

  • S | gs_command :: [Type => Bool]

    Print to standard error the GhostScript command after it has been executed. (http://docs.generic-mapping-tools.org/latest/psconvert.html#s)

  • T | format :: [Type => Str]

    b|e|E|f|F|j|g|G|m|s|t Sets the output format, where b = BMP, e = EPS, E = EPS with PageSize command, f = PDF, F = multi-page PDF, j = JPEG, g = PNG, G = transparent PNG (untouched regions are transparent), m = PPM, and t = TIFF [default is JPEG]. Alternatively, the format may be set with the fmt keyword, e.g. fmt=:png. (http://docs.generic-mapping-tools.org/latest/psconvert.html#t)

  • W | world_file :: [Type => Str]

    Write a ESRI type world file suitable to make (e.g) .tif files be recognized as geotiff by software that know how to do it. (http://docs.generic-mapping-tools.org/latest/psconvert.html#w)

  • kml :: [Type => Str | []]

    Create a minimalist KML file that allows loading the image in GoogleEarth. (http://docs.generic-mapping-tools.org/latest/psconvert.html#w)

  • Z | delinputps :: [Type => Bool]

    Remove the input PostScript file(s) after the conversion. (http://docs.generic-mapping-tools.org/latest/psconvert.html#z)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

GMT.rasterzones!Method
rasterzones!(GI::GItype, shapes::Vector{GMTdataset}, fun::Function)

Apply a unidimensional function fun to to the elements of the grid or image GI that lie inside the polygons of the GMTdataset shapes. The GI array is modified in place.

Parameters

  • GI: A grid (GMTgrid) or image (GMTimage) type that will be modified by applying fun to the elements that fall inside the polygons of shapes.
  • shapes: A vector of GMTdataset containing the polygons inside which the elements if GI will be assigned a single value obtained by applying the function fun.
  • fun: A unidemensional function name used to compute the contant value for the GI elements that fall inside each of the polygons of shapes.

See also: $colorzones$

Returns

It does't return anything but the input GI is modified.

Example

Take the Peaks grid and replace the elements that fall inside a triangle at the center by their average.

G = GMT.peaks();
D = mat2ds([-1 -1; 0 1; 1 -1; -1 -1]);
rasterzones!(G, D, mean)
GMT.regiongeogMethod
regiongeog(GI)::Tuple

Returns a tuple with (lonmin, lonmax, latmin, latmax) of the projected GI object limits converted to geographic coordinates. Returns an empty tuple if GI has no registered referencing system. GI can either a $GMTgrid$, a $GMTimage$ or a file name (String) of one those types.

GMT.regressFunction
regress(cmd0::String="", arg1=nothing, kwargs...)

Linear regression of 1-D data sets.

Full option list at regress

Parameters

  • A | all_slopes :: [Type => Str | List] $Arg = min/max/inc$

    Instead of determining a best-fit regression we explore the full range of regressions. (http://docs.generic-mapping-tools.org/latest/gmtregress.html#a)

  • C | confidence_level :: [Type => Int] $Arg = level$

    Set the confidence level (in %) to use for the optional calculation of confidence bands on the regression [95]. (http://docs.generic-mapping-tools.org/latest/gmtregress.html#c)

  • E | regression_type :: [Type => Str] $Arg = x|y|o|r$

    Type of linear regression, i.e., select the type of misfit we should calculate. (http://docs.generic-mapping-tools.org/latest/gmtregress.html#e)

  • F | column_combination :: [Type => Str] $Arg = x|y|m|l|c$

    Append a combination of the columns you wish returned; (http://docs.generic-mapping-tools.org/latest/gmtregress.html#f)

  • N | norm :: [Type => Str | Int] $Arg = 1|2|r|w$

    Selects the norm to use for the misfit calculation. (http://docs.generic-mapping-tools.org/latest/gmtregress.html#n)

  • S | restrict :: [Type => Str | []] $Arg = [r]$

    Restricts which records will be output. (http://docs.generic-mapping-tools.org/latest/gmtregress.html#s)

  • T | equi_space :: [Type => Str | List] $Arg = [min/max/]inc[+a|n]] or file|list$

    Evaluate the best-fit regression model at the equidistant points implied by the arguments. (http://docs.generic-mapping-tools.org/latest/gmtregress.html#t)

  • W | weighted :: [Type => Str | []] $Arg = [w][x][y][r]$

    Specifies weighted regression and which weights will be provided. (http://docs.generic-mapping-tools.org/latest/gmtregress.html#w)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • write | |> :: [Type => Str] $Arg = fname$

    Save result to ASCII file instead of returning to a Julia variable. Give file name as argument. Use the bo option to save as a binary file.

  • append :: [Type => Str] $Arg = fname$

    Append result to an existing file named $fname$ instead of returning to a Julia variable. Use the bo option to save as a binary file.

  • b | binary :: [Type => Str]

    (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • d | nodata :: [Type => Str or Number] $Arg = [i|o]nodata$

    Control how user-coded missing data values are translated to official NaN values in GMT. (http://docs.generic-mapping-tools.org/latest/gmt.html#d-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • g | gap :: [Type => Str] $Arg = [a]x|y|d|X|Y|D|[col]z[+|-]gap[u]$

    Examine the spacing between consecutive data points in order to impose breaks in the line. (http://docs.generic-mapping-tools.org/latest/gmt.html#g-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • o | outcols | outcol :: [Type => Str] $Arg = cols[,…]$

    Select specific data columns for primary output, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#ocols-full)

  • w | wrap | cyclic :: [Type => Str or Number] $Arg = [[-]n]$

    Convert input records to a cyclical coordinate. (http://docs.generic-mapping-tools.org/latest/gmt.html#w-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.rescaleFunction
R = rescale(A, a=0.0, b=1.0; inputmin=nothing, inputmax=nothing, stretch=false, type=nothing)
  • A: is either a GMTgrid, GMTimage, Matrix{AbstractArray} or a file name. In later case the file is read with a call to gmtread that automatically decides how to read it based on the file extension ... not 100% safe.
  • rescale(A) rescales all entries of an array A to [0,1].
  • rescale(A,b,c) rescales all entries of A to the interval [b,c].
  • rescale(..., inputmin=imin) sets the lower bound imin for the input range. Input values less than imin will be replaced with imin. The default is min(A).
  • rescale(..., inputmax=imax) sets the lower bound imax for the input range. Input values greater than imax will be replaced with imax. The default is max(A).
  • rescale(..., stretch=true) automatically determines [inputmin inputmax] via a call to histogram that will (try to) find good limits for histogram stretching.
  • type: Converts the scaled array to this data type. Valid options are all Unsigned types (e.g. UInt8). Default returns the same data type as A if it's an AbstractFloat, or Flot64 if A is an integer.

Returns a GMTgrid if A is a GMTgrid of floats, a GMTimage if A is a GMTimage and type is used or an array of Float32|64 otherwise.

GMT.roseFunction
rose(cmd0::String="", arg1=nothing; kwargs...)

Reads (length,azimuth) pairs and plot a windrose diagram (polar histograms).

Full option list at psrose

Parameters

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • A | sector :: [Type => Str | Number]

Gives the sector width in degrees for sector and rose diagram.
(http://docs.generic-mapping-tools.org/latest/rose.html#a)
  • B | frame | axis | xaxis yaxis:: [Type => Str]

    Set map boundary frame and axes attributes. (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • C | color :: [Type => Str | GMTcpt]

Give a CPT. The mid x-value for each bar is used to look-up the bar color.
(http://docs.generic-mapping-tools.org/latest/rose.html#c)
  • E | vectors :: [Type => Str]
Plot vectors showing the principal directions given in the mode_file file.
(http://docs.generic-mapping-tools.org/latest/rose.html#e)
  • D | shift :: [Type => Bool]
Shift sectors so that they are centered on the bin interval (e.g., first sector is centered on 0 degrees).
(http://docs.generic-mapping-tools.org/latest/rose.html#d)
  • F | no_scale :: [Type => Bool]
Do not draw the scale length bar [Default plots scale in lower right corner].
(http://docs.generic-mapping-tools.org/latest/rose.html#f)
  • G | fill :: [Type => Str | Number]
Selects shade, color or pattern for filling the sectors [Default is no fill].
(http://docs.generic-mapping-tools.org/latest/rose.html#g)
  • I | inquire :: [Type => Bool]
Inquire. Computes statistics needed to specify a useful -R. No plot is generated.
(http://docs.generic-mapping-tools.org/latest/rose.html#i)
  • L | labels :: [Type => Str | Number]
Specify labels for the 0, 90, 180, and 270 degree marks.
(http://docs.generic-mapping-tools.org/latest/rose.html#l)
  • M | vector_params :: [Type => Str]
Used with -C to modify vector parameters.
(http://docs.generic-mapping-tools.org/latest/rose.html#m)
  • P | portrait :: [Type => Bool or []]

    Tell GMT to NOT draw in portrait mode (that is, make a Landscape plot)

  • Q | alpha :: [Type => Str | []]

Sets the confidence level used to determine if the mean resultant is significant.
(http://docs.generic-mapping-tools.org/latest/rose.html#q)
  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • S | norm | normalize :: [Type => Bool]

Specifies radius of plotted circle (append a unit from c|i|p).
(http://docs.generic-mapping-tools.org/latest/rose.html#s)
  • T | orientation :: [Type => Bool]
Specifies that the input data are orientation data (i.e., have a 180 degree ambiguity)
instead of true 0-360 degree directions [Default].
(http://docs.generic-mapping-tools.org/latest/rose.html#t)
  • W | pen :: [Type => Str | Tuple]
Set pen attributes for sector outline or rose plot. [Default is no outline].
(http://docs.generic-mapping-tools.org/latest/rose.html#w)
  • Z | scale :: [Type => Str]
Multiply the data radii by scale.
(http://docs.generic-mapping-tools.org/latest/rose.html#z)
  • U | time_stamp | timestamp :: [Type => Str or Bool or []] $Arg = [[just]/dx/dy/][c|label]$

    Draw GMT time stamp logo on plot. (http://docs.generic-mapping-tools.org/latest/gmt.html#u-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • X | x_offset | xshift :: [Type => Str] $Arg = [a|c|f|r][x-shift[u]]$

  • Y | y_offset | yshift :: [Type => Str] $Arg = [a|c|f|r][y-shift[u]]$

    Shift plot origin relative to the current origin by (x-shift,y-shift) and optionally append the length unit (c, i, or p). (http://docs.generic-mapping-tools.org/latest/gmt.html#xy-full)

  • bi | binary_in :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary format for primary input (secondary inputs are always ASCII). (http://docs.generic-mapping-tools.org/latest/gmt.html#bi-full)

  • di | nodata_in :: [Type => Str or Number] $Arg = nodata$

    Examine all input columns and if any item equals nodata we interpret this value as a missing data item and substitute the value NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#di-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • p | view | perspective :: [Type => Str or List] $Arg = [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]$

    Selects perspective view and sets the azimuth and elevation of the viewpoint [180/90]. (http://docs.generic-mapping-tools.org/latest/gmt.html#perspective-full)

  • t | alpha | transparency :: [Type => Str] $Arg = transp$

    Set PDF transparency level for an overlay, in (0-100] percent range. [Default is 0, i.e., opaque]. (http://docs.generic-mapping-tools.org/latest/gmt.html#t-full)

  • w | wrap | cyclic :: [Type => Str or Number] $Arg = [[-]n]$

    Convert input records to a cyclical coordinate. (http://docs.generic-mapping-tools.org/latest/gmt.html#w-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

  • savefig | figname | name :: [Type => Str]

    Save the figure with the figname=name.ext where ext chooses the figure format (e.g. figname="name.png")

GMT.round_datetimeMethod

Round a Vector or Tuple (2 elements) of DateTime type to a nearest nice number to use in plot limits

GMT.sample1dFunction
sample1d(cmd0::String="", arg1=nothing, kwargs...)

Resample 1-D table data using splines

Full option list at sample1d

Parameters

  • A | resample :: [Type => Str] $Arg = f|p|m|r|R$

    For track resampling (if -T…unit is set) we can select how this is to be performed. (http://docs.generic-mapping-tools.org/latest/sample1d.html#a)

  • F | interp_type :: [Type => Str] $Arg = l|a|c|n|s<p>[+1|+2]$

    Choose from l (Linear), a (Akima spline), c (natural cubic spline), and n (no interpolation: nearest point) [Default is Akima]. (http://docs.generic-mapping-tools.org/latest/sample1d.html#f)

  • N | time_col :: [Type => Int] $Arg = t_col$

    Indicates which column contains the independent variable (time). The left-most column is # 0, the right-most is # (n_cols - 1). [Default is 0]. (http://docs.generic-mapping-tools.org/latest/sample1d.html#n)

  • T | inc | range :: [Type => List | Str] $Arg = [min/max/]inc[+a|n]] or file|list$

    Evaluate the best-fit regression model at the equidistant points implied by the arguments. (http://docs.generic-mapping-tools.org/latest/sample1d.html#t)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • W | weights_col :: [Type => Int] $Arg = w_col$

    Sets the column number of the weights to be used with a smoothing cubic spline. Requires Fs. (GMT6.1) (http://docs.generic-mapping-tools.org/latest/sample1d.html#w)

  • write | |> :: [Type => Str] $Arg = fname$

    Save result to ASCII file instead of returning to a Julia variable. Give file name as argument. Use the bo option to save as a binary file.

  • append :: [Type => Str] $Arg = fname$

    Append result to an existing file named $fname$ instead of returning to a Julia variable. Use the bo option to save as a binary file.

  • b | binary :: [Type => Str]

    (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • d | nodata :: [Type => Str or Number] $Arg = [i|o]nodata$

    Control how user-coded missing data values are translated to official NaN values in GMT. (http://docs.generic-mapping-tools.org/latest/gmt.html#d-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • g | gap :: [Type => Str] $Arg = [a]x|y|d|X|Y|D|[col]z[+|-]gap[u]$

    Examine the spacing between consecutive data points in order to impose breaks in the line. (http://docs.generic-mapping-tools.org/latest/gmt.html#g-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • o | outcols | outcol :: [Type => Str] $Arg = cols[,…]$

    Select specific data columns for primary output, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#ocols-full)

  • w | wrap | cyclic :: [Type => Str or Number] $Arg = [[-]n]$

    Convert input records to a cyclical coordinate. (http://docs.generic-mapping-tools.org/latest/gmt.html#w-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.scatterFunction
scatter(cmd0::String="", arg1=nothing; kwargs...)

Reads (x,y) pairs and plot symbols at those locations on a map. This module is a subset of $plot$ to make it simpler to draw scatter plots. So many of its (fine) controling parameters are not listed here. For a finer control, user should consult the $plot$ module.

Parameters

  • G | fill | markerfacecolor :: [Type => Str]

    Select color or pattern for filling of symbols or polygons. (http://docs.generic-mapping-tools.org/latest/plot.html#g)

  • N | no_clip :: [Type => Str | []]

    Do NOT clip symbols that fall outside map border (http://docs.generic-mapping-tools.org/latest/plot.html#n)

  • P | portrait :: [Type => Bool or []]

    Tell GMT to NOT draw in portrait mode (that is, make a Landscape plot)

  • S :: [Type => Str]

    Plot symbols (including vectors, pie slices, fronts, decorated or quoted lines). (http://docs.generic-mapping-tools.org/latest/plot.html#s)

    Alternatively select a sub-set of symbols using the aliases: symbol or marker and values:

    • -, x_dash
    • +, plus
    • a, *, star
    • c, circle
    • d, diamond
    • g, octagon
    • h, hexagon
    • i, v, inverted_tri
    • n, pentagon
    • p, ., point
    • r, rectangle
    • s, square
    • t, ^, triangle
    • x, cross
+ **y**, **y_dash**

and select their sizes with the **markersize** or **size** keyword [default is 8p].
The marker size can be a scalar or a vector with same size numeber of rows of data. Units are
points unless specified otherwise with (for example for cm) *par=(PROJ_LENGTH_UNIT=:c,)*
  • W | pen | markeredgecolor | mec :: [Type => Str]

    Set pen attributes for lines or the outline of symbols (http://docs.generic-mapping-tools.org/latest/plot.html#w)

  • savefig | figname | name :: [Type => Str]

    Save the figure with the figname=name.ext where ext chooses the figure format (e.g. figname="name.png")

Full man page GMT man page

GMT.slicecubeMethod
slicecube(I::GMTimage, layer::Int)

Take a slice of a multylayer GMTimage. Return the result still as a GMTimage. layer is the slice number.

Example

Get the fourth layer of the multi-layered 'I' GMTimage object

I = slicecube(I, 4)
GMT.solarFunction
solar(cmd0::String="", arg1=nothing; kwargs...)

Calculate and plot the day-night terminator and the civil, nautical and astronomical twilights.

Full option list at solar

Parameters

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • B | frame | axis | xaxis yaxis:: [Type => Str]

    Set map boundary frame and axes attributes. (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • C | formated :: [Type => Bool]

    (http://docs.generic-mapping-tools.org/latest/solar.html#c)

  • G | fill :: [Type => Str | Number]

    (http://docs.generic-mapping-tools.org/latest/solar.html#g)

  • I | sun :: [Type => Bool | Tuple | NamedTuple]

    (http://docs.generic-mapping-tools.org/latest/solar.html#i)

  • P | portrait :: [Type => Bool or []]

    Tell GMT to NOT draw in portrait mode (that is, make a Landscape plot)

  • M | dump :: [Type => Bool]

    (http://docs.generic-mapping-tools.org/latest/solar.html#m)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • N | invert :: [Type => Bool]

    (http://docs.generic-mapping-tools.org/latest/solar.html#n)

  • T | terminators :: [Type => Bool | Tuple | NamedTuple]

    (http://docs.generic-mapping-tools.org/latest/solar.html#t)

  • W | pen :: [Type => Str | Tuple]

    (http://docs.generic-mapping-tools.org/latest/solar.html#w)

  • U | time_stamp | timestamp :: [Type => Str or Bool or []] $Arg = [[just]/dx/dy/][c|label]$

    Draw GMT time stamp logo on plot. (http://docs.generic-mapping-tools.org/latest/gmt.html#u-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • X | x_offset | xshift :: [Type => Str] $Arg = [a|c|f|r][x-shift[u]]$

  • Y | y_offset | yshift :: [Type => Str] $Arg = [a|c|f|r][y-shift[u]]$

    Shift plot origin relative to the current origin by (x-shift,y-shift) and optionally append the length unit (c, i, or p). (http://docs.generic-mapping-tools.org/latest/gmt.html#xy-full)

  • bo | binary_out :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary output. (http://docs.generic-mapping-tools.org/latest/gmt.html#bo-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • o | outcols | outcol :: [Type => Str] $Arg = cols[,…]$

    Select specific data columns for primary output, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#ocols-full)

  • p | view | perspective :: [Type => Str or List] $Arg = [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]$

    Selects perspective view and sets the azimuth and elevation of the viewpoint [180/90]. (http://docs.generic-mapping-tools.org/latest/gmt.html#perspective-full)

  • t | alpha | transparency :: [Type => Str] $Arg = transp$

    Set PDF transparency level for an overlay, in (0-100] percent range. [Default is 0, i.e., opaque]. (http://docs.generic-mapping-tools.org/latest/gmt.html#t-full)

  • savefig | figname | name :: [Type => Str]

    Save the figure with the figname=name.ext where ext chooses the figure format (e.g. figname="name.png")

GMT.spectrum1dFunction
gmtspectrum1d(cmd0::String="", arg1=nothing, kwargs...)

Compute auto- [and cross- ] spectra from one [or two] time-series.

Full option list at spectrum1d

Parameters

  • S | size :: [Type => Str] $Arg = segment_size$

    $segment_size$ is a radix-2 number of samples per window for ensemble averaging. (http://docs.generic-mapping-tools.org/latest/spectrum1d.html#s)

  • C | response_fun :: [Type => Str | []] $Arg = [xycnpago]$

    Read the first two columns of input as samples of two time-series, X(t) and Y(t). Consider Y(t) to be the output and X(t) the input in a linear system with noise. (http://docs.generic-mapping-tools.org/latest/spectrum1d.html#c)

  • D | sample_dist :: [Type => Number] $Arg = dt$

    Set the spacing between samples in the time-series [Default = 1]. (http://docs.generic-mapping-tools.org/latest/spectrum1d.html#d)

  • L | leave_trend :: [Type => Str | []] $Arg = [h|m]$

    Leave trend alone. By default, a linear trend will be removed prior to the transform. (http://docs.generic-mapping-tools.org/latest/spectrum1d.html#l)

  • N | time_col :: [Type => Int] $Arg = t_col$

    Indicates which (http://docs.generic-mapping-tools.org/latest/spectrum1d.html#n)

  • T :: [Type => Bool]

    Disable the writing of a single composite results file to stdout. (http://docs.generic-mapping-tools.org/latest/spectrum1d.html#t)

  • W | wavelength :: [Type => Bool | Str]

    Write Wavelength rather than frequency in column 1 of the output file[s] [Default = frequency, (cycles / dt)]. (http://docs.generic-mapping-tools.org/latest/spectrum1d.html#w)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • write | |> :: [Type => Str] $Arg = fname$

    Save result to ASCII file instead of returning to a Julia variable. Give file name as argument. Use the bo option to save as a binary file.

  • append :: [Type => Str] $Arg = fname$

    Append result to an existing file named $fname$ instead of returning to a Julia variable. Use the bo option to save as a binary file.

  • b | binary :: [Type => Str]

    (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • d | nodata :: [Type => Str or Number] $Arg = [i|o]nodata$

    Control how user-coded missing data values are translated to official NaN values in GMT. (http://docs.generic-mapping-tools.org/latest/gmt.html#d-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • g | gap :: [Type => Str] $Arg = [a]x|y|d|X|Y|D|[col]z[+|-]gap[u]$

    Examine the spacing between consecutive data points in order to impose breaks in the line. (http://docs.generic-mapping-tools.org/latest/gmt.html#g-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.sphdistanceFunction
sphdistance(cmd0::String="", arg1=nothing, kwargs...)

Create Voronoi distance, node, or natural nearest-neighbor grid on a sphere

Full option list at sphdistance

Parameters

  • C | save_mem :: [Type => Bool]

    For large data sets you can save some memory (at the expense of more processing). (http://docs.generic-mapping-tools.org/latest/sphdistance.html#a)

  • D | duplicates :: [Type => Bool]

    Delete any duplicate points [Default assumes there are no duplicates]. (http://docs.generic-mapping-tools.org/latest/sphdistance.html#d)

  • E | what_quantity :: [Type => Str] $Arg = d|n|z[dist]$

    Specify the quantity that should be assigned to the grid nodes. (http://docs.generic-mapping-tools.org/latest/sphdistance.html#e)

  • G | save | outgrid | outfile :: [Type => Str]

    Output grid file name. Note that this is optional and to be used only when saving the result directly on disk. Otherwise, just use the G = sphdistance(....) form. (http://docs.generic-mapping-tools.org/latest/sphdistance.html#g)

  • I | inc | increment | spacing :: [Type => Str] $Arg = xinc[unit][+e|n][/yinc[unit][+e|n]]]$

    x_inc [and optionally y_inc] is the grid spacing. Optionally, append an increment unit. (http://docs.generic-mapping-tools.org/latest/sphdistance.html#i)

  • L | dist_unit :: [Type => Str] $Arg = d|e|f|k|M|n|u$

    Specify the unit used for distance calculations. (http://docs.generic-mapping-tools.org/latest/sphdistance.html#l)

  • N | nodes :: [Type => Str] $Arg = nodes$

    Read the information pertaining to each Voronoi polygon (the unique node lon, lat and polygon area) from a separate file. (http://docs.generic-mapping-tools.org/latest/sphdistance.html#n)

  • Q | voronoi :: [Type => Str] $Arg = voronoifile$

    Append the name of a file with pre-calculated Voronoi polygons. (http://docs.generic-mapping-tools.org/latest/sphdistance.html#q)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • b | binary :: [Type => Str]

    (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • d | nodata :: [Type => Str or Number] $Arg = [i|o]nodata$

    Control how user-coded missing data values are translated to official NaN values in GMT. (http://docs.generic-mapping-tools.org/latest/gmt.html#d-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • r | reg | registration :: [Type => Bool or []]

    Force pixel node registration [Default is gridline registration]. (http://docs.generic-mapping-tools.org/latest//gmt.html#r-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.sphinterpolateFunction
sphinterpolate(cmd0::String="", arg1=nothing, kwargs...)

Spherical gridding in tension of data on a sphere

Full option list at sphinterpolate

Parameters

  • D | duplicates :: [Type => Bool]

    Delete any duplicate points [Default assumes there are no duplicates]. (http://docs.generic-mapping-tools.org/latest/sphinterpolate.html#d)

  • G | save | outgrid | outfile :: [Type => Str]

    Output grid file name. Note that this is optional and to be used only when saving the result directly on disk. Otherwise, just use the G = sphinterpolate(....) form. (http://docs.generic-mapping-tools.org/latest/sphinterpolate.html#g)

  • I | inc | increment | spacing :: [Type => Str] $Arg = xinc[unit][+e|n][/yinc[unit][+e|n]]]$

    x_inc [and optionally y_inc] is the grid spacing. Optionally, append an increment unit. (http://docs.generic-mapping-tools.org/latest/sphinterpolate.html#i)

  • Q | tension :: [Type => Number | Str] $Arg = mode[/options]$

    Specify one of four ways to calculate tension factors to preserve local shape properties or satisfy arc constraints. (http://docs.generic-mapping-tools.org/latest/sphinterpolate.html#q)

  • T | var_tension :: [Type => Bool | Str]

    Use variable tension (ignored with -Q0 constant

  • Z | scale :: [Type => Bool | Str]

    Before interpolation, scale data by the maximum data range [no scaling]. (http://docs.generic-mapping-tools.org/latest/sphinterpolate.html#z)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • bi | binary_in :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary format for primary input (secondary inputs are always ASCII). (http://docs.generic-mapping-tools.org/latest/gmt.html#bi-full)

  • di | nodata_in :: [Type => Str or Number] $Arg = nodata$

    Examine all input columns and if any item equals nodata we interpret this value as a missing data item and substitute the value NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#di-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • r | reg | registration :: [Type => Bool or []]

    Force pixel node registration [Default is gridline registration]. (http://docs.generic-mapping-tools.org/latest//gmt.html#r-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.sphtriangulateFunction
sphtriangulate(cmd0::String="", arg1=nothing, kwargs...)

Delaunay or Voronoi construction of spherical lon,lat data

Full option list at sphtriangulate

Parameters

  • A | area :: [Type => Bool]

    Compute the area of the spherical triangles (Qd) or polygons (Qv) and write the areas in the output segment headers (http://docs.generic-mapping-tools.org/latest/sphtriangulate.html#a)

  • C | save_mem :: [Type => Bool]

    For large data sets you can save some memory (at the expense of more processing). (http://docs.generic-mapping-tools.org/latest/sphtriangulate.html#c)

  • D | duplicates | skip :: [Type => Bool]

    Delete any duplicate points [Default assumes there are no duplicates]. (http://docs.generic-mapping-tools.org/latest/sphtriangulate.html#d)

  • L | unit :: [Type => Str] $Arg = e|f|k|m|n|u|d$

    Specify the unit used for distance and area calculations. (http://docs.generic-mapping-tools.org/latest/sphtriangulate.html#l)

  • N | nodes :: [Type => Str] $Arg = `file$

    Write the information pertaining to each polygon to a separate file. (http://docs.generic-mapping-tools.org/latest/sphtriangulate.html#n)

  • Q | voronoi :: [Type => Str] $Arg = d|v$

    Append d for Delaunay triangles or v for Voronoi polygons [Delaunay]. (http://docs.generic-mapping-tools.org/latest/sphtriangulate.html#q)

  • T :: [Type => Bool | Str]

    Write the unique arcs of the construction [Default writes fillable triangles or polygons]. When used with -A we store arc length in the segment header in chosen unit. (http://docs.generic-mapping-tools.org/latest/sphtriangulate.html#t)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • b | binary :: [Type => Str]

    (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • d | nodata :: [Type => Str or Number] $Arg = [i|o]nodata$

    Control how user-coded missing data values are translated to official NaN values in GMT. (http://docs.generic-mapping-tools.org/latest/gmt.html#d-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.stackgridsFunction
stackgrids(names::Vector{String}, v=nothing; zcoord=nothing, zdim_name="time", z_unit="", save="", mirone=false)

Stack a bunch of single grids in a multiband cube like file.

  • names: A string vector with the names of the grids to stack
  • v: A vector with the vertical coordinates. If not provided one with 1:length(names) will be generated.
    • If v is a TimeType use the z_unit keyword to select what to store in file (case insensitive).
      • decimalyear or yeardecimal converts the DateTime to decimal years (Floa64)
- `milliseconds` (or just `mil`) will store the DateTime as milliseconds since 0000-01-01T00:00:00 (Float64)
- `seconds` stores the DateTime as seconds since 0000-01-01T00:00:00 (Float64)
- `unix` stores the DateTime as seconds since 1970-01-01T00:00:00 (Float64)
- `rata` stores the DateTime as days since 0000-12-31T00:00:00 (Float64)
- `Date` or `DateTime` stores as a string representation of a DateTime.
  • zdim_name: The name of the vertical axes (default is "time")
  • zcoord: Keyword same as v (may use one or the other).
  • save: The name of the file to be created.
  • mirone: Does not create a cube file but instead a file named "automatic_list.txt" (or whaterver save=xxx) to be used in the Mirone Empilhador tool.
GMT.streamlinesMethod
S = streamlines(U::GMTgrid, V::GMTgrid, startX, startY; step=0.1, max_vert::Int=10000)

Compute 2-D streamlines as a 2-D matrix (in fact, a GMTdataset) of vector fields. The inputs U and V are GMTgrids with the $x$ and $y$ velocity components, and startX and startY are the starting positions of the streamlines. step is the step size in data units for interpolating the vector data and max_vert is the maximum number of vertices in a streamline. startX and startY can both be scalars, vectors or one a scalar and the other a vector. Returns a Vector{GMTdataset} with the streamlines.

S = streamlines(U::GMTgrid, V::GMTgrid, D::GMTdataset; step=0.1, max_vert::Int=10000)

In this method the streamlines starting positions are fetch from the 2 columns of the D argument. Returns a Vector{GMTdataset} with the streamlines.

S, A = streamlines(U::GMTgrid, V::GMTgrid; step=0.1, max_vert::Int=10000)

Method that computes automatically spaced streamlines from 2D grids U and V. Returns the streamlines in the $S$ Vector{GMTdataset} and $A$ holds the positions along the streamlines where to plot arrow-heads if wished.

S = streamlines(U::GMTgrid, V::GMTgrid; side::Union{String, Symbol}="left", step=0.1, max_vert::Int=10000)

Here we auto-generate the starting positions along one of the 4 sides of the grid. Select the wished side with the $side$ keyword. Returns a Vector{GMTdataset} with the streamlines.

S = streamlines(x, y, U::Matrix, V::Matrix, sx, sy; step=0.1, max_vert::Int=10000)

This last 2D method let users pass the x and y vector data coordinates, U and V are matrices with the velocity data and the remaining arguments have the same meaning as in the other methods. Returns a Vector{GMTdataset} with the streamlines.

S = streamlines(U::GMTgrid, V::GMTgrid, W::GMTgrid, startX, startY, startZ; step=0.1, max_vert::Int=10000)

Conpute 3D volume of vector fields with streamline. Here U,V and W are 3D cubes with $x,y,z$ velocity components. startX, startY and startZ can be scalar or vector coordinate arrays. Returns a Vector{GMTdataset} with the streamlines.

Example

x,y = GMT.meshgrid(-10:10);
u = 2 .* x .* y;
v = y .^2 - x .^ 2;
U = mat2grid(u, x[1,:], y[:,1]);
V = mat2grid(v, x[1,:], y[:,1]);
r,a = streamlines(U, V);
plot(r, decorated=(locations=a, symbol=(custom="arrow", size=0.3), fill=:black, dec2=true), show=1)
GMT.subplotFunction
subplot(fim=nothing; kwargs...)

Manage figure subplot configuration and selection.

Full option list at subplot

Parameters

  • grid :: [Type => Str | Tuple | Array]

    Specifies the number of rows and columns of subplots. Ex grid=(2,3)

  • F | dims | dimensions | size | sizes :: [Type => Str | Tuple, NamedTuple]

    Specify the dimensions of the figure. -F

  • A | autolabel | fixedlabel :: [Type => Str | number]

    Specify automatic tagging of each subplot. This sets the tag of the first, top-left subplot and others follow sequentially. -A

  • B | frame | axis | xaxis yaxis:: [Type => Str]

    Set map boundary frame and axes attributes. (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • C | clearance :: [Type => Str | number]

    Reserve a space of dimension clearance between the margin and the subplot on the specified side. Settings specified under begin directive apply to all panels. -C

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • M | margin | margins :: [Type => Str]

    The margin space that is added around each subplot beyond the automatic space allocated for tick marks, annotations, and labels. -M

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • SC | SR | col_axes | row_axes :: [Type => Str | NamedTuple]

    Set subplot layout for shared axes. Set separately for rows (SR) and columns (SC). -S

  • T | title :: [Type => Str]

    While individual subplots can have titles, the entire figure may also have a overarching title. -T

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • X | x_offset | xshift :: [Type => Str] $Arg = [a|c|f|r][x-shift[u]]$

  • Y | y_offset | yshift :: [Type => Str] $Arg = [a|c|f|r][y-shift[u]]$

    Shift plot origin relative to the current origin by (x-shift,y-shift) and optionally append the length unit (c, i, or p). (http://docs.generic-mapping-tools.org/latest/gmt.html#xy-full)

GMT.surfaceFunction
surface(cmd0::String="", arg1=nothing; kwargs...)

Reads randomly-spaced (x,y,z) triples and produces a binary grid file of gridded values z(x,y) by solving:

	(1 - T) * L (L (z)) + T * L (z) = 0

Full option list at surface

Parameters

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • I | inc | increment | spacing :: [Type => Str] $Arg = xinc[unit][+e|n][/yinc[unit][+e|n]]]$

    x_inc [and optionally y_inc] is the grid spacing. Optionally, append an increment unit. (http://docs.generic-mapping-tools.org/latest/surface.html#i)

  • A | aspect_ratio :: [Type => Number]

    Aspect ratio. If desired, grid anisotropy can be added to the equations. (http://docs.generic-mapping-tools.org/latest/surface.html#a)

  • C | convergence :: [Type => Number]

    Convergence limit. Iteration is assumed to have converged when the maximum absolute change in any grid value is less than convergence_limit. (http://docs.generic-mapping-tools.org/latest/surface.html#c)

  • D | breakline :: [Type => String | NamedTuple] Arg = breakline[+z[level]] | (data=Array, [zlevel=x])

    Use xyz data in the breakline file as a ‘soft breakline’, that is a line whose vertices will be used to constrain the nearest grid nodes without any further interpolation. (http://docs.generic-mapping-tools.org/latest/surface.html#d)

  • G | save | outgrid | outfile :: [Type => Str]

    Output grid file name. Note that this is optional and to be used only when saving the result directly on disk. Otherwise, just use the G = surface(....) form. (http://docs.generic-mapping-tools.org/latest/surface.html#g)

  • Ll | lower :: [Type => Str | Number]

    Impose limits on the output solution. lower sets the lower bound. lower can be the name of a grid file with lower bound values, a fixed value, d to set to minimum input value, (http://docs.generic-mapping-tools.org/latest/surface.html#l)

  • Lu | upper :: [Type => Str | Number]

    (http://docs.generic-mapping-tools.org/latest/surface.html#l)

  • M | mask :: [Type => Number] Arg = max_radius

    After solving for the surface, apply a mask so that nodes farther than max_radius away from a data constraint is set to NaN. (http://docs.generic-mapping-tools.org/latest/surface.html#m)

  • N | max_iter :: [Type => Number]

    Number of iterations. Iteration will cease when convergencelimit is reached or when number of iterations reaches maxiterations. (http://docs.generic-mapping-tools.org/latest/surface.html#n)

  • Q | suggest :: [Type => Bool]

    Suggest grid dimensions which have a highly composite greatest common factor. (http://docs.generic-mapping-tools.org/latest/surface.html#q)

  • S | search_radius :: [Type => Number | Str]

    Sets the resolution of the projected grid that will be created. (http://docs.generic-mapping-tools.org/latest/surface.html#s)

  • T | tension :: [Type => Number | Str]

    Tension factor[s]. These must be between 0 and 1. (http://docs.generic-mapping-tools.org/latest/surface.html#t)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • W | log :: [Type => Str]

    Write convergence information to a log file [surface_log.txt]. (http://docs.generic-mapping-tools.org/latest/surface.html#w)

  • Z | over_relaxation :: [Type => Str | GMTgrid]

    Over-relaxation factor. This parameter is used to accelerate the convergence; it is a number between 1 and 2. (http://docs.generic-mapping-tools.org/latest/surface.html#z)

  • a | aspatial :: [Type => Str] $Arg = [col=]name[…]$

    Control how aspatial data are handled in GMT during input and output. (http://docs.generic-mapping-tools.org/latest/gmt.html#aspatial-full)

  • bi | binary_in :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary format for primary input (secondary inputs are always ASCII). (http://docs.generic-mapping-tools.org/latest/gmt.html#bi-full)

  • di | nodata_in :: [Type => Str or Number] $Arg = nodata$

    Examine all input columns and if any item equals nodata we interpret this value as a missing data item and substitute the value NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#di-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • r | reg | registration :: [Type => Bool or []]

    Force pixel node registration [Default is gridline registration]. (http://docs.generic-mapping-tools.org/latest//gmt.html#r-full)

  • w | wrap | cyclic :: [Type => Str or Number] $Arg = [[-]n]$

    Convert input records to a cyclical coordinate. (http://docs.generic-mapping-tools.org/latest/gmt.html#w-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.ternaryFunction
ternary(cmd0="", arg1=nothing; image=false, clockwise=false, kwargs...)

Reads (a,b,c[,z]) records from table [or file] and plots image and symbols at those locations on a ternary diagram.

  • B | frame :: [Type => NamedTuple | Str] –

    For ternary diagrams the three sides are referred to as a (bottom), b (right), and c (left). The default is to annotate and draw grid lines but without labeling the axes. But since labeling is a very important feature, you can use the labels option that take as argument a 3 elements Tuple with the labels of the 3 axes. Further control on annotations and grid spacing (on/off) is achieved by using the frame=(annot=?, grid=?, alabel=?, blabel=?, clabel=?, suffix=?) form. Note that not all options of the general frame options are accepted in this module and for more elaborated frame option selection you will have to resort to the pure GMT syntax in the form frame="<arg> <arg> <arg>" (http://docs.generic-mapping-tools.org/latest/psternary.html#b)

  • C | color | colormap | cmap | colorscale :: [Type => Str] $Arg = [cpt |master[+izinc] |color1,color2[,*color3*,…]]$

    Give a CPT name or specify -Ccolor1,color2[,color3,...] to build a linear continuous CPT from those colors automatically. (http://docs.generic-mapping-tools.org/latest/grdimage.html#c)

  • G | fill :: [Type => Str] –

    Select color or pattern for filling the bars (http://docs.generic-mapping-tools.org/latest/psternary.html#c)

  • L | vertex_labels :: [Type => Str | Tuple of strings] – Arg = a/b/c

    Set the labels for the three diagram vertices where the component is 100% [none]. (http://docs.generic-mapping-tools.org/latest/psternary.html#l)

  • M | dump :: [Type => Str]

    Dumps the converted input (a,b,c[,z]) records to Cartesian (x,y,[,z]) records, where x, y are normalized coordinates on the triangle (i.e., 0–1 in x and 0–sqrt(3)/2 in y). No plotting occurs. (http://docs.generic-mapping-tools.org/latest/coast.html#m)

  • N | no_clip | noclip :: [Type => Str or []]

    Do NOT clip symbols that fall outside map border (http://docs.generic-mapping-tools.org/latest/psternary.html#n)

  • R | region | limits :: [Type => Tuple | Str]

    Give the min and max limits for each of the three axis a, b, and c. Default is (0,100,0,100,0,100)

  • P | portrait :: [Type => Bool or []]

    Tell GMT to NOT draw in portrait mode (that is, make a Landscape plot)

  • S | symbol :: [Type => Str]

    Plot individual symbols in a ternary diagram. If S is not given then we will instead plot lines (requires pen) or polygons (requires color or fill). (http://docs.generic-mapping-tools.org/latest/psternary.html#s)

    Alternatively select a sub-set of symbols using the aliases: symbol or marker and values:

    • -, x_dash
    • +, plus
    • a, *, star
    • c, circle
    • d, diamond
    • g, octagon
    • h, hexagon
    • i, v, inverted_tri
    • n, pentagon
    • p, ., point
    • r, rectangle
    • s, square
    • t, ^, triangle
    • x, cross
    • y, y_dash

    and select their sizes with the markersize or size keyword [default is 8p]. The marker size can be a scalar or a vector with same size numeber of rows of data. Units are points unless specified otherwise with (for example for cm) par=(PROJLENGTHUNIT=:c,)

  • U | time_stamp | timestamp :: [Type => Str or Bool or []] $Arg = [[just]/dx/dy/][c|label]$

    Draw GMT time stamp logo on plot. (http://docs.generic-mapping-tools.org/latest/gmt.html#u-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • W | pen :: [Type => Str | Number]

    Sets the attributes for the particular line. (http://docs.generic-mapping-tools.org/latest/psternary.html#w)

  • X | x_offset | xshift :: [Type => Str] $Arg = [a|c|f|r][x-shift[u]]$

  • Y | y_offset | yshift :: [Type => Str] $Arg = [a|c|f|r][y-shift[u]]$

    Shift plot origin relative to the current origin by (x-shift,y-shift) and optionally append the length unit (c, i, or p). (http://docs.generic-mapping-tools.org/latest/gmt.html#xy-full)

  • bi | binary_in :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary format for primary input (secondary inputs are always ASCII). (http://docs.generic-mapping-tools.org/latest/gmt.html#bi-full)

  • di | nodata_in :: [Type => Str or Number] $Arg = nodata$

    Examine all input columns and if any item equals nodata we interpret this value as a missing data item and substitute the value NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#di-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • g | gap :: [Type => Str] $Arg = [a]x|y|d|X|Y|D|[col]z[+|-]gap[u]$

    Examine the spacing between consecutive data points in order to impose breaks in the line. (http://docs.generic-mapping-tools.org/latest/gmt.html#g-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • p | view | perspective :: [Type => Str or List] $Arg = [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]$

    Selects perspective view and sets the azimuth and elevation of the viewpoint [180/90]. (http://docs.generic-mapping-tools.org/latest/gmt.html#perspective-full)

  • q | inrow | inrows :: [Type => Str] $Arg = [i|o][~]rows[+ccol][+a|f|s]$

    Select specific data rows to be read (-qi [Default]) or written (-qo) [all]. (http://docs.generic-mapping-tools.org/latest/gmt.html#q-full)

  • t | alpha | transparency :: [Type => Str] $Arg = transp$

    Set PDF transparency level for an overlay, in (0-100] percent range. [Default is 0, i.e., opaque]. (http://docs.generic-mapping-tools.org/latest/gmt.html#t-full)

  • savefig | figname | name :: [Type => Str]

    Save the figure with the figname=name.ext where ext chooses the figure format (e.g. figname="name.png")

Other than the above options, the kwargs input accepts still the following options

  • image: - Fills the ternary plot with an image computed automatically with grdimage from a grid interpolated with surface
  • contour: - This option works in two different ways. If used together with image it overlays a contour by doing a call to grdcontour. However, if used alone it will call contour to do the contours. The difference is important because this option can be used in default mode with contour=true where the number and annotated contours is picked automatically, or the use can exert full control by passing as argument a NamedTuple with all options appropriated to that module. e.g. contour=(cont=10, annot=20, pen=0.5)
  • contourf: - Works a bit like the standalone contour. If used with contourf=true call make a filled contour using automatic parameters. The form contourf=(...) let us selects options of the contourf module.
  • clockwise: - Set it to true to indicate that positive axes directions be clock-wise [Default lets the a, b, c axes be positive in a counter-clockwise direction].
GMT.textFunction
text(cmd0::String="", arg1=nothing; kwargs...)

Plots text strings of variable size, font type, and orientation. Various map projections are provided, with the option to draw and annotate the map boundaries.

Full option list at pstext

Parameters

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • B | frame | axis | xaxis yaxis:: [Type => Str]

    Set map boundary frame and axes attributes. (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • A | azimuths :: [Type => Bool]

    Angles are given as azimuths; convert them to directions using the current projection. (http://docs.generic-mapping-tools.org/latest/text.html#a)

  • C | clearance :: [Type => Str]

    Sets the clearance between the text and the surrounding box [15%]. (http://docs.generic-mapping-tools.org/latest/text.html#c)

  • D | offset :: [Type => Str]

    Offsets the text from the projected (x,y) point by dx,dy [0/0]. (http://docs.generic-mapping-tools.org/latest/text.html#d)

  • F | attrib :: [Type => Str | Tuple]

    Specify up to three text attributes (font, angle, and justification). (http://docs.generic-mapping-tools.org/latest/text.html#f)

  • G | fill :: [Type => Str | Number]

    Sets the shade or color used for filling the text box [Default is no fill]. (http://docs.generic-mapping-tools.org/latest/text.html#g)

  • Jz | zscale | zsize :: [Type => String]

  • L | list :: [Type => Bool]

    Lists the font-numbers and font-names available, then exits. (http://docs.generic-mapping-tools.org/latest/text.html#l)

  • M | paragraph :: [Type => Str | []]

    Paragraph mode. (http://docs.generic-mapping-tools.org/latest/text.html#m)

  • N | no_clip | noclip :: [Type => Str | []]

    Do NOT clip text at map boundaries. (http://docs.generic-mapping-tools.org/latest/text.html#n)

  • P | portrait :: [Type => Bool or []]

    Tell GMT to NOT draw in portrait mode (that is, make a Landscape plot)

  • Q | change_case :: [Type => Str]

    Change all text to either lower or upper case. (http://docs.generic-mapping-tools.org/latest/text.html#q)

  • S | shade :: [Type => Str | Tuple | Bool] $Arg = [dx/dy][/shade]$

    Plot an offset background shaded region beneath the text box (GMT6.2). (http://docs.generic-mapping-tools.org/latest/text.html#s)

  • T | text_box :: [Type => Str]

    Specify the shape of the textbox when using G and/or W. (http://docs.generic-mapping-tools.org/latest/text.html#t)

  • W | pen :: [Type => Str]

    Sets the pen used to draw a rectangle around the text string. (http://docs.generic-mapping-tools.org/latest/text.html#w)

  • Z | threeD :: [Type => Str]

    For 3-D projections: expect each item to have its own level given in the 3rd column. (http://docs.generic-mapping-tools.org/latest/text.html#z)

  • U | time_stamp | timestamp :: [Type => Str or Bool or []] $Arg = [[just]/dx/dy/][c|label]$

    Draw GMT time stamp logo on plot. (http://docs.generic-mapping-tools.org/latest/gmt.html#u-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • X | x_offset | xshift :: [Type => Str] $Arg = [a|c|f|r][x-shift[u]]$

  • Y | y_offset | yshift :: [Type => Str] $Arg = [a|c|f|r][y-shift[u]]$

    Shift plot origin relative to the current origin by (x-shift,y-shift) and optionally append the length unit (c, i, or p). (http://docs.generic-mapping-tools.org/latest/gmt.html#xy-full)

  • a | aspatial :: [Type => Str] $Arg = [col=]name[…]$

    Control how aspatial data are handled in GMT during input and output. (http://docs.generic-mapping-tools.org/latest/gmt.html#aspatial-full)

  • bi | binary_in :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary format for primary input (secondary inputs are always ASCII). (http://docs.generic-mapping-tools.org/latest/gmt.html#bi-full)

  • di | nodata_in :: [Type => Str or Number] $Arg = nodata$

    Examine all input columns and if any item equals nodata we interpret this value as a missing data item and substitute the value NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#di-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • g | gap :: [Type => Str] $Arg = [a]x|y|d|X|Y|D|[col]z[+|-]gap[u]$

    Examine the spacing between consecutive data points in order to impose breaks in the line. (http://docs.generic-mapping-tools.org/latest/gmt.html#g-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • p | view | perspective :: [Type => Str or List] $Arg = [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]$

    Selects perspective view and sets the azimuth and elevation of the viewpoint [180/90]. (http://docs.generic-mapping-tools.org/latest/gmt.html#perspective-full)

  • t | alpha | transparency :: [Type => Str] $Arg = transp$

    Set PDF transparency level for an overlay, in (0-100] percent range. [Default is 0, i.e., opaque]. (http://docs.generic-mapping-tools.org/latest/gmt.html#t-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

  • savefig | figname | name :: [Type => Str]

    Save the figure with the figname=name.ext where ext chooses the figure format (e.g. figname="name.png")

GMT.texture_imgMethod
texture_img(G::GMTgrid; detail=1.0, contrast=2.0, uint16=false)

Compute the Texture Shading calling functions from the software from Leland Brown at http://www.textureshading.com/Home.html

  • detail is the amount of texture detail. Lower values of detail retain more elevation information, giving more sense of the overall, large structures and elevation trends in the terrain, at the expense
of fine texture detail. Higher detail enhances the texture but gives an overall "flatter" general appearance,
with elevation changes and large structure less apparent.
  • contrast is a parameter called “vertical enhancement.” Higher numbers increase contrast in the midtones, but may lose detail in the lightest and darkest features. Lower numbers highlight only the sharpest ridges
and deepest canyons but reduce contrast overall.
  • uint16 controls if output is a UIn16 or a UInt8 image (the dafault). Note that the original code writes only UInt16 images bur if we want to combine this with with the hillshade computed with gdaldem, a UInt8
image is more handy.

Returns

A UInt8 (or 16) GMT Image

GMT.themeFunction
theme(name; kwrgs...)

Offer themes support. NAME is the theme name. So far the three options are:

  • modern: - This is the default theme (same as GMT modern theme but with thinner FRAME_PEN [0.75p])
  • classic: - The GMT classic theme
  • dark: - A modern theme variation with dark background.
  • A0|2[XY|XX|YY][atg][ag][g][H][V][NT|nt][ITit][Graph][Dark] Make a composition of these to select a theme. The main condition is that it starts with an A (Annotate). Hence A2 means annotate two axis and A0 means no axes at all. XY means to plot only left and bottom axes, YY only left and right and XX bottom and top. atg (or afg) means annotate, tick and grid lines. ag does not tick. H and V means grid lines will only be horizontal or vertical. Note, these require atg or ag. NT stands for not ticks at all and IT plots the ticks inside the axes. Graph adds a vector and to the end of each axis (sets XY), and Dark put the background in dark mode.
    • Example: A2YYg -> plot left and right axes (only) and add grid lines.
    • Example: A2Graph -> plot left and right axes (only) and adds arrows at the end of them

On top of the modern mode variations (so far dark only) one can set the following kwargs options:

  • noticks or no_ticks: Axes will have annotations but no tick marks
  • inner_ticks or innerticks: - Ticks will be drawn inside the axes instead of outside.
  • gray_grid or graygrid: - When drawing grid line use gray instead of black
  • save: - Save the name in the directory printed in shell by $gmt --show-userdir$ and make it permanent.
  • reset: - Remove the saved theme name and return to the default modern theme.

Note: Except save and reset, the changes operated by the kwargs are temporary and operate only until an image is show(n) or saved.

This function can be called alone, e.g. $theme("dark")$ or as an option in the $plot()$ module.

GMT.trend1dFunction
trend1d(cmd0::String="", arg1=nothing, kwargs...)

Fit a [weighted] [robust] polynomial/Fourier model for y = f(x) to xy[w] data.

Full option list at trend1d

Parameters

  • F | output :: [Type => Str] $Arg = xymrw|p|P|c$

    Specify up to five letters from the set {x y m r w} in any order to create columns of output. (http://docs.generic-mapping-tools.org/latest/trend1d.html#f)

  • N | n_model :: [Type => Str] $Arg = [p|P|f|F|c|C|s|S|x]n[,…][+llength][+oorigin][+r]$

    Specify Specify the number of terms in the model, n_model, and append +r to do a robust fit. E.g., a robust bilinear model is -N4+r. (http://docs.generic-mapping-tools.org/latest/trend1d.html#n)

  • C | condition_number :: [Type => Number] $Arg = condition_number$

    Set the maximum allowed condition number for the matrix solution. (http://docs.generic-mapping-tools.org/latest/trend1d.html#c)

  • I | confidence_level :: [Type => Number | []] $Arg = [confidence_level]$

    Iteratively increase the number of model parameters, starting at one, until nmodel is reachedx or the reduction in variance of the model is not significant at the confidencelevel level. (http://docs.generic-mapping-tools.org/latest/trend1d.html#i)

  • W | weights :: [Type => Str | []] $Arg = [+s]$

    Weights are supplied in input column 3. Do a weighted least squares fit [or start with these weights when doing the iterative robust fit]. (http://docs.generic-mapping-tools.org/latest/trend1d.html#w)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • b | binary :: [Type => Str]

    (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • d | nodata :: [Type => Str or Number] $Arg = [i|o]nodata$

    Control how user-coded missing data values are translated to official NaN values in GMT. (http://docs.generic-mapping-tools.org/latest/gmt.html#d-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • w | wrap | cyclic :: [Type => Str or Number] $Arg = [[-]n]$

    Convert input records to a cyclical coordinate. (http://docs.generic-mapping-tools.org/latest/gmt.html#w-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.trend2dFunction
trend2d(cmd0::String="", arg1=nothing, kwargs...)

Fit a [weighted] [robust] polynomial model for z = f(x,y) to xyz[w] data.

Full option list at trend2d

Parameters

  • F | output :: [Type => Str] $Arg = xyzmrw|p$

    Specify up to five letters from the set {x y m r w} in any order to create columns of output. (http://docs.generic-mapping-tools.org/latest/trend2d.html#f)

  • N | n_model :: [Type => Str] $Arg = n_model[+r]$

    Specify the number of terms in the model, n_model, and append +r to do a robust fit. E.g., a robust bilinear model is N="4+r". (http://docs.generic-mapping-tools.org/latest/trend2d.html#n)

  • C | condition_number :: [Type => Number] $Arg = condition_number$

    Set the maximum allowed condition number for the matrix solution. (http://docs.generic-mapping-tools.org/latest/trend2d.html#c)

  • I | confidence_level :: [Type => Number | []] $Arg = [confidence_level]$

    Iteratively increase the number of model parameters, starting at one, until nmodel is reachedx or the reduction in variance of the model is not significant at the confidencelevel level. (http://docs.generic-mapping-tools.org/latest/trend2d.html#i)

  • W | weights :: [Type => Str | []] $Arg = [+s]$

    Weights are supplied in input column 4. Do a weighted least squares fit [or start with these weights when doing the iterative robust fit]. (http://docs.generic-mapping-tools.org/latest/trend2d.html#w)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • b | binary :: [Type => Str]

    (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • d | nodata :: [Type => Str or Number] $Arg = [i|o]nodata$

    Control how user-coded missing data values are translated to official NaN values in GMT. (http://docs.generic-mapping-tools.org/latest/gmt.html#d-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • w | wrap | cyclic :: [Type => Str or Number] $Arg = [[-]n]$

    Convert input records to a cyclical coordinate. (http://docs.generic-mapping-tools.org/latest/gmt.html#w-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.triangulateFunction
triangulate(cmd0::String="", arg1=nothing; kwargs...)

Reads randomly-spaced x,y,z and performs Delaunay triangulation, i.e., it find how the points should be connected to give the most equilateral triangulation possible.

Full option list at triangulate

Parameters

  • A | area :: [Type => Number]

    Compute the area of the Cartesian triangles and append the areas in the output segment headers [no areas calculated]. Requires triangles and is not compatible with voronoi (GMT >= 6.4).

  • C | slope_grid :: [Type => Number]

    Read a slope grid (in degrees) and compute the propagated uncertainty in the bathymetry using the CURVE algorithm (http://docs.generic-mapping-tools.org/latest/triangulate.html#a)

  • D | derivatives :: [Type => Str]

    Take either the x- or y-derivatives of surface represented by the planar facets (only used when G is set). (http://docs.generic-mapping-tools.org/latest/triangulate.html#d)

  • E | empty :: [Type => Str | Number]

    Set the value assigned to empty nodes when G is set [NaN]. (http://docs.generic-mapping-tools.org/latest/triangulate.html#e)

  • G | save | outgrid | outfile :: [Type => Str]

    Use triangulation to grid the data onto an even grid (specified with R I). Append the name of the output grid file. (http://docs.generic-mapping-tools.org/latest/triangulate.html#g)

  • I | inc | increment | spacing :: [Type => Str] $Arg = xinc[unit][+e|n][/yinc[unit][+e|n]]]$

    x_inc [and optionally y_inc] is the grid spacing. Optionally, append an increment unit. (http://docs.generic-mapping-tools.org/latest/triangulate.html#i)

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • L | index :: [Type => Bool]

    Give name of file with previously computed Delaunay information. If the indexfile is binary and can be read the same way as the binary input table then you can append +b to spead up the reading (GMT6.4). (http://docs.generic-mapping-tools.org/latest/triangulate.html#l)

  • M | network :: [Type => Bool]

    Output triangulation network as multiple line segments separated by a segment header record. (http://docs.generic-mapping-tools.org/latest/triangulate.html#m)

  • N | ids :: [Type => Bool]

    Used in conjunction with G to also write the triplets of the ids of all the Delaunay vertices (http://docs.generic-mapping-tools.org/latest/triangulate.html#n)

  • Q | voronoi :: [Type => Str | []]

    Output the edges of the Voronoi cells instead Default is Delaunay triangle edges

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • S | triangles :: [Type => Bool]

    Output triangles as polygon segments separated by a segment header record. Requires Delaunay triangulation. (http://docs.generic-mapping-tools.org/latest/triangulate.html#s)

  • T | edges :: [Type => Bool]

    Output edges or polygons even if gridding has been selected with the G option (http://docs.generic-mapping-tools.org/latest/triangulate.html#t)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • Z | xyz | triplets :: [Type => Bool]

    (http://docs.generic-mapping-tools.org/latest/triangulate.html#z)

  • bi | binary_in :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary format for primary input (secondary inputs are always ASCII). (http://docs.generic-mapping-tools.org/latest/gmt.html#bi-full)

  • bo | binary_out :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary output. (http://docs.generic-mapping-tools.org/latest/gmt.html#bo-full)

  • di | nodata_in :: [Type => Str or Number] $Arg = nodata$

    Examine all input columns and if any item equals nodata we interpret this value as a missing data item and substitute the value NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#di-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • r | reg | registration :: [Type => Bool or []]

    Force pixel node registration [Default is gridline registration]. (http://docs.generic-mapping-tools.org/latest//gmt.html#r-full)

  • w | wrap | cyclic :: [Type => Str or Number] $Arg = [[-]n]$

    Convert input records to a cyclical coordinate. (http://docs.generic-mapping-tools.org/latest/gmt.html#w-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.triplotMethod

triplot(in::Matrix; onlyedges::Bool=false, noplot::Bool=false, kw...)

Plots the 2-D triangulation or Voronoi polygons defined by the points in a matrix

  • in: The input data. Can be either a Mx2 or Mx3 matrix.
  • noplot: Return the computed Delaunay or Veronoi data instead of plotting it (the default).
  • onlyedges: By default we compute Delaunay tringles or Veronoi cells as polygons. Use this option as onlyedges=true to compute multiple line segments.
  • region: Sets the data region (xmin,xmax,ymin,ymax) for voronoi (required). If not provided we compute it from in.
  • voronoi: Compute Voronoi cells instead of Delaunay triangles (requires region).
  • kw...: Are keyword arguments used in the $plot$ module (ignore if noplot=true).

Returns

A GMTdataset if noplot=true or $nothing$ otherwise.

Example:

triplot(rand(5,2), voronoi=true, show=true)

triplot(rand(5,3), lc=:red, show=true)

GMT.veloFunction
velo(cmd0::String="", arg1=nothing; kwargs...)

Plot velocity vectors, crosses, and wedges.

Full option list at velo

    velo(mat2ds([0. -8 0 0 4 6 0.5; -8 5 3 3 0 0 0.5], ["4x6", "3x3"]), pen=(0.6,:red), fill_wedges=:green, outlines=true, Se="0.2/0.39/18", arrow="0.3c+p1p+e+gred", region=(-15,10,-10,10), show=1)
GMT.vlinesFunction
vlines(arg; decorated=(...), kwargs...)

Plots one or a collection of vertical lines with eventual decorations

  • B | frame | axis | xaxis yaxis:: [Type => Str]

    Set map boundary frame and axes attributes. (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • W | pen | line_attrib :: [Type => Str]

    Set pen attributes for the horizontal lines (http://docs.generic-mapping-tools.org/latest/plot.html#w)

Example:

plot(rand(5,3), region=[0,1,0,1])
vlines!([0.2, 0.6], pen=(1, :red), show=true)
GMT.wiggleFunction
wiggle(cmd0::String="", arg1=nothing; kwargs...)

Reads (length,azimuth) pairs from file and plot a windwiggle diagram.

Full option list at pswiggle

Parameters

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • Z | scale :: [Type => Number | Str]

    Gives anomaly scale in data-units/distance-unit. (http://docs.generic-mapping-tools.org/latest/wiggle.html#a)

  • A | azimuth :: [Type => Str | number]

    Sets the preferred positive azimuth. Positive wiggles will “gravitate” towards that direction. (http://docs.generic-mapping-tools.org/latest/wiggle.html#a)

  • B | frame | axis | xaxis yaxis:: [Type => Str]

    Set map boundary frame and axes attributes. (http://docs.generic-mapping-tools.org/latest/gmt.html#b-full)

  • C | center :: [Type => Number]

    Subtract center from the data set before plotting [0]. (http://docs.generic-mapping-tools.org/latest/wiggle.html#c)

  • D | scale_bar :: [Type => Str]

    Defines the reference point on the map for the vertical scale bar using one of four coordinate systems. (http://docs.generic-mapping-tools.org/latest/wiggle.html#d)

  • F | box :: [Type => Str]

    Without further options, draws a rectangular border around the vertical scale bar. (http://docs.generic-mapping-tools.org/latest/wiggle.html#f)

  • G | fill :: [Type => Number | Str]

    Set fill shade, color or pattern for positive and/or negative wiggles [Default is no fill]. (http://docs.generic-mapping-tools.org/latest/wiggle.html#g)

  • I | fixed_azim :: [Type => Number]

    Set a fixed azimuth projection for wiggles [Default uses track azimuth, but see -A]. (http://docs.generic-mapping-tools.org/latest/wiggle.html#i)

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • P | portrait :: [Type => Bool or []]

    Tell GMT to NOT draw in portrait mode (that is, make a Landscape plot)

  • T | track :: [Type => Number or Str | Tuple | []]

    Draw track [Default is no track]. Append pen attributes to use [Defaults: width = 0.25p, color = black, style = solid]. (http://docs.generic-mapping-tools.org/latest/wiggle.html#t)

  • W | pen :: [Type => Number | Str | tuple | []]

    Specify outline pen attributes [Default is no outline]. (http://docs.generic-mapping-tools.org/latest/wiggle.html#w)

  • U | time_stamp | timestamp :: [Type => Str or Bool or []] $Arg = [[just]/dx/dy/][c|label]$

    Draw GMT time stamp logo on plot. (http://docs.generic-mapping-tools.org/latest/gmt.html#u-full)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • X | x_offset | xshift :: [Type => Str] $Arg = [a|c|f|r][x-shift[u]]$

  • Y | y_offset | yshift :: [Type => Str] $Arg = [a|c|f|r][y-shift[u]]$

    Shift plot origin relative to the current origin by (x-shift,y-shift) and optionally append the length unit (c, i, or p). (http://docs.generic-mapping-tools.org/latest/gmt.html#xy-full)

  • bi | binary_in :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary format for primary input (secondary inputs are always ASCII). (http://docs.generic-mapping-tools.org/latest/gmt.html#bi-full)

  • di | nodata_in :: [Type => Str or Number] $Arg = nodata$

    Examine all input columns and if any item equals nodata we interpret this value as a missing data item and substitute the value NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#di-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • p | view | perspective :: [Type => Str or List] $Arg = [x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0]$

    Selects perspective view and sets the azimuth and elevation of the viewpoint [180/90]. (http://docs.generic-mapping-tools.org/latest/gmt.html#perspective-full)

  • t | alpha | transparency :: [Type => Str] $Arg = transp$

    Set PDF transparency level for an overlay, in (0-100] percent range. [Default is 0, i.e., opaque]. (http://docs.generic-mapping-tools.org/latest/gmt.html#t-full)

  • w | wrap | cyclic :: [Type => Str or Number] $Arg = [[-]n]$

    Convert input records to a cyclical coordinate. (http://docs.generic-mapping-tools.org/latest/gmt.html#w-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

  • savefig | figname | name :: [Type => Str]

    Save the figure with the figname=name.ext where ext chooses the figure format (e.g. figname="name.png")

GMT.wkt2projMethod
wkt2proj(wkt_str::String)

Convert a WKT SRS string into the PROJ4 form.

GMT.wmsinfoMethod
wmsinfo(server::String)

Read the xml information from the WebMapServer service and create a WMS data type that holds the information necessary to download the data. The $show$ method will display the contents of the WMS data type.

  • server: The server URL address.

Example

wms = wmsinfo("http://tiles.maps.eox.at/wms?")

As an option, use the form

wmsinfo(wms::WMS; layer)

to get further information, in particular the number of bands and sizes, of the layer number or layer name layer. wms is returned by the first form.

GMT.wmsreadMethod
wmsread(wms::WMS; layer, kwargs...)

Read the layer number provided by the service from which the wms type was created.

Parameters

  • wms: A WMS type obtained from the $wmsinfo$ function.
  • layer: The layer number or layer name of interest from those provided by the WMS service. That is, both of these forms are allowed: layer=3 or layer="Invented layer name"

kwargs is the keywords/values pairs used to set

  • region | limits: The region limits. This can be a Tuple or Array with 4 elements defining the $(xmin, xmax, ymin, ymax)$ or a string defining the limits in all ways that GMT can recognize. When the layer has the data projected, we can a Tuple or Array with 3 elements $(lon0, lat0, width)$, where first two set the center of a square in geographical coordinates and the third ($width$) is the width of that box in meters.
  • cellsize | pixelsize | resolution | res: Sets the requested cell size in meters [default]. Use a string appended with a 'd' (e.g. resolution="0.001d") if the resolution is given in degrees. This way works only when the layer is in geogs.
  • size: Alternatively to the the cellsize use this option, a tuple or array with two elements, to specify the image dimensions. Example, size=(1200, 100) to get an image with 1200 rows and 100 columns.
  • time: Some services provide data along time. Use this option to provide a time string as provided by DateTime. For example: time=string(DateTime(2021,10,29))

Returns

A GMTimage

Examples

wms = wmsinfo("http://tiles.maps.eox.at/wms?")
img = wmsread(wms, layer=3, region=(-10,-5,37,44), pixelsize=500);

# Retrieve and display a MODIS image
wms = wmsinfo("https://gibs-c.earthdata.nasa.gov/wms/epsg4326/best/wms.cgi");
img = wmsread(wms, layer="MODIS_Terra_CorrectedReflectance_TrueColor", region=(9,22,32,43), time="2021-10-29T00:00:00", pixelsize=750);
imshow(img, proj=:guess)
GMT.wmstestMethod
wmstest(wms::WMS; layer, size::Bool=false, kwargs...)

Test function that generates the GetMap request string or the size of the resulting image given the requested resolution. It is meant to generate first the command that gets the image/grid but not running it. Specially usefull to check that the resulting image size is not huge.

Parameters

  • wms: A WMS type obtained from the $wmsinfo$ function.
  • layer: The layer number or layer name of interest from those provided by the WMS service. That is, both of these forms are allowed: layer=3 or layer="Invented layer name"
  • size: If $false$, returns the GetMap request string, otherwise the image size given the requested resolution.

kwargs is the keywords/values pairs used to set

  • region | limits: The region limits. This can be a Tuple or Array with 4 elements defining the $(xmin, xmax, ymin, ymax)$ or a string defining the limits in all ways that GMT can recognize. When the layer has the data projected, we can a Tuple or Array with 3 elements $(lon0, lat0, width)$, where first two set the center of a square in geographical coordinates and the third ($width$) is the width of that box in meters.
  • cellsize | pixelsize | resolution | res: Sets the requested cell size in meters [default]. Use a string appended with a 'd' (e.g. resolution="0.001d") if the resolution is given in degrees. This way works only when the layer is in geogs.

Returns

Either a the GetMap request string (when size=false) or the resulting image/grid size dim_x, dim_y

Example

wmstest(wms, layer=34, region=(-8,39, 100000), pixelsize=100)

"WMS:http://tiles.maps.eox.at/?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=s2cloudless-2020_3857&SRS=EPSG:900913&BBOX=-940555.9,4671671.6,-840555.9,4771671.68&FORMAT=image/jpeg&TILESIZE=256&OVERVIEWCOUNT=18&MINRESOLUTION=0.59716428347794&TILED=true"
GMT.xy2lonlatFunction
xy2lonlat(xy::Matrix{<:Real}; s_srs, t_srs="+proj=longlat +datum=WGS84")

or

xy2lonlat(D::GMTdataset; s_srs, t_srs="+proj=longlat +datum=WGS84")

Computes the inverse projection from XY to LonLat in the given projection. The output is assumed to be in WGS84. If that isn't right, pass the appropriate projection info via the t_srs option (PROJ4, WKT, EPSG).

Parameters

  • xy: The input data. It can be a Matrix, or a GMTdataset (or vector of it)
  • s_srs: The data projection system. This can be a PROJ4, a WKT string or EPSG code
  • t_srs: The target SRS. If the default is not satisfactory, provide a new projection info (PROJ4, WKT, EPSG)

Returns

A Matrix if input is a Matrix or a GMTdadaset if input had that type

GMT.xyz2grdFunction
xyz2grd(cmd0::String="", arg1=nothing; kwargs...)

Convert data table to a grid file.

Full option list at xyz2grd

Parameters

  • I | inc | increment | spacing :: [Type => Str] $Arg = xinc[unit][+e|n][/yinc[unit][+e|n]]]$

    x_inc [and optionally y_inc] is the grid spacing. Optionally, append an increment unit. (http://docs.generic-mapping-tools.org/latest/xyz2grd.html#i)

  • R | region | limits :: [Type => Str or list or GMTgrid|image] $Arg = (xmin,xmax,ymin,ymax)$

    Specify the region of interest. Set to data minimum BoundinBox if not provided. (http://docs.generic-mapping-tools.org/latest/gmt.html#r-full)

  • A | multiple_nodes :: [Type => Str] Arg = [d|f|l|m|n|r|S|s|u|z]

    By default we will calculate mean values if multiple entries fall on the same node. Use A to change this behavior. (http://docs.generic-mapping-tools.org/latest/xyz2grd.html#a)

  • D | header :: [Type => Str] Arg = [+xxname][+yyname][+zzname][+sscale][+ooffset][+ninvalid][+ttitle][+rremark]

    Output edges (http://docs.generic-mapping-tools.org/latest/xyz2grd.html#d)

  • G | save | outgrid | outfile :: [Type => Str]

    Output grid file name. Note that this is optional and to be used only when saving the result directly on disk. Otherwise, just use the G = grdclip(....) form. (http://docs.generic-mapping-tools.org/latest/xyz2grd.html#g)

  • J | proj | projection :: [Type => String]

    Select map projection. Defaults to 14x9.5 cm with linear (non-projected) maps. (http://docs.generic-mapping-tools.org/latest/gmt.html#j-full)

  • S | swap :: [Type => Str | []] Arg = [zfile]

    Swap the byte-order of the input only. No grid file is produced. (http://docs.generic-mapping-tools.org/latest/xyz2grd.html#s)

  • V | verbose :: [Type => Bool or Str] $Arg = [level]$

    Select verbosity level, which will send progress reports to stderr. (http://docs.generic-mapping-tools.org/latest/gmt.html#v-full)

  • Z | flags :: [Type => Str]

    Read a 1-column table. This assumes that all the nodes are present and sorted according to specified ordering convention contained in. $flags$. (http://docs.generic-mapping-tools.org/latest/xyz2grd.html#z)

  • bi | binary_in :: [Type => Str] $Arg = [ncols][type][w][+L|+B]$

    Select native binary format for primary input (secondary inputs are always ASCII). (http://docs.generic-mapping-tools.org/latest/gmt.html#bi-full)

  • di | nodata_in :: [Type => Str or Number] $Arg = nodata$

    Examine all input columns and if any item equals nodata we interpret this value as a missing data item and substitute the value NaN. (http://docs.generic-mapping-tools.org/latest/gmt.html#di-full)

  • e | pattern | find :: [Type => Str] $Arg = [~]”pattern” | -e[~]/regexp/[i]$

    Only accept ASCII data records that contains the specified pattern. (http://docs.generic-mapping-tools.org/latest/gmt.html#e-full)

  • f | colinfo | coltypes | coltype :: [Type => Str] $Arg = [i|o]colinfo$

    Specify the data types of input and/or output columns (time or geographical data). (http://docs.generic-mapping-tools.org/latest/gmt.html#f-full)

  • h | header :: [Type => Str] $Arg = [i|o][n][+c][+d][+rremark][+ttitle]$

    Primary input file(s) has header record(s). (http://docs.generic-mapping-tools.org/latest/gmt.html#h-full)

  • i | incols | incol :: [Type => Str] $Arg = cols[+l][+sscale][+ooffset][,…]$

    Select specific data columns for primary input, in arbitrary order. (http://docs.generic-mapping-tools.org/latest/gmt.html#icols-full)

  • r | reg | registration :: [Type => Bool or []]

    Force pixel node registration [Default is gridline registration]. (http://docs.generic-mapping-tools.org/latest//gmt.html#r-full)

  • w | wrap | cyclic :: [Type => Str or Number] $Arg = [[-]n]$

    Convert input records to a cyclical coordinate. (http://docs.generic-mapping-tools.org/latest/gmt.html#w-full)

  • yx :: [Type => Str or Bool or []] $Arg = [i|o]$

    Swap 1st and 2nd column on input and/or output. (http://docs.generic-mapping-tools.org/latest/gmt.html#colon-full)

GMT.yeardecimalMethod
yeardecimal(date)

Convert a Date or DateTime or a string representation of them to decimal years.

Example

yeardecimal(now())
GMT.GMTModule

GMT manipulating geographic and Cartesian data sets (including filtering, trend fitting, gridding, projecting, etc.) and producing high quality illustrations.

Full modules list and docs in terse GMT style at http://docs.generic-mapping-tools.org/latest/

Documentation for GMT.jl at https://www.generic-mapping-tools.org/GMT.jl/latest/

GMT.DrawingModule

Submodule where the symbols of plot were elevated to the category of functions. The functions that are currently available are:

  • circle(x, y, diameter, kw...)
  • cross(x, y, diameter; kw...)
  • custom(x, y, name, size; kw...)
  • diamond(x, y, diameter; kw...)
  • hexagon(x, y, diameter; kw...)
  • itriangle(x, y, diameter; kw...)
  • letter(x, y, size, str, font, just; kw...)
  • minus(x, y, length; kw...)
  • pentagon(x, y, diameter; kw...)
  • plus(x, y, diameter; kw...)
  • square(x, y, diameter; kw...)
  • star(x, y, diameter; kw...)
  • triangle(x, y, diameter; kw...)
  • ydash(x, y, length; kw...)
  • box(x, y, width, height; kw...)
  • rect(x, y, width, height; kw...)
  • ellipse(x, y, angle, majoraxis, minoraxis; kw...)
  • ellipseAz(x, y, azimuth, majoraxis, minoraxis; kw...)
  • rotrect(x, y, angle, width, height; kw...)
  • rotrectAz(x, y, azimuth, width, height; kw...)
  • roundrect(x, y, width, height, radius; kw...)

For all symbols, except box, diameter is the diametr of the circumscribing circle and x,y the coordinates of its center. box is the exception in that those are the coordinates of the lower left corner.

This submodule uses global variables to track the first, middle and last layers in the stack plot but in case of errors that track may be left in error state too. So, when one want to force the begining of a new figure use the kwarg first=true. Likewise, if we want to add to a previously, still open fig, use first=false.

By default the plot unites is $cm$ but we can select $points$ by doing units=:points. This takes care of setting the appropriate region (A4 by default) and fig scale. If other then A4 size is wished, use paper=:A3 (or any of the common paper sizes). When units is left to $cm$ the normal paper size ruple applies (i.e. A4 for PS format or ~unlimitted for others.)

The kw... in the functions arguments are the normal kwargs that one can use in the plot module.

Example, to draw a cute litte car:

ellipse(300,201,0, 200, 50, units=:points, fill=:purple, pen=1)
ellipse(340,206, 0,130, 66, fill=:purple, pen=1)
ellipse(318,222,0, 60, 26, fill=:blue)
box(200, 173, 205, 26, fill=:purple, pen=1)
circle(305,185,56, fill=:black)
circle(305,185,36, fill=:gray50)
circle(400,185,56, fill=:black)
circle(400,185,36, fill=:gray50, show=true)
GMT.Gdal.boundaryMethod
boundary(geom; gdataset=false)

Parameters

  • geom: the geometry. This can either be a GDAL AbstractGeometry or a GMTdataset (or vector of it), or a Matrix
  • gdataset: Returns a GDAL IGeometry even when input are GMTdataset or Matrix

A new geometry object is created and returned containing the boundary of the geometry on which the method is invoked.

Returns

A GMT dataset when input is a Matrix or a GMT type (except if gdaset=true), or a GDAL IGeometry otherwise

GMT.Gdal.bufferFunction
buffer(geom, dist::Real, quadsegs::Integer=30; gdataset=false)

Parameters

  • geom: the geometry. This can either be a GDAL AbstractGeometry or a GMTdataset (or vector of it), or a Matrix
  • dist: the buffer distance to be applied. Should be expressed into the same unit as the coordinates of the geometry.
  • quadsegs: the number of segments used to approximate a 90 degree (quadrant) of curvature.
  • gdataset: Returns a GDAL IGeometry even when input is a GMTdataset or Matrix

Compute buffer of geometry.

Builds a new geometry containing the buffer region around the geometry on which it is invoked. The buffer is a polygon containing the region within the buffer distance of the original geometry.

Some buffer sections are properly described as curves, but are converted to approximate polygons. The quadsegs parameter can be used to control how many segments should be used to define a 90 degree curve - a quadrant of a circle. A value of 30 is a reasonable default. Large values result in large numbers of vertices in the resulting buffer geometry while small numbers reduce the accuracy of the result.

Returns

A GMT dataset when input is a Matrix or a GMT type (except if gdaset=true), or a GDAL IGeometry otherwise

GMT.Gdal.centroidMethod
centroid(geom; gdataset=false)

Parameters

  • geom: the geometry. This can either be a GDAL AbstractGeometry or a GMTdataset (or vector of it), or a Matrix
  • gdataset: Returns a GDAL IGeometry even when input is a GMTdataset or Matrix

Compute the geometry centroid.

The centroid is not necessarily within the geometry.

(This method relates to the SFCOM ISurface::get_Centroid() method however the current implementation based on GEOS can operate on other geometry types such as multipoint, linestring, geometrycollection such as multipolygons. OGC SF SQL 1.1 defines the operation for surfaces (polygons). SQL/MM-Part 3 defines the operation for surfaces and multisurfaces (multipolygons).)

Returns

A GMT dataset when input is a Matrix or a GMT type (except if gdaset=true), or a GDAL IGeometry otherwise

GMT.Gdal.containsMethod
contains(geom1, geom2)

Parameters

  • geom1: the geometry. This can either be a GDAL AbstractGeometry or a GMTdataset (or vector of it), or a Matrix
  • geom2: Second geometry. AbstractGeometry if geom1::AbstractGeometry or a GMTdataset/Matrix if geom1 is GMT type

Returns true if g1 contains g2.

GMT.Gdal.convexhullMethod
convexhull(geom; gdataset=false)

Parameters

  • geom: the geometry. This can either be a GDAL AbstractGeometry or a GMTdataset (or vector of it), or a Matrix
  • gdataset: Returns a GDAL IGeometry even when input are GMTdataset or Matrix

A new geometry object is created and returned containing the convex hull of the geometry on which the method is invoked.

Returns

A GMT dataset when input is a Matrix or a GMT type (except if gdaset=true), or a GDAL IGeometry otherwise

GMT.Gdal.crossesMethod
crosses(geom1, geom2)

Parameters

  • geom1: the geometry. This can either be a GDAL AbstractGeometry or a GMTdataset (or vector of it), or a Matrix
  • geom2: Second geometry. AbstractGeometry if geom1::AbstractGeometry or a GMTdataset/Matrix if geom1 is GMT type

Returns true if the geometries are crossing.

GMT.Gdal.delaunaytriangulationMethod
delaunay(geom::AbstractGeometry, tol::Real=0, onlyedges::Bool=true; gdataset=false)

Parameters

  • geom: the geometry.
  • tol: optional snapping tolerance to use for improved robustness
  • onlyedges: if true, will return a MULTILINESTRING, otherwise it will return a GEOMETRYCOLLECTION containing triangular POLYGONs.
  • gdataset: Returns a GDAL IGeometry even when input is GMTdataset or Matrix

Return a Delaunay triangulation of the vertices of the geometry.

GMT.Gdal.differenceMethod
difference(geom1, geom2; gdataset=false)

Parameters

  • geom1: the geometry. This can either be a GDAL AbstractGeometry or a GMTdataset (or vector of it), or a Matrix
  • geom2: Second geometry. AbstractGeometry if geom1::AbstractGeometry or a GMTdataset/Matrix if geom1 is GMT type
  • gdataset: Returns a GDAL IGeometry even when input is GMTdataset or Matrix

Generates a new geometry which is the region of this geometry with the region of the other geometry removed.

Returns

A GMT dataset when input is a Matrix or a GMT type (except if gdaset=true), or a GDAL IGeometry otherwise

GMT.Gdal.disjointMethod
disjoint(geom1, geom2)

Parameters

  • geom1: the geometry. This can either be a GDAL AbstractGeometry or a GMTdataset (or vector of it), or a Matrix
  • geom2: Second geometry. AbstractGeometry if geom1::AbstractGeometry or a GMTdataset/Matrix if geom1 is GMT type

Returns true if the geometries are disjoint.

GMT.Gdal.distanceMethod
distance(geom1, geom2)

Parameters

  • geom1: the geometry. This can either be a GDAL AbstractGeometry or a GMTdataset (or vector of it), or a Matrix
  • geom2: Second geometry. AbstractGeometry if geom1::AbstractGeometry or a GMTdataset/Matrix if geom1 is GMT type

Returns the distance between the geometries or -1 if an error occurs.

GMT.Gdal.ditherFunction
dither(indata; n_colors=256, save="", gdataset=false)

Convert a 24bit RGB image to 8bit paletted.

  • Use the save=fname option to save the result to disk in a GeoTiff file fname. If fname has no extension a .tif one will be appended. Alternatively give file names with extension .png or .nc to save the file in one of those formats.
  • gdataset=true: to return a GDAL dataset. The default is to return a GMTimage object.
  • n_colors: Select the number of colors in the generated color table. Defaults to 256.
GMT.Gdal.envelopeMethod
envelope(geom)

Parameters

  • geom: the geometry. This can either be a GDAL AbstractGeometry or a GMTdataset (or vector of it), or a Matrix

Computes and returns the bounding envelope for this geometry.

GMT.Gdal.envelope3dMethod
envelope3d(geom)

Parameters

  • geom: the geometry. This can either be a GDAL AbstractGeometry or a GMTdataset (or vector of it), or a Matrix

Computes and returns the bounding envelope (3D) for this geometry

GMT.Gdal.equalsMethod
equals(geom1, geom2)

Parameters

  • geom1: the geometry. This can either be a GDAL AbstractGeometry or a GMTdataset (or vector of it), or a Matrix
  • geom2: Second geometry. AbstractGeometry if geom1::AbstractGeometry or a GMTdataset/Matrix if geom1 is GMT type

Returns true if the geometries are equivalent.

GMT.Gdal.gdaldemFunction
gdaldem(dataset, method, options=String[]; dest="/vsimem/tmp", colorfile=name|GMTcpt, kw...)

Tools to analyze and visualize DEMs.

Parameters

  • dataset The source dataset.
  • method the processing to apply (one of "hillshade", "slope", "aspect", "color-relief", "TRI", "TPI", "Roughness").
  • options List of options (potentially including filename and open options). The accepted options are the ones of the gdaldem utility.

Keyword Arguments

  • colorfile color file (mandatory for "color-relief" processing, should be empty otherwise).
  • kw... keyword=value arguments when method is hillshade.

Returns

A GMT grid or Image, or a GDAL dataset (or nothing if file was writen on disk).

GMT.Gdal.gdaltranslateFunction
gdaltranslate(indata, options=String[]; dest="/vsimem/tmp", kwargs...)

Convert raster data between different formats and other operations also provided by the GDAL 'gdal_translate' tool. Namely sub-region extraction and resampling. The kwargs options accept the GMT region (-R), increment (-I), target SRS (-J). Any of the keywords outgrid, outfile or save = outputname options to make this function save the result in disk in the file 'outputname'. The file format is picked from the 'outputname' file extension. When no output file name is provided it returns a GMT object (either a grid or an image, depending on the input type). To force the return of a GDAL dataset use the option gdataset=true.

  • indata: Input data. It can be a file name, a GMTgrid or GMTimage object or a GDAL dataset
  • options: List of options. The accepted options are the ones of the gdal_translate utility. This list can be in the form of a vector of strings, or joined in a simgle string.
  • kwargs: Besides what was mentioned above one can also use meta=metadata, where metadata is a string vector with the form "NAME=...." for each of its elements. This data will be recognized by GDAL as Metadata.

Returns

A GMT grid or Image, or a GDAL dataset (or nothing if file was writen on disk).

GMT.Gdal.gdalvectortranslateFunction
ogr2ogr(indata, options=String[]; dest="/vsimem/tmp", kwargs...)

Parameters

  • indata The source dataset.
  • options List of options (potentially including filename and open options). The accepted options are the ones of the gdalwarp utility.
  • kw are kwargs that may contain the GMT region (-R), proj (-J), inc (-I) and save=fname options

Returns

A GMT dataset, or a GDAL dataset (or nothing if file was writen on disk).

GMT.Gdal.gdalwarpFunction
gdalwarp(indata, options=String[]; dest="/vsimem/tmp", kwargs...)

Image reprojection and warping function.

Parameters

  • indata: Input data. It can be a file name, a GMTgrid or GMTimage object or a GDAL dataset
  • options: List of options (potentially including filename and open options). The accepted options are the ones of the gdalwarp utility.
  • kwargs: Are kwargs that may contain the GMT region (-R), proj (-J), inc (-I) and save=fname options

Returns

A GMT grid or Image, or a GDAL dataset (or nothing if file was writen on disk).

GMT.Gdal.geomareaMethod
geomarea(geom)

Parameters

  • geom: the geometry. This can either be a GDAL AbstractGeometry or a GMTdataset (or vector of it), or a Matrix

Returns the area of the geometry or 0.0 for unsupported geometry types.

GMT.Gdal.geomlengthMethod
geomlength(geom)

Parameters

  • geom: the geometry. This can either be a GDAL AbstractGeometry or a GMTdataset (or vector of it), or a Matrix

Returns the length of the geometry, or 0.0 for unsupported geometry types.

GMT.Gdal.intersectionMethod
intersection(geom1, geom2; gdataset=false)

Parameters

  • geom1: the geometry. This can either be a GDAL AbstractGeometry or a GMTdataset (or vector of it), or a Matrix
  • geom2: Second geometry. AbstractGeometry if geom1::AbstractGeometry or a GMTdataset/Matrix if geom1 is GMT type
  • gdataset: Returns a GDAL IGeometry even when input is GMTdataset or Matrix

Returns a new geometry representing the intersection of the geometries, or NULL if there is no intersection or an error occurs.

Generates a new geometry which is the region of intersection of the two geometries operated on. The intersects function can be used to test if two geometries intersect.

Returns

A GMT dataset when input is a Matrix or a GMT type (except if gdaset=true), or a GDAL IGeometry otherwise

GMT.Gdal.intersectsMethod
intersects(geom1, geom2)

Parameters

  • geom1: the geometry. This can either be a GDAL AbstractGeometry or a GMTdataset (or vector of it), or a Matrix
  • geom2: Second geometry. AbstractGeometry if geom1::AbstractGeometry or a GMTdataset/Matrix if geom1 is GMT type

Returns whether the geometries intersect

Determines whether two geometries intersect. If GEOS is enabled, then this is done in rigorous fashion otherwise true is returned if the envelopes (bounding boxes) of the two geometries overlap.

GMT.Gdal.overlapsMethod
overlaps(geom1, geom2)

Parameters

  • geom1: the geometry. This can either be a GDAL AbstractGeometry or a GMTdataset (or vector of it), or a Matrix
  • geom2: Second geometry. AbstractGeometry if geom1::AbstractGeometry or a GMTdataset/Matrix if geom1 is GMT type

Returns true if the geometries overlap.

GMT.Gdal.pointalonglineMethod
pointalongline(geom, distance::Real; gdataset=false)

Parameters

  • geom: the geometry. This can either be a GDAL AbstractGeometry or a GMTdataset (or vector of it), or a Matrix
  • distance: distance along the curve at which to sample position. This distance should be between zero and geomlength() for this curve.
  • gdataset: Returns a GDAL IGeometry even when input are GMTdataset or Matrix

Fetch point (or NULL) at given distance along curve.

Returns

A GMT dataset when input is a Matrix or a GMT type (except if gdaset=true), or a GDAL IGeometry otherwise

GMT.Gdal.polygonizeMethod
polygonize(geom; gdataset=false)

Parameters

  • geom: the geometry. This can either be a GDAL AbstractGeometry or a GMTdataset (or vector of it), or a Matrix
  • gdataset: Returns a GDAL IGeometry even when input are GMTdataset or Matrix

Polygonizes a set of sparse edges.

A new geometry object is created and returned containing a collection of reassembled Polygons: NULL will be returned if the input collection doesn't correspond to a MultiLinestring, or when reassembling Edges into Polygons is impossible due to topological inconsistencies.

Returns

A GMT dataset when input is a Matrix or a GMT type (except if gdaset=true), or a GDAL IGeometry otherwise

GMT.Gdal.polyunionMethod
polyunion(geom1, geom2; gdataset=false)

Parameters

  • geom1: the geometry. This can either be a GDAL AbstractGeometry or a GMTdataset (or vector of it), or a Matrix
  • geom2: Second geometry. AbstractGeometry if geom1::AbstractGeometry or a GMTdataset/Matrix if geom1 is GMT type
  • gdataset: Returns a GDAL IGeometry even when input is GMTdataset or Matrix

Computes a new geometry representing the union of the geometries.

Returns

A GMT dataset when input is a Matrix or a GMT type (except if gdaset=true), or a GDAL IGeometry otherwise

GMT.Gdal.setproj!Function
setproj!(type, proj)

Set a referencing system to the type object. This object can be a GMTgrid, a GMTimage, a GMTdataset or an AbstractDataset.

  • proj Is either a Proj4 string or a WKT. Alternatively, it can also be another grid, image or dataset type, in which case its referencing system is copied into type
GMT.Gdal.simplifyMethod
simplify(geom::AbstractGeometry, tol::Real; gdataset=false)

Compute a simplified geometry.

Parameters

  • geom: the geometry.
  • tol: the distance tolerance for the simplification.
  • gdataset: Returns a GDAL IGeometry even when input is GMTdataset or Matrix
GMT.Gdal.symdifferenceMethod
symdifference(geom1, geom2; gdataset=false)

Parameters

  • geom1: the geometry. This can either be a GDAL AbstractGeometry or a GMTdataset (or vector of it), or a Matrix
  • geom2: Second geometry. AbstractGeometry if geom1::AbstractGeometry or a GMTdataset/Matrix if geom1 is GMT type
  • gdataset: Returns a GDAL IGeometry even when input is GMTdataset or Matrix

Generates a new geometry representing the symmetric difference of the geometries or NULL if the difference is empty or an error occurs.

Returns

A GMT dataset when input is a Matrix or a GMT type (except if gdaset=true), or a GDAL IGeometry otherwise

GMT.Gdal.touchesMethod
touches(geom1, geom2)

Parameters

  • geom1: the geometry. This can either be a GDAL AbstractGeometry or a GMTdataset (or vector of it), or a Matrix
  • geom2: Second geometry. AbstractGeometry if geom1::AbstractGeometry or a GMTdataset/Matrix if geom1 is GMT type

Returns true if the geometries are touching.

GMT.Gdal.withinMethod
within(geom1, geom2)

Parameters

  • geom1: the geometry. This can either be a GDAL AbstractGeometry or a GMTdataset (or vector of it), or a Matrix
  • geom2: Second geometry. AbstractGeometry if geom1::AbstractGeometry or a GMTdataset/Matrix if geom1 is GMT type

Returns true if g1 is contained within g2.

GMT.Gdal.wrapgeomFunction

wrapgeom(geom::AbstractGeometry, proj="")

Wrap an geometry type into a GDAL dataset. Optionaly provide the SRS (proj4) via the PROJ option.
Handy function for saving a geometry on disk or visualize it with plot()
GMT.GdalModule

Small subset of the GDAL and ArcGDAL packages but with no extra dependencies. For the time being this sub-module is not intended to much direct use except some documented functions. Interested people should consult the GDAL & ArchGDAL docs.