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).  If used, the default number
67              of header records is N_HEADER_RECS.  Use -Hi if only input  data
68              should  have  header  records  [Default  will  write  out header
69              records if the input data have  them].  Blank  lines  and  lines
70              starting with # are always skipped.  Not used with binary data.
71
72       -M     Use  Map units.  Then x,y are in degrees of longitude, latitude,
73              distances are in kilometers, and angles are azimuths.  [Default:
74              distances  are  cartesian  in  same  units as x,y and angles are
75              counter-clockwise from horizontal].
76
77       -N     Create Named output files, writing each segment  to  a  separate
78              file  in  the working directory named namestem.profile#, where #
79              increases consecutively from 1.  [Default writes  entire  output
80              to stdout, separating segments by sub-headings that start with >
81              marks].
82
83       -Q     Specify your desired output using any combination of  xyzdh,  in
84              any  order.   Do not space between the letters.  Use lower case.
85              The output will be ASCII (or binary, see -bo) columns of  values
86              corresponding  to  xyzdh  [Default  is  -Qxyzdh (-Qxydh if -Z is
87              set)].
88
89       -S     d and h is supplied.  In this case,  input  contains  x,y,z,d,h.
90              [Default  expects (x,y,z) input, and d,h are computed from delta
91              x, delta y, according to -M option]
92
93       -V     Selects verbose mode, which will send progress reports to stderr
94              [Default runs "silently"].
95
96       -Z     Data have x,y only (no z-column).
97
98       -:     Toggles  between  (longitude,latitude)  and (latitude,longitude)
99              input and/or output.  [Default is (longitude,latitude)].  Append
100              i  to  select  input  only or o to select output only.  [Default
101              affects both].
102
103       -bi    Selects binary input.  Append s for single precision [Default is
104              d  (double)].   Uppercase  S  or  D  will  force  byte-swapping.
105              Optionally, append ncol, the number of columns  in  your  binary
106              input  file if it exceeds the columns needed by the program.  Or
107              append c  if  the  input  file  is  netCDF.  Optionally,  append
108              var1/var2/...  to specify the variables to be read.  [Default is
109              2, 3, or 5 input columns as set by -S, -Z].
110
111       -bo    Selects binary output.  Append s for single  precision  [Default
112              is  d  (double)].   Uppercase  S  or D will force byte-swapping.
113              Optionally, append ncol, the number of desired columns  in  your
114              binary  output  file.   [Default is 1-5 output columns as set by
115              -Q].
116
117       -f     Special formatting of input and/or output columns (time or  geo‐
118              graphical  data).   Specify  i  or  o to make this apply only to
119              input or output [Default applies to both].   Give  one  or  more
120              columns (or column ranges) separated by commas.  Append T (abso‐
121              lute calendar time), t (relative time in chosen TIME_UNIT  since
122              TIME_EPOCH),  x (longitude), y (latitude), or f (floating point)
123              to each column or column range item.  Shorthand  -f[i|o]g  means
124              -f[i|o]0x,1y (geographic coordinates).
125

ASCII FORMAT PRECISION

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

EXAMPLES

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

SEE ALSO

157       GMT(1), mgd77list(1), pswiggle(1)
158
159
160
161GMT 4.5.6                         10 Mar 2011                      SPLITXYZ(1)
Impressum