NAME

       pscontour - Contour xyz-data by direct triangulation


SYNOPSIS

       pscontour  xyzfile  -Ccptfile -Jparameters -Rwest/east/south/north[r] [
       -A[-][labelinfo] ] [ -Btickinfo ] [ -D[dumpfile] ] [  -Eview_az/view_el
       ]  [  -G[d|f|n|l|L|x|X]info  ]  [  -H[nrec] ] [ -I ] [ -K ] [ -Lpen ] [
       -M[flag] ] [  -N  ]  [  -O  ]  [  -P  ]  [  -S  ]  [  -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  con-
       tour plot by triangulation. By default, the optimal Delaunay triangula-
       tion is performed (using either Shewchuk’s [1996]  or  Watson’s  [1982]
       method  as  selected during GMT installation), but the user may option-
       ally provide a second file with network information, such as a triangu-
       lar 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  annota-
              tion flags set will be annotated.

       -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 .gmtdefaults4, but this
              can be overridden on the command line by appending c, i, or m to
              the  scale/width  value.   For map height, max dimension, or min
              dimension, append h, +, or - to the width, respectively.

              CYLINDRICAL PROJECTIONS:

              -Jclon0/lat0/scale (Cassini)
              -Jjlon0/scale (Miller)
              -Jmscale (Mercator - Greenwich and Equator as origin)
              -Jmlon0/lat0/scale (Mercator - Give meridian and standard paral-
              lel)
              -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 Car-
              ree))
              -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]][d]  (Linear, log, and power
              scaling)
              More details can be found in the psbasemap man pages.

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


OPTIONS

       No space between the option flag and the associated arguments.

       -A     Give - to disable all annotations.  The optional labelinfo  con-
              trols  the  specifics  of the label formatting and consists of a
              concatenated string made up of  any  of  the  following  control
              arguments:
              +aangle  for  annotations at a fixed angle, +an for line-normal,
              or +ap for line-parallel [Default].
              +cdx[/dy] sets the clearance between  label  and  optional  text
              box.  Append c|i|m|p to specify the unit or % to indicate a per-
              centage of the label font size [15%].
              +ffont sets the desired font [Default ANNOT_FONT_PRIMARY].
              +g[color] selects opaque text boxes  [Default  is  transparent];
              optionally specify the color [Default is PAGE_COLOR].
              +jjust sets label justification [Default is CM].
              +kcolor sets color of text labels [Default is COLOR_BACKGROUND].
              +llabel sets the constant label text.
              +Llflag sets the label text according to the specified flag:
              flag is h: Take the label from the current  multisegment  header
              (first scan for an embedded -Llabel option, if not use the first
              word following the segment flag).
              flag is d: Take the Cartesian plot distances along the  line  as
              the label; append c|i|m|p as the unit [Default is MEASURE_UNIT].
              flag is D: Calculate actual map distances; append  d|e|k|m|n  as
              the unit [Default is d(egrees), unless label placement was based
              on map distances along the lines in which case we use  the  same
              unit  specified  for that algorithm].  Requires a map projection
              to be used.
              flag is f: Use text after the 2nd  column  in  the  fixed  label
              location  file  as  the label. Requires the fixed label location
              setting.
              flag is x: As h but use the  headers  in  the  xfile.d  instead.
              Requires the crossing file option.
              +o  selects  rounded  rectangular text box [Default is rectangu-
              lar]. Not applicable for curved text (+v) and only  makes  sense
              for opaque text boxes.
              +p[pen]  draws  the  outline of text boxsets [Default is no out-
              line]; optionally specify pen for outline [Default  is  width  =
              0.25p, color = black, texture = solid].
              +rmin_rad  will not place labels where the line’s radius of cur-
              vature is less than min_rad [Default is 0].
              +ssize sets the desired font size in points [Default is 9].
              +uunit appends unit to all line labels. If unit  starts  with  a
              leading  hypen  (-)  then  there  will be no space between label
              value and the unit.  [Default is no unit].
              +v specifies  curved  labels  following  the  path  [Default  is
              straight labels].
              +w  specifies  how  many  (x, y) points will be used to estimate
              label angles [Default is 10].
              +=prefix prepends prefix to all line labels.  If  prefix  starts
              with  a  leading  hypen  (-) then there will be no space between
              label value and the prefix. [Default is no prefix].

       -B     Sets map boundary annotation and  tickmark  intervals;  see  the
              psbasemap man page for all the details.

       -D     Dump  the (x,y,z) coordinates of each contour to separate files,
              one for each contour segment. The  files  will  be  named  dump-
              file_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     Controls the placement of  labels  along  the  contours.  Choose
              among five controlling algorithms:
              -Gddist[c|i|m|p]  or -GDdist[d|e|k|m|n].  For lower case d, give
              distances between labels on the plot in your preferred  measure-
              ment  unit c (cm), i (inch), m (meter), or p (points), while for
              upper case D, specify distances in  map  units  and  append  the
              unit;  choose  among e (m), k (km), m (mile), n (nautical mile),
              or d (spherical degree). [Default is 10c or 4i].
              -Gfffile.d reads the ascii file ffile.d  and  places  labels  at
              locations in the file that matches locations along the contours.
              Inexact mathces and points outside the region are skipped.
              -Gl|Lline1[,line2,...] Give start and stop coordinates  for  one
              or  more  comma-separated straight line segments. Labels will be
              placed where these lines intersect the contours. The  format  of
              each  line specification is start/stop, where start and stop are
              either a specified point lon/lat or a 2-character  XY  key  that
              uses  the  justification format employed in pstext to indicate a
              point on the map, given as [LCR][BMT].  -GL will  interpret  the
              point  pairs  as  defining  great  circles  [Default is straight
              line].
              -Gnn_label specifies the number of equidistant labels  for  con-
              tours  line  [1].  Upper case -GN starts labeling exactly at the
              start of the line [Default centers them along the line].   -GN-1
              places one justified label at start, while -GN+1 places one jus-
              tified  label  at  the  end  of  contours.   Optionally,  append
              /min_dist[c|i|m|p] to enforce that a minimum distance separation
              between successive labels is enforced.
              -Gx|Xxfile.d reads the multi-segment  file  xfile.d  and  places
              labels  at  the intersections between the contours and the lines
              inxfile.d. -GX will resample the lines first along  great-circle
              arcs.

       -H     Input file(s) has Header record(s). Number of header records can
              be changed by editing your  .gmtdefaults4  file.  If  used,  GMT
              default  is  1  header record. Use -Hi if only input data should
              have header records [Default will write out  header  records  if
              the input data have them].

       -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 preceded by a header record
              whose first column is flag followed by the contour level.

       -N     Do  NOT  clip  contours or image at the boundaries [Default will
              clip to fit inside region -R].

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

       -P     Selects  Portrait  plotting  mode [GMT Default is Landscape, see
              gmtdefaults to change this].

       -S     Skip all input xyz points that fall outside the region  [Default
              uses all the data in the triangulation].

       -T     Give  name  of  file  with network information. Each record must
              contain triplets of node numbers for a  triangle  [Default  com-
              putes 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 abso-
              lute coordinates; the default (r) will reset plot origin.   Give
              c to center plot using current page size.

       -c     Specifies the number of plot copies. [Default is 1].

       -:     Toggles  between  (longitude,latitude)  and (latitude,longitude)
              input and/or output. [Default is (longitude,latitude)].   Append
              i  to  select  input  only  or o to select output only. [Default
              affects both].

       -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].  Append n for the  number  of  columns  in  the  binary
              file(s).


EXAMPLES

       To  make a raw contour plot from the file topo.xyz and drawing the con-
       tours (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, use

       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, run

       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 .gmtdefaults4 file.


SEE ALSO

       gmt(l), grdcontour(l), grdimage(l), nearneighbor(l), psbasemap(l), pss-
       cale(l), surface(l), triangulate(l)


REFERENCES

       Watson,  D.  F., 1982, Acord: Automatic contouring of raw data, Comp. &
       Geosci., 8, 97-101.
       Shewchuk, J. R., 1996, Triangle: Engineering a 2D Quality Mesh  Genera-
       tor  and Delaunay Triangulator, First Workshop on Applied Computational
       Geometry (Philadelphia, PA), 124-133, ACM, May 1996.
       www.cs.cmu.edu/~quake/triangle.html



GMT4.0                            1 Oct 2004                      PSCONTOUR(l)

Man(1) output converted with man2html