man pscontour () - Contour xyz-data by direct triangulation
NAME
pscontour - Contour xyz-data by direct triangulation
SYNOPSIS
pscontour xyzfile -Ccptfile -Jparameters -Rwest/east/south/north[r] [ -A[-][ffont_size][aangle][/r/g/b][o]] ] [ -Btickinfo ] [ -D[dumpfile] ] [ -Eview_az/view_el ] [ -Ggap ] [ -H[nrec] ] [ -I ] [ -K ] [ -Lpen ] [ -M[flag] ] [ -N ] [ -O ] [ -P ] [ -Tindexfile ] [ -U[/dx/dy/][label] ] [ -V ] [ -W[+]pen ] [ -Xx-shift ] [ -Yy-shift ] [ -ccopies ] [ -: ] [ -bi[s][n] ] [ -bo[s][n] ]
DESCRIPTION
pscontour reads an ASCII [or binary] xyz-file and produces a raw contour plot by triangulation. By default, the optimal Delaunay triangulation is performed (using either Shewhuck's [1996]' or Watson's [1982] method as selected during GMT installation), but the user' may optionally provide a second file with network information, such as a triangular mesh used for finite element modeling. In addition to contours, the area between contours may be painted according to the color palette file.
- xyzfile
- Raw ASCII (or binary, see -b) xyz data to be contoured.
- -C
- name of the color palette file. Must have discrete colors if you want to paint the surface (-I). Only contours that have anotation flags set will be anotated.
- -J
- Selects the map projection. Scale is UNIT/degree, 1:xxxxx, or width in UNIT (upper case modifier).
UNIT is cm, inch, or m, depending on the MEASURE_UNIT setting in .gmtdefaults, but this can be
overridden on the command line by appending the c, i, or m to the scale/width value.
CYLINDRICAL PROJECTIONS:
-Jclon0/lat0/scale (Cassini)
-Jjlon0/scale (Miller)
-Jmscale (Mercator - Greenwich and Equator as origin)
-Jmlon0/lat0/scale (Mercator - Give meridian and standard parallel)
-Joalon0/lat0/azimuth/scale (Oblique Mercator - point and azimuth)
-Joblon0/lat0/lon1/lat1/scale (Oblique Mercator - two points)
-Joclon0/lat0/lonp/latp/scale (Oblique Mercator - point and pole)
-Jqlon0/scale (Equidistant Cylindrical Projection (Plate Carree))
-Jtlon0/scale (TM - Transverse Mercator, with Equator as y = 0)
-Jtlon0/lat0/scale (TM - Transverse Mercator, set origin)
-Juzone/scale (UTM - Universal Transverse Mercator)
-Jylon0/lats/scale (Basic Cylindrical Projection)
AZIMUTHAL PROJECTIONS:
-Jalon0/lat0/scale (Lambert).
-Jelon0/lat0/scale (Equidistant).
-Jflon0/lat0/horizon/scale (Gnomonic).
-Jglon0/lat0/scale (Orthographic).
-Jslon0/lat0/[slat/]scale (General Stereographic)
CONIC PROJECTIONS:
-Jblon0/lat0/lat1/lat2/scale (Albers)
-Jdlon0/lat0/lat1/lat2/scale (Equidistant)
-Jllon0/lat0/lat1/lat2/scale (Lambert)
MISCELLANEOUS PROJECTIONS:
-Jhlon0/scale (Hammer)
-Jilon0/scale (Sinusoidal)
-Jk[f|s]lon0/scale (Eckert IV (f) and VI (s))
-Jnlon0/scale (Robinson)
-Jrlon0/scale (Winkel Tripel)
-Jvlon0/scale (Van der Grinten)
-Jwlon0/scale (Mollweide)
NON-GEOGRAPHICAL PROJECTIONS:
-Jp[a]scale[/origin] (polar (theta,r) coordinates, optional a for azimuths and offset theta [0])
-Jxx-scale[l|ppow][/y-scale[l|ppow]] (Linear, log, and power scaling)
More details can be found in the psbasemap manpages.
- -R
- west, east, south, and north specify the Region of interest. To specify boundaries in degrees and minutes [and seconds], use the dd:mm[:ss] format. Append r if lower left and upper right map coordinates are given instead of wesn.
OPTIONS
No space between the option flag and the associated arguments.
- -A
- Several anotation formatting options can be set to modify the form of the annotation. Give - to disable all anotations. Append ffont_size to change font size [9], append /r/g/b to change color of text fill box [PAGE_COLOR], append aangle to fix annotation angle [Default follows contour], and append o to draw the outline of the surrounding text box [Default is no outline].
- -B
- Sets map boundary tickmark intervals. See psbasemap for details.
- -D
- Dump the (x,y,z) coordinates of each contour to separate files, one for each contour segment. The files will be named dumpfile_cont_segment[_i].xyz, where cont is the contour value and segment is a running segment number for each contour interval (for closed contours we append _i.) However, when -M is used in conjunction with -D a single multisegment file is created instead.
- -E
- Sets the view point by specifying azimuth and elevation in degrees. [Default is 180/90]
- -G
- gap is distance between each annotation along the same contour [Default is 10c (or 4i)].
- -H
- Input file(s) has Header record(s). Number of header records can be changed by editing your .gmtdefaults file. If used, GMT default is 1 header record.
- -I
- Color the triangles using the color palette table.
- -K
- More PostScript code will be appended later [Default terminates the plot system].
- -L
- Draw the underlying triangular mesh using the specified pen attributes [Default is no mesh].
- -M
- When used in conjunction with -D a single multisegment file is created, and each contour section is preceeded by a header record whose first column is flag followed by the contour level.
- -N
- Do NOT clip contours or image at the boundaries [Defaults will clip to fit inside region -R).
- -bo
- Selects binary output. Append s for single precision [Default is double].
- -P
- Selects Portrait plotting mode [GMT Default is Landscape, see gmtdefaults to change this].
- -T
- Give name of file with network information. Each record must contain triplets of node numbers for a triangle [Default computes these using Delaunay triangulation (see triangulate)].
- -U
- Draw Unix System time stamp on plot. User may specify where the lower left corner of the stamp should fall on the page relative to lower left corner of plot. Optionally, append a label, or c (which will plot the command string.). The GMT parameters UNIX_TIME and UNIX_TIME_POS can affect the appearance; see the gmtdefaults man page for details.
- -V
- Selects verbose mode, which will send progress reports to stderr [Default runs "silently"].
- -W
- Select contouring and set contour pen attributes. If the + flag is set then the contour lines are colored according to the cpt file (see -C).
- -X -Y
- Shift origin of plot by (x-shift,y-shift). Prepend a for absolute coordinates; the default (r) will reset plot origin.
- -c
- Specifies the number of plot copies. [Default is 1]
- -:
- Toggles between (longitude,latitude) and (latitude,longitude) input/output. [Default is (longitude,latitude)]. Applies to geographic coordinates only.
- -bi
- Selects binary input. Append s for single precision [Default is double]. Append n for the number of columns in the binary file(s). [Default is 3 input columns]. Use 4-byte integer triplets for node ids (-T).
- -bo
- Selects binary output. Append s for single precision [Default is double].
EXAMPLES
To make a raw contour plot from the file topo.xyz and drawing the contours (pen = 2)
given in the color palette file topo.cpt on a Lambert map
at 0.5 inch/degree along the standard parallels 18 and 24, try
pscontour topo.xyz -R320/330/20/30 -Jl18/24/0.5i -Ctopo.cpt -W0.5p > topo.ps
To create a color PostScript plot of the numerical temperature solution obtained on a triangular mesh
whose node coordinates and temperatures are stored in temp.xyz and mesh arrangement is given by the file mesh.ijk, using
the colors in temp.cpt, try
pscontour temp.xyz -R0/150/0/100 -Jx0.1 -Ctemp.cpt -G -W0.25p > temp.ps
BUGS
Sometimes there will appear to be thin lines of the wrong color in the image. This is a round-off problem which may be remedied by using a higher value of DOTS_PR_INCH in the .gmtdefaults file.
SEE ALSO
gmt(1gmt), grdcontour(1gmt), grdimage(1gmt), nearneighbor(1gmt), psbasemap(1gmt), psscale(1gmt), surface(1gmt), triangulate(1gmt)
REFERENCES
Watson, D. F., 1982, Acord: Automatic contouring of raw data, Comp. & Geosci., 8, 97-101.
Shewchuck, J. R., 1996, Triangle: Engineering a 2D Quality Mesh Generator
and Delaunay Triangulator, First Workshop on Applied Computational Geometry
(Philadelphia, PA), 124-133, ACM, May 1996.
www.cs.cmu.edu/~quake/triangle.html