EnglishFrenchSpanish

Ad


OnWorks favicon

gmtconnectgmt - Online in the Cloud

Run gmtconnectgmt in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command gmtconnectgmt that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


gmtconnect - Connect individual lines whose end points match within tolerance

SYNOPSIS


gmtconnect [ table ] [ [closed] ] [ [template] ] [ [linkfile] ] [ [template] ] [
[cutoff[unit][/nn_dist]] ] [ [level] ] [ -b<binary> ] [ -d<nodata> ] [ -f<flags> ] [
-g<gaps> ] [ -h<headers> ] [ -i<flags> ] [ -o<flags> ] [ -:[i|o] ]

Note: No space is allowed between the option flag and the associated arguments.

DESCRIPTION


gmtconnect reads standard input or one or more data files, which may be multisegment
files, and examines the coordinates of the end points of all line segments. If a pair of
end points are identical or closer to each other than the specified separation tolerance
then the two line segments are joined into a single segment. The process repeats until all
the remaining endpoints no longer pass the tolerance test; the resulting segments are then
written out to standard output or specified output file. If it is not clear what the
separation tolerance should be then use -L to get a list of all separation distances and
analyze them to determine a suitable cutoff.

REQUIRED ARGUMENTS


None.

OPTIONAL ARGUMENTS


table One or more ASCII (or binary, see -bi[ncols][type]) data table file(s) holding a
number of data columns. If no tables are given then we read from standard input.

-C[closed]
Write all the closed polygons to closed [gmtconnect_closed.txt] and all other
segments as they are to stdout. No connection takes place. Use -Tcutoff to set a
minimum separation [0], and if cutoff is > 0 then we also explicitly close the
polygons on output.

-D[template]
For multiple segment data, dump each segment to a separate output file [Default
writes a single multiple segment file]. Append a format template for the individual
file names; this template must contain a C format specifier that can format an
integer argument (the segment number); this is usually %d but could be %08d which
gives leading zeros, etc. Optionally, it may also contain the format %c before the
integer; this will then be replaced by C (closed) or O (open) to indicate segment
type. [Default is gmtconnect_segment_%d.txt]. Note that segment headers will be
written in either case. For composite segments, a generic segment header will be
written and the segment headers of individual pieces will be written out as
comments to make it possible to identify where the connected pieces came from.

-L[linkfile]
Writes the link information to the specified file [gmtconnect_link.txt]. For each
segment we write the original segment id, and for the beginning and end point of
the segment we report the id of the closest segment, whether it is the beginning
(B) or end (E) point that is closest, and the distance between those points in
units determined by -T.

-Q[template]
Used with -D to a list file with the names of the individual output files.
Optionally, append a filename template for the individual file names; this template
may contain a C format specifier that can format an character (C or O for closed or
open, respectively). [Default is gmtconnect_list.txt].

-T[cutoff[unit][/nn_dist]]
Specifies the separation tolerance in the data coordinate units [0]; append
distance unit (see UNITS). If two lines has end-points that are closer than this
cutoff they will be joined. Optionally, append /nn_dist which adds the requirement
that a link will only be made if the second closest connection exceeds the nn_dist.
The latter distance must be given in the same units as cutoff. However, if no
arguments are given then we close every polygon regardless of the gap between first
and last point.

-V[level] (more ...)
Select verbosity level [c].

-bi[ncols][t] (more ...)
Select native binary input. [Default is 2 input columns].

-bo[ncols][type] (more ...)
Select native binary output. [Default is same as input].

-d[i|o]nodata (more ...)
Replace input columns that equal nodata with NaN and do the reverse on output.

-f[i|o]colinfo (more ...)
Specify data types of input and/or output columns.

-g[a]x|y|d|X|Y|D|[col]z[+|-]gap[u] (more ...)
Determine data gaps and line breaks.

-h[i|o][n][+c][+d][+rremark][+rtitle] (more ...)
Skip or produce header record(s).

-icols[l][sscale][ooffset][,...] (more ...)
Select input columns (0 is first column).

-ocols[,...] (more ...)
Select output columns (0 is first column).

-:[i|o] (more ...)
Swap 1st and 2nd column on input and/or output.

-^ or just -
Print a short message about the syntax of the command, then exits (NOTE: on Windows
use just -).

-+ or just +
Print an extensive usage (help) message, including the explanation of any
module-specific option (but not the GMT common options), then exits.

-? or no arguments
Print a complete usage (help) message, including the explanation of options, then
exits.

--version
Print GMT version and exit.

--show-datadir
Print full path to GMT share directory and exit.

UNITS


For map distance unit, append unit d for arc degree, m for arc minute, and s for arc
second, or e for meter [Default], f for foot, k for km, M for statute mile, n for nautical
mile, and u for US survey foot. By default we compute such distances using a spherical
approximation with great circles. Prepend - to a distance (or the unit is no distance is
given) to perform "Flat Earth" calculations (quicker but less accurate) or prepend + to
perform exact geodesic calculations (slower but more accurate).

ASCII FORMAT PRECISION


The ASCII output formats of numerical data are controlled by parameters in your gmt.conf
file. Longitude and latitude are formatted according to FORMAT_GEO_OUT, whereas other
values are formatted according to FORMAT_FLOAT_OUT. Be aware that the format in effect can
lead to loss of precision in the output, which can lead to various problems downstream. If
you find the output is not written with enough precision, consider switching to binary
output (-bo if available) or specify more decimals using the FORMAT_FLOAT_OUT setting.

EXAMPLES


To combine the digitized segment lines segment_*.txt (whose coordinates are in cm) into as
few complete lines as possible, assuming the end points slop could be up to 0.1 mm, run

gmt connect segment_*.txt -Tf0.1 > new_segments.txt

To combine the digitized segments in the multisegment file my_lines.txt (whose coordinates
are in lon,lat) into as few complete lines as possible, assuming the end points slop could
be up to 150 m, and write the complete segments to separate files called
Map_segment_0001.dat, Map_segment_0002.dat, etc., run

gmt connect my_lines.txt -T150e -DMap_segment_%04d.dat

Use gmtconnectgmt online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    wxPython
    wxPython
    A set of Python extension modules that
    wrap the cross-platform GUI classes from
    wxWidgets.. Audience: Developers. User
    interface: X Window System (X11), Win32 ...
    Download wxPython
  • 2
    packfilemanager
    packfilemanager
    This is the Total War pack file manager
    project, starting from version 1.7. A
    short introduction into Warscape
    modding: ...
    Download packfilemanager
  • 3
    IPerf2
    IPerf2
    A network traffic tool for measuring
    TCP and UDP performance with metrics
    around both throughput and latency. The
    goals include maintaining an active
    iperf cod...
    Download IPerf2
  • 4
    fre:ac - free audio converter
    fre:ac - free audio converter
    fre:ac is a free audio converter and CD
    ripper for various formats and encoders.
    It features MP3, MP4/M4A, WMA, Ogg
    Vorbis, FLAC, AAC, and Bonk format
    support, ...
    Download fre:ac - free audio converter
  • 5
    Matplotlib
    Matplotlib
    Matplotlib is a comprehensive library
    for creating static, animated, and
    interactive visualizations in Python.
    Matplotlib makes easy things easy and
    hard thing...
    Download Matplotlib
  • 6
    BotMan
    BotMan
    Write your chatbot logic once and
    connect it to one of the available
    messaging services, including Amazon
    Alexa, Facebook Messenger, Slack,
    Telegram or even yo...
    Download BotMan
  • More »

Linux commands

Ad