1SPLITXYZ(1)                  Generic Mapping Tools                 SPLITXYZ(1)
2
3
4

NAME

6       splitxyz  -  filter  to  divide  (x,y,z[,distance,heading])  data  into
7       (x,y,z) track segments.
8

SYNOPSIS

10       splitxyz [ xyz[dh]file ]  -Ccourse_change  [  -Aazimuth/tolerance  ]  [
11       -Dminimum_distance  ]  [  -Fxy_filter/z_filter  ]  [ -Ggap_distance ] [
12       -H[i][nrec] ] [ -M ] [ -Nnamestem ] [ -Qflags ] [ -S ] [ -V ] [ -Z ]  [
13       -:[i|o] ] [ -b[i|o][s|S|d|D[ncol]|c[var1/...]] ] [ -f[i|o]colinfo ]
14

DESCRIPTION

16       splitxyz   reads   a   series   of  (x,y[,z])  records  [or  optionally
17       (x,y,z,d,h); see -S option] from standard input  [or  xyz[dh]file]  and
18       splits  this  into  separate  lists of (x,y[,z]) series, such that each
19       series has a nearly constant azimuth through the x,y plane.  There  are
20       options  to  choose only those series which have a certain orientation,
21       to set a minimum length for series, and to high- or low-pass filter the
22       z  values  and/or  the x,y values.  splitxyz is a useful filter between
23       data extraction and pswiggle plotting, and can also be used to divide a
24       large  x,y,z  dataset into segments.  The output is always in the ASCII
25       format; input may be ASCII or binary (see -b).
26
27       xyz[dh]file(s)
28              3 (but see -Z) [or 5] column ASCII  file  [or  binary,  see  -b]
29              holding  (x,y,z[,d,h])  data  values.  To use (x,y,z,d,h) input,
30              sorted so that d  is  non-decreasing,  specify  the  -S  option;
31              default expects (x,y,z) only.  If no file is specified, splitxyz
32              will read from standard input.
33
34       -C     Terminate a segment when a course change exceeding course_change
35              degrees of heading is detected.
36

OPTIONS

38       -A     Write  out  only  those  segments which are within +/- tolerance
39              degrees of azimuth in heading, measured clockwise from North, [0
40              -  360].  [Default writes all acceptable segments, regardless of
41              orientation].
42
43       -D     Do not write a segment out unless it is  at  least  minimum_dis‐
44              tance units long [0]
45
46       -F     Filter  the  z  values and/or the x,y values, assuming these are
47              functions of d coordinate.  xy_filter and  z_filter  are  filter
48              widths  in  distance units.  If a filter width is zero, the fil‐
49              tering is not performed.  The absolute value of the width is the
50              full  width  of  a cosine-arch low-pass filter.  If the width is
51              positive, the data are low-pass filtered; if negative, the  data
52              are  high-pass  filtered  by subtracting the low-pass value from
53              the observed value.  If z_filter is non-zero, the entire  series
54              of  input  z  values is filtered before any segmentation is per‐
55              formed, so that the only edge effects in the filtering will hap‐
56              pen  at  the  beginning and end of the complete data stream.  If
57              xy_filter is non-zero, the data is first divided  into  segments
58              and then the x,y values of each segment are filtered separately.
59              This may introduce edge effects at the ends of each segment, but
60              prevents  a low-pass x,y filter from rounding off the corners of
61              track segments.  [Default = no filtering].
62
63       -G     Do not  let  a  segment   have  a  gap  exceeding  gap_distance;
64              instead, split it into two segments.  [Default ignores gaps].
65
66       -H     Input  file(s)  has  Header record(s).  Number of header records
67              can be changed by editing your .gmtdefaults4 file.  If used, GMT
68              default  is  1  header record. Use -Hi if only input data should
69              have header records [Default will write out  header  records  if
70              the input data have them]. Blank lines and lines starting with #
71              are always skipped.  Not used with binary data.
72
73       -M     Use Map units.  Then x,y are in degrees of longitude,  latitude,
74              distances are in kilometers, and angles are azimuths.  [Default:
75              distances are cartesian in same units  as  x,y  adn  angles  are
76              counter-clockwise from horizontal].
77
78       -N     Create  Named  output  files, writing each segment to a separate
79              file in the working directory named namestem.profile#,  where  #
80              increases  consecutively  from 1.  [Default writes entire output
81              to stdout, separating segments by sub-headings that start with >
82              marks].
83
84       -Q     Specify  your  desired output using any combination of xyzdh, in
85              any order.  Do not space between the letters.  Use  lower  case.
86              The  output will be ASCII (or binary, see -bo) columns of values
87              corresponding to xyzdh [Default is  -Qxyzdh  (-Qxydh  if  -Z  is
88              set)].
89
90       -S     d  and  h  is supplied.  In this case, input contains x,y,z,d,h.
91              [Default expects (x,y,z) input, and d,h are computed from  delta
92              x, delta y, according to -M option]
93
94       -V     Selects verbose mode, which will send progress reports to stderr
95              [Default runs "silently"].
96
97       -Z     Data have x,y only (no z-column).
98
99       -:     Toggles between  (longitude,latitude)  and  (latitude,longitude)
100              input and/or output.  [Default is (longitude,latitude)].  Append
101              i to select input only or o to  select  output  only.   [Default
102              affects both].
103
104       -bi    Selects binary input.  Append s for single precision [Default is
105              d  (double)].   Uppercase  S  or  D  will  force  byte-swapping.
106              Optionally,  append  ncol,  the number of columns in your binary
107              input file if it exceeds the columns needed by the program.   Or
108              append  c  if  the  input  file  is  netCDF.  Optionally, append
109              var1/var2/... to specify the variables to be read.  [Default  is
110              2, 3, or 5 input columns as set by -S, -Z].
111
112       -bo    Selects  binary  output.  Append s for single precision [Default
113              is d (double)].  Uppercase S  or  D  will  force  byte-swapping.
114              Optionally,  append  ncol, the number of desired columns in your
115              binary output file.  [Default is 1-5 output columns  as  set  by
116              -Q].
117
118       -f     Special  formatting of input and/or output columns (time or geo‐
119              graphical data).  Specify i or o to  make  this  apply  only  to
120              input  or  output  [Default  applies to both].  Give one or more
121              columns (or column ranges) separated by commas.  Append T (abso‐
122              lute  calendar time), t (relative time in chosen TIME_UNIT since
123              TIME_EPOCH), x (longitude), y (latitude), or f (floating  point)
124              to  each  column or column range item.  Shorthand -f[i|o]g means
125              -f[i|o]0x,1y (geographic coordinates).
126

ASCII FORMAT PRECISION

128       The ASCII output formats of numerical data are controlled by parameters
129       in  your  .gmtdefaults4  file.   Longitude  and  latitude are formatted
130       according to OUTPUT_DEGREE_FORMAT, whereas other values  are  formatted
131       according  to D_FORMAT.  Be aware that the format in effect can lead to
132       loss of precision in the output, which can  lead  to  various  problems
133       downstream.   If  you find the output is not written with enough preci‐
134       sion, consider switching to binary output (-bo if available) or specify
135       more decimals using the D_FORMAT setting.
136

EXAMPLES

138       Suppose  you  want  to make a wiggle plot of magnetic anomalies on seg‐
139       ments oriented approximately east-west from a cruise  called  cag71  in
140       the region -R300/315/12/20.  You want to use a 100km low-pass filter to
141       smooth the tracks and a 500km high-pass filter to detrend the  magnetic
142       anomalies.  Try this:
143
144       gmtlist  cag71 -R300/315/12/20 -Fxyzdh | splitxyz -A90/15 -F100/-500 -M
145       -D100 -S  -V  |  pswiggle  -R300/315/12/20  -Jm0.6  -Ba5f1:.cag71:  -T1
146       -W0.75p -Ggray -Z200 > cag71_wiggles.ps
147
148       MGD-77  users:  For this application we recommend that you extract d, h
149       from mgd77list rather than have splitxyz compute them separately.
150
151       Suppose you have been given a binary, double-precision file  containing
152       lat,  lon,  gravity values from a survey, and you want to split it into
153       profiles named survey.profile# (when gap exceeds 100 km).  Try this:
154
155       splitxyz survey.bin -Nsurvey -V -G100 -D100 -: -M -bi3
156

SEE ALSO

158       GMT(1), mgd77list(1), pswiggle(1)
159
160
161
162GMT 4.3.1                         15 May 2008                      SPLITXYZ(1)
Impressum