Optional 1-Slider editing, changing the look of the HDR with only one slider. More than 20 built-in Extras; some expand on existing functions while others are used to add stylistic effects to HDRs.
Use 'a set of exposures' or a 'single image', it's up to you. Save history allows you to revert back to a previous version whenever it's needed. We distinguish between three types of vectors:. Examples of Cartesian left , circular middle , and geo-vectors right for different attribute specifications.
Note that both full and half arrow-heads can be specified, as well as no head at all. There are numerous attributes you can modify, including how the vector should be justified relative to the given point beginning, center, or end , where heads if any should be placed, if the head should just be the left or right half, if the vector attributes should shrink for vectors whose length are less than a given cutoff length, and the size and shape of the head.
These attributes are detailed further in the relevant manual pages. Examples of different vector heads and attributes. Other vector heads are the circle c , the terminal line t , the arrow fin i and the plain head A and tail I ; the last two are line-drawings only and cannot be filled.
For annotation labels or text strings plotted with text , GMT provides several escape sequences that allow the user to temporarily switch to the symbol font, turn on sub- or superscript, etc.
The escape sequences recognized in GMT are listed in Table escape. Only one level of sub- or superscript is supported. Note that under Windows the percent symbol indicates a batch variable, hence you must use two percent-signs for each one required in the escape sequence for font switching.
Shorthand notation for a few special European characters has also been added for others you must use the full octal code :.
PostScript fonts used in GMT may be re-encoded to include several accented characters used in many European languages. Only the special characters belonging to a particular encoding will be available. Many characters not directly available by using single octal codes may be constructed with the composite character mechanism!.
The option in text to draw a rectangle surrounding the text will not work for strings with escape sequences. Apart from visualizing your data sets, GMT maps can also be embellished in several ways. The 9 embellishments currently available are. Each of these features share a common system for specifying the location on the plot where the feature will be placed.
They also share a common way for specifying the placement of a rectangular panel behind the feature to provide a uniform background, for instance. The placement of a map feature here represented by a green rectangle in relation to the underlying map. The nine named reference points blue circles on the map perimeter and center can be used to specify a location. Using the same system of nine points on the map feature cyan circles we select one of these as our anchor point here TL, indicated by the orange square.
The feature is then placed such that its adjusted anchor point matches the reference point. Placing a feature on the map means selecting a reference point somewhere on the map, an anchor point somewhere on the feature, and then positioning the feature so that the two points overlap.
It may be helpful to consider the analog of a boat dropping an anchor: The boat navigates to the reference point and then, depending on where on the boat the anchor is located, moves so that the anchor connection point overlies the reference point, then drops the anchor. There are four different ways to specify the reference point on a map, allowing for complete freedom to select any location inside or outside the map.
The reference point syntax is [ g j J n x ] refpoint ; the five codes g j J n x refer to the five ways:. With the reference point taken care of, it is time to select the anchor point.
While the reference point selection gives unlimited flexibility to pick any point inside or outside the map region, the anchor point selection is limited to the nine justification points discussed for the j reference point code above. If an anchor point is not specified then it defaults to the justification point set for the reference point if j code was used to set it , or to the mirror opposite of the reference point if J code was used ; with all other specifications of the reference point, the anchor point takes on the default value of MC for map rose and map scale or BL all other map features.
It is likely that you will wish to offset the anchor point away from your selection by some arbitrary amount, particularly if the reference point is specified with j J code. These increments are added to the projected plot coordinates of the anchor point, with positive values moving the reference point in the same direction as the 2-character code of the anchor point implies.
Finally, the adjusted anchor point is matched with the reference point. In other words, the top left corner of the map feature will end up 2 cm to the right and 1 cm below the selected reference point. When using middle M or center C justifications, to offset works the same way as bottom B or left L , respectively, i.
For most maps you will wish to place a background panel of uniform color behind any of the map features you plan to add. Because the panel is linked to the map feature you have selected, the parameters such as location and dimensions are handled automatically.
What remains is to specify the attributes of the panel. Here is a list of the attributes that are under your control:. A map panel is a rectangular background placed behind any of the map features. It has several attributes that can be changed with panel option modifiers.
Traditionally, a map scale is added to maps for helping the reader understand the particular scale used for this map, i. Depending on the map projection the map scale will vary continuously but may be constant along a line of latitude e. Map scales can be plotted by basemap or coast , and in addition to the the required refpoint and anchor arguments specifying where the scale should be placed there are both required and optional modifiers.
Here is a list of the attributes that is under your control:. Example of two map scales for a Mercator projection evaluated at 53 degrees north. Map roses showing the cardinal directions of a map help the reader orient themselves, especially for oblique projections where north-south is not vertically aligned.
However, these roses also have ornamental value and can be used on any map projection. As for map scales, a directional map rose is added with basemap or coast and selected by the -Td option. In addition to the required refpoint and anchor arguments and their standard modifiers discussed earlier there is one required and two optional modifiers.
The required modifier sets the side:. Plain and fancy directional map roses. Map roses showing the magnetic directions of a map are useful when magnetic data are presented, or when declinations are significantly nonzero. However, as for directional roses the magnetic rose also has ornamental value.
The magnetic rose consists of two concentric angular scales: The first outer ring shows directional angles while the second inner ring is optional and portrays the magnetic directions, which differ for nonzero declination. As for style, the two-ring rose looks a bit like a standard compass.
As for directional roses, a magnetic map rose is added with basemap or coast and selected by the -Tm option. There is one required and several optional modifiers. First up is the size:. Magnetic direction map rose.
This symbol is quite complicated and has many items whose attributes are in part controlled by GMT defaults parameters and in part by the above modifiers. The color-coded legend indicates which parameters controls the font, pen, or color of the correspond item of the rose.
See gmt. Color scale bars are used in conjunction with color-coded surfaces, symbols, lines, or even text, to relate the chosen color to a data value or category. For instance, color images of topography or other gridded data will need a mechanism for users to decode what the colors represent. Typically, we do this by adding a color scale bar on the outside or inside of the map boundaries. The module colorbar places the color scale bar, with location and size determined by the -D attributes.
As for other map features we must specify the reference and anchor points and any adjustments to them, then supply suitable required and optional modifiers:.
Color bar placed beneath a map here truncated. We extended the bar to show background and foreground colors, and used the frame-annotation machinery to add labels. Adding map legends is the standard way to communicate what various symbols placed on your map represent. For instance, you may use this mechanism to convey the information that circles are earthquake locations, triangles are places where you ate Thai food, and dashed lines indicate some sort of gang-land demarkation line that you should not cross without paying the locals due respect.
Map legends are placed by the module legend , with location and size determined by the various -D attributes. We must again specify the reference and anchor points and any adjustments to them first, then supply suitable required and optional modifiers:.
Example of a map legend placed with legend. Apart from the placement and dimensions discussed here, legend reads macro commands that specifies each item of the legend, including colors, widths of columns, the number of columns, and presents a broad selection of items. At other times, you may wish to place photos or other raster images on your map.
The module image can help with this, and like the other map feature placements it requires a reference point and its optional adjustments via the -D option. In addition, we require one of two modifiers to determine the image size. Placement of EPS and raster images. It is possible to overlay the GMT logo on maps as well, using the module logo.
Like other features it requires reference and anchor points and their optional adjustments via the -D option. Placement of the GMT logo. The logo itself only has a size modifier but the logo module allows additional attributes such as a background map panel.
Our penultimate map embellishment is the map insert. A map insert may appear to be the easiest feature to add since it only consists of an empty map panel. What you put in this panel is up to you and we will show some examples. However, unlike the other map features there are two ways to specify the placement of the map insert. The first is the standard way of specifying the reference and anchor points and the insert dimensions, while the second specifies a subregion in the current plot that should be designated the map insert area.
Depending on the map projection this may or may not be a rectangular area. Map inserts are produced by the module basemap via the -D option. If the unit modifier is missing then we assume the coordinates are map coordinates e. Some optional modifiers are available:.
Demonstration of how a map insert may be used to place a global overview map as an insert in a regional map. Main map shows the regional area of Australia. See Example 44 Map inserts for more details. Our final embellishment is reserved for wiggles plotted along track with wiggle and is activated as an option within that module.
Like other features, it requires reference and anchor points and their optional adjustments via the -D option. Placement of a vertical scale bar. As for other embellishments the wiggle module allows additional attributes such as a background map panel.
GMT has the ability to read and write grids using more than one grid file format see Table grdformats for supported format and their IDs. The automatic reading procedure follows an heuristic where certain formats are tentatively decoded with GMT internal drivers and if they fail than we resort to use the GDAL library to do the readings.
This normally works pretty well but in case of failure e. Thus, products created under those conventions provided the grid is 2-, 3-, 4-, or 5-dimensional can be read directly by GMT and the netCDF grids written by GMT can be read by other programs that conform to those conventions. Note that although many additional programs can read netCDF files, some are unable to read netcdf 4 files if data compression has been applied. Users who are considering this approach should contact the GMT team.
Because some formats have limitations on the range of values they can store it is sometimes necessary to provide more than simply the name of the file and its ID on the command line.
For instance, a native short integer file may use a unique value to signify an empty node or NaN, and the data may need translation and scaling prior to use. Therefore, all GMT programs that read or write grid files will decode the given filename as follows:. If you are reading a grid then no options are needed: just continue to pass the name of the grid file.
Note that the GMT netCDF and native binary grids store the grid scale and offset in the file, hence if you specify these attributes when writing a file then upon reading the grid these settings will automatically take effect.
You can override them by supplying different scales and offsets, of course. For the grid formats that do not store these attributes you will need to supply them both when reading and writing. Some of the grid formats allow writing to standard output and reading from standard input which means you can connect GMT programs that operate on grid files with pipes, thereby speeding up execution and eliminating the need for large, intermediate grid files.
Note that the netCDF format does not allow piping. One can also define special file suffixes to imply a specific file format; this approach represents a more intuitive and user-friendly way to specify the various file formats. The user may create a file called gmt. The following is an example of a gmt. These suffices can be anything that makes sense to the user. Then, using the filename stuff. For a file intended for masking, i. A few GMT tools require that the two horizontal dimensions be specified in meters.
There are two situations where the user may need to change the coordinates of the grid passed to such programs:. For convenience, we also support the inverse translation, i.
This modifier can be used to convert your grid coordinates from meters to the specified unit. These modifiers are only allowed when map projections are not selected or are Cartesian.
When the netCDF grid file contains more than one 2-dimensional variable, GMT programs will load the first such variable in the file and ignore all others. If there are no 2-dimensional variables and no specific variable was selected, we default to the first higher-dimensional matrix and select the first layer. In case the named grid is 3-dimensional, GMT will load the first bottom layer. No interpolation is performed.
Note that the question mark, brackets and parentheses have special meanings on Unix-based platforms. Therefore, you will need to either escape these characters, by placing a backslash in front of them, or place the whole file name plus modifiers between single quotes or double quotes. A similar approach is followed for loading 4-dimensional grids.
Consider a 4-dimensional grid with the following variables:. Programs that generally deal with columns of one-dimensional data, like or can use multi-dimensional netCDF files in a very similar way. If a variable in a netCDF file is one-dimensional, there is nothing more needed than name the variables on the command line.
For example:. If one or more of the selected variables are two-dimensional, and have the same leading dimension as the other selected variables they will be plotted in their entirety. For example, if a netCDF files contains 6 time steps recording temperature at 4 points, and the variable temp is a 6 by 4 array, then the command gmt convert "file. If, for example, only the second temperature column is needed, use gmt convert "file. The same method can be used in reverse to set the proper variable names and units when writing a grid.
However, when the coordinates are set properly as geographical or time axes, GMT will take care of this. The user is, however, still responsible for setting the variable name and unit of the z-coordinate. This extends the capability of GMT to handle data sets from a variety of sources.
Here, band-number can be the number of one individual band the counting starts at zero , or it could be a comma-separated list of bands. For example. Instead of treating them as images, all other GMT programs that process grids can read individual bands from an image but will consider the values to be regular data.
For example, let multiband be the name of a multi-band file with a near infrared component in band 4 and red in band 3. The resulting grid ndvi. It is also possible to access to sub-datasets in a multi-band grid. We need to run the GDAL program gdalinfo on the file because we first must extract the necessary metadata from the file:.
Here, a simple example using grdinfo would be. One solution is to do the reading and scaling via grdmath first, i. Saving images in the common raster formats is possible but, for the time being, only from grdimage and even that is restricted to raster type information. That is, vector data for instance, coast lines or text will not be saved. For all other programs that create grids, it is also possible to save them using GDAL.
If not provided the default type is float Both driver names and data types are case insensitive. The options is a list of one or more concatenated number of GDAL -co options. For a variety of data processing and plotting tasks there is a need to acknowledge that a data point is missing or unassigned.
The problem with this scheme is that This value is internally stored with a particular bit pattern defined by IEEE so that special action can be taken when it is encountered by programs. In particular, a standard library function called isnan is used to test if a floating point is a NaN. GMT uses these tests extensively to determine if a value is suitable for plotting or processing if a NaN is used in a calculation the result would become NaN as well.
Data points whose values equal NaN are not normally plotted or plotted with the special NaN color given in gmt. Several tools such as xyz2grd , math , and grdmath can convert user data to NaN and vice versa, thus facilitating arbitrary masking and clipping of data sets. Note that a few computers do not have native IEEE hardware support. At this point, this applies to some of the older Cray super-computers.
Data records that contain NaN values for the x or y columns or the z column for cases when 3-D Cartesian data are expected are usually skipped during reading.
The default setting gap considers such records to indicate a gap in an otherwise continuous series of points e. The alternative setting bad makes no such interpretation and simply reports back how many bad records were skipped during reading; see Section Data gap detection: The -g option for details.
Beginning with version 5, some of these locations are now also or exclusively configurable with the set utility. When an environment variable has an equivalent parameter in the gmt. GMT programs read real-world coordinates and convert them to positions on a plot. This is achieved by selecting one of several coordinate transformations or projections. We distinguish between three sets of such conversions:.
The next Chapter will be dedicated to GMT map projections in its entirety. Meanwhile, the present Chapter will summarize the properties of the Cartesian and Polar coordinate transformations available in GMT, list which parameters define them, and demonstrate how they are used to create simple plot axes.
We will mostly be using basemap and occasionally plot to demonstrate the various transformations. Our illustrations may differ from those you reproduce with the same commands because of different settings in our gmt. Finally, note that while we will specify dimensions in inches by appending i , you may want to use cm c , or points p as unit instead see the gmt.
There is no coupling between x and y i. Hence, we may use separate transformations for the x - and y -axes and z -axes for 3-D plots. The coefficients in f u depend on the desired plot size or scale , the chosen x,y domain, and the nature of f itself. There are in fact three different uses of the Cartesian linear transformation, each associated with specific command line options.
The different manifestations result from specific properties of three kinds of data:. If the y -scale or y -axis length is different from that of the x -axis which is most often the case , separate the two scales or lengths by a slash, e.
Thus, our data sets will plot as shown in Figure Linear transformation of Cartesian coordinates. Linear transformation of Cartesian coordinates. It should be noted that in many situations it is desirable to have the direction of positive coordinates be reversed. For example, when plotting depth on the y -axis it makes more sense to have the positive direction downwards. All that is required to reverse the sense of positive direction is to supply a negative scale or axis length. Finally, sometimes it is convenient to specify the width or height of a map and let the other dimension be computed based on the implied scale and the range of the other axis.
To do this, simply specify the length to be recomputed as 0. While the Cartesian linear projection is primarily designed for regular floating point x , y data, it is sometimes necessary to plot geographical data in a linear projection.
GMT therefore needs to be informed that it has been given geographical coordinates even though a linear transformation has been chosen. We do so by adding a g for geographical or d for degrees directly after -R or by appending a g or d to the end of the -Jx or -JX option. Our command will be. As far as setting up the coordinate transformation we must indicate whether our input data have absolute time coordinates or relative time coordinates.
For the former we append T after the axis scale or width , while for the latter we append t at the end of the -Jx or -JX option. However, other command line arguments like the -R option may already specify whether the time coordinate is absolute or relative. An absolute time entry must be given as [ date ] T [ clock ] with date given as yyyy [- mm [- dd ]], yyyy [- jjj ], or yyyy [- W ww [- d ]], and clock using the hh [: mm [: ss [.
As a simple example, we will make a plot of a school week calendar Figure Linear transformation of calendar coordinates. When the coordinate ranges provided by the -R option and the projection type given by -JX including the optional d , g , t or T conflict, GMT will warn the users about it. In general, the options provided with -JX will prevail. Logarithmic transformation of x—coordinates. The transformation is simply and is selected by appending an l lower case L immediately following the scale or axis length value.
Hence, to produce a plot in which the x -axis is logarithmic the y -axis remains linear, i. Exponential or power transformation of x—coordinates. This projection uses and allows us to explore exponential relationships like versus.
We indicate this scaling by appending a p lower case P followed by the desired exponent, in our case 0. Thus our command becomes Figure Power transformation.
Polar Cylindrical transformation of coordinates. This transformation converts polar coordinates angle and radius r to positions on a plot. Now and , hence it is similar to a regular map projection because x and y are coupled and x i.
With input and output points both in the plane it is a two-dimensional projection. The transformation comes in two flavors:. As an example of this projection we will create a gridded data set in polar coordinates using grdmath , a RPN calculator that operates on or creates grid files.
We used grdcontour to make a contour map of this data. Because the data file only contains values with , a donut shaped plot appears in Figure Polar transformation. GMT implements more than 30 different projections. They all project the input coordinates longitude and latitude to positions on a map.
The functions f and g can be quite nasty and we will refrain from presenting details in this document. The interested read is referred to Snyder [] [20].
We will mostly be using the coast command to demonstrate each of the projections. GMT map projections are grouped into four categories depending on the nature of the projection.
The groups are. Because x and y are coupled we can only specify one plot-dimensional scale, typically a map scale for lower-case map projection code or a map width for upper-case map projection code. However, in some cases it would be more practical to specify map height instead of width , while in other situations it would be nice to set either the shortest or longest map dimension.
Users may select these alternatives by appending a character code to their map dimension. Without the modifier the map width is selected by default. In GMT version 4. To allow more flexibility, and to make it easier to remember the codes, we implemented the option to use the abbreviations used by the Proj4 mapping package.
Since some of the GMT projections are not in Proj4 , we invented some of our own as well. For a full list of both the old 1- and 2-letter codes, as well as the Proj4 -equivalents see the quick reference cards in Section GMT quick reference. This projection, developed by Albers in , is predominantly used to map regions of large east-west extent, in particular the United States.
It is a conic, equal-area projection, in which parallels are unequally spaced arcs of concentric circles, more closely spaced at the north and south edges of the map.
Meridians, on the other hand, are equally spaced radii about a common center, and cut the parallels at right angles. Distortion in scale and shape vanishes along the two standard parallels. Between them, the scale along parallels is too small; beyond them it is too large. The opposite is true for the scale along meridians. To define the projection in GMT you need to provide the following information:.
The projection center defines the origin of the rectangular map coordinates. As an example we will make a map of the region near Taiwan. We desire a map that is 5 inches wide. The complete command needed to generate the map below is therefore given by:. The equidistant conic projection was described by the Greek philosopher Claudius Ptolemy about A.
It is neither conformal or equal-area, but serves as a compromise between them. The scale is true along all meridians and the standard parallels. To select this projection in GMT you must provide the same information as for the other conic projection, i. The equidistant conic projection is often used for atlases with maps of small countries. As an example, we generate a map of Cuba:. This conic projection was designed by the Alsatian mathematician Johann Heinrich Lambert and has been used extensively for mapping of regions with predominantly east-west orientation, just like the Albers projection.
The parallels are arcs of circles with a common origin, and meridians are the equally spaced radii of these circles. As with Albers projection, it is only the two standard parallels that are distortion-free. To select this projection in GMT you must provide the same information as for the Albers projection, i.
We will generate a map of the continental USA using these parameters. Note that with all the projections you have the option of selecting a rectangular border rather than one defined by meridians and parallels. The generating commands used were. The standard parallels were originally selected by Adams to provide a maximum scale error between latitudes Some areas, like Florida, experience scale errors of up to 2.
The polyconic projection, in Europe usually referred to as the American polyconic projection, was introduced shortly before by the Swiss-American cartographer Ferdinand Rodulph Hassler — As head of the Survey of the Coast, he was looking for a projection that would give the least distortion for mapping the coast of the United States.
The projection acquired its name from the construction of each parallel, which is achieved by projecting the parallel onto the cone while it is rolled around the globe, along the central meridian, tangent to that parallel.
As a consequence, the projection involves many cones rather than a single one used in regular conic projections. The polyconic projection is neither equal-area, nor conformal. It is true to scale without distortion along the central meridian. Each parallel is true to scale as well, but the meridians are not as they get further away from the central meridian.
As a consequence, no parallel is standard because conformity is lost with the lengthening of the meridians. This projection was developed by Lambert in and is typically used for mapping large regions like continents and hemispheres. It is an azimuthal, equal-area projection, but is not perspective. Distortion is zero at the center of the projection, and increases radially away from this point.
To define this projection in GMT you must provide the following information:. Two different types of maps can be made with this projection depending on how the region is specified. We will give examples of both types. The reason for specifying our area this way is that for this and many other projections, lines of equal longitude and latitude are not straight lines and are thus poor choices for map boundaries.
Instead we require that the map boundaries be rectangular by defining the corners of a rectangular map boundary. Rectangular map using the Lambert azimuthal equal-area projection. Here, you must specify the world as your region -Rg or -Rd. Hemisphere map using the Lambert azimuthal equal-area projection. An equal-angle Wulff stereonet can be obtained by using the stereographic projection discussed later.
The stereonets produced by these two projections appear below. This is a conformal, azimuthal projection that dates back to the Greeks. Its main use is for mapping the polar regions.
In the polar aspect all meridians are straight lines and parallels are arcs of circles. While this is the most common use it is possible to select any point as the center of projection. The requirements are. A default map scale factor of 0. However, the setting is ignored when a standard parallel has been specified since the scale is then implicitly given. We will look at two different types of maps. In our first example we will let the projection center be at the north pole.
This means we have a polar stereographic projection and the map boundaries will coincide with lines of constant longitude and latitude. An example is given by. This command produces a map as presented in Figure Polar stereographic :.
Polar stereographic conformal projection with rectangular borders. In terms of usage this projection is identical to the Lambert azimuthal equal-area projection. Thus, one can make both rectangular and hemispheric maps. The command used was. General stereographic conformal projection with rectangular borders. The perspective projection imitates in 2 dimensions the 3-dimensional view of the earth from space. The implementation in GMT is very flexible, and thus requires many input variables.
Those are listed and explained below, with the values used in Figure Perspective projection between brackets. The imagined view of northwest Europe from a Space Shuttle at km looking due east is thus accomplished by the following coast command:.
View from the Space Shuttle in Perspective projection. The orthographic azimuthal projection is a perspective projection from infinite distance. It is therefore often used to give the appearance of a globe viewed from outer space. The projection is neither equal-area nor conformal, and much distortion is introduced near the edge of the hemisphere. The directions from the center of projection are true.
The projection was known to the Egyptians and Greeks more than 2, years ago. Because it is mainly used for pictorial views at a small scale, only the spherical form is necessary. To specify the orthographic projection the same options -Jg or -JG as the perspective projection are used, but with fewer variables to supply:. Hemisphere map using the Orthographic projection. The most noticeable feature of this azimuthal projection is the fact that distances measured from the center are true.
Therefore, a circle about the projection center defines the locus of points that are equally far away from the plot origin. Furthermore, directions from the center are also true. The projection, in the polar aspect, is at least several centuries old. It is a useful projection for a global view of locations at various or identical distance from a given point the map center. World map using the equidistant azimuthal projection. Walter Smith. Florian Wobbe. A short summary of this paper.
Eos, Vol. The old design also call functions and exchange data directly and 40 supplemental program modules sharing prevented GMT itself from taking advantage from shared libraries. For instance, tures, and documentation. Its power to pro- the tool pslegend needed to make extensive cess data and produce publication- quality use of system calls to psxy and pstext to plot Executable Programs in GMT 5 graphic presentations has made it vital to a the lines, symbols, and text that make up a large scientific community that now includes map legend, making it an awkward program The separate executable programs—for more than 25, individual users.
Furthermore, relying on external Instead, GMT 5 builds a single executable, roughly monthly downloads. Its first argument is the name of Since , the U. National Science Foun- from shell scripts cumbersome, slow, and a the module of interest.
Attempting to program custom pscoast would launch the pscoast module, supported the development, maintenance, functionality e.
This single- documentation, and distribution of GMT. On via an undocumented low-level GMT 4 library executable approach is the recommended 5 November, the GMT developers are releas- was tedious and required multiple iterations way of using GMT 5 it solves namespace ing GMT version 5, the first major new release because the library was subject to frequent problems for package managers because in 9 years.
0コメント