This is the command gmtconvertgmt 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
תָכְנִית:
שֵׁם
gmtconvert - Convert, Paste, and/or Extract columns from data tables
תַקצִיר
gmtconvert [ שולחן ] [ ] [ [+lדקות][+uמקסימום][+i]] [ [תבנית] ] [ [f|l|mפסיעה] ] [ ] [
[c|n|r|v][נקודה מחדש] ] [ [tsr] ] [ [~]מבחר] [ [~]"לחפש חוּט" | [~]/regexp/[i] ] [
] [ [רָמָה] ] [ -a] [ -b] [ -d] [ -f] [ -g] [
-h] [ -i] [ -o] [ -s] [ -:[i|o]]
הערה: אין רווח בין דגל האפשרות לארגומנטים המשויכים.
תיאור
gmtconvert reads its standard input [or input files] and writes out the desired
information to standard output. It can do a combination of nine tasks: (1) convert between
binary and ASCII data tables, (2) paste corresponding records from multiple files
horizontally into a single file, (3) extract a subset of the available columns, (4) only
extract segments whose header record matches a text pattern search, (5) only list segment
headers and no data records, (6) extract first and/or last data record for each segment,
(7) reverse the order of items on output, (8) output only ranges of segment numbers, and
(9) output only segments whose record count matches criteria. Input (and hence output)
may have multiple sub-headers, and ASCII tables may have regular headers as well.
נדרש טיעונים
ללא חתימה
אופציונאלי טיעונים
שולחן ASCII אחד או יותר (או בינארי, ראה -דוּ[ncols][סוג]) קבצי טבלת נתונים המכילים א
מספר עמודות הנתונים. אם לא ניתנות טבלאות, אנו קוראים מקלט סטנדרטי.
-A The records from the input files should be pasted horizontally, not appended
vertically [Default]. All files must have the same number of segments and number of
rows per segment. Note for binary input, all the files you want to paste must have
the same number of columns (as set with -דוּ); ASCII tables can have different
מספר העמודות.
-C[+lדקות][+uמקסימום][+i]
Only output segments whose number of records matches your given criteria: Append
+lדקות to ensure all segment must have at least דקות records to be written to output
[0], and append +uמקסימום to ensure all segments must have at most מקסימום records to be
written [inf]. You may append +i to invert the selection, i.e., only segments with
record counts outside the given range will be output.
-ד[תבנית]
עבור נתוני מקטע מרובים, יש לשלוח כל מקטע לקובץ פלט נפרד [ברירת מחדל
writes a multiple segment file to stdout]. Append a format template for the
individual file names; this template צריך contain a C format specifier that can
format an integer argument (the running segment number across all tables); this is
usually %d but could be %08d which gives leading zeros, etc. [Default is
gmtconvert_segment_%d.{txt|bin}, depending on -בו]. Alternatively, give a template
with two C format specifiers and we will supply the table number and the segment
number within the table to build the file name.
-E[f|l|mפסיעה]
Only extract the first and last record for each segment of interest [Default
extracts all records]. Optionally, append f or l to only extract the first or last
record of each segment, respectively. Alternatively, append mפסיעה לחלץ
only one out of פסיעה רשום.
-F[c|n|r|v][נקודה מחדש]
שנה את אופן החיבור של נקודות (על ידי ציון תכנית) והנתונים מקובצים
(על ידי ציון א שיטה). Append one of four line connection schemes: c: טופס
מקטעי קו רציפים עבור כל קבוצה [ברירת מחדל]. r: Form line segments from a
איפוס נקודת ייחוס עבור כל קבוצה. n: Form networks of line segments between
all points in each group. v: Form vector line segments suitable for psxy -Sv+s.
Optionally, append the one of four segmentation methods to define the group: a:
Ignore all segment headers, i.e., let all points belong to a single group, and set
group reference point to the very first point of the first file. f: Consider all
data in each file to be a single separate group and reset the group reference point
to the first point of each group. s: Segment headers are honored so each segment
is a group; the group reference point is reset to the first point of each incoming
segment [Default]. r: כמו s, but the group reference point is reset after each
record to the previous point (this method is only available with the -פר scheme).
Instead of the codes a|f|s|r you may append the coordinates of a נקודה מחדש אשר
will serve as a fixed external reference point for all groups.
-I[tsr]
Invert the order of items, i.e., output the items in reverse order, starting with
the last and ending up with the first item [Default keeps original order]. Append
up to three items that should be reversed: t will reverse the order of tables, s
will reverse the order of segments within each table, and r will reverse the order
of records within each segment [Default].
-L Only output a listing of all segment header records and no data records (requires
ASCII data).
-Q[~]מבחר
Only write segments whose number is included in מבחר and skip all others.
לא ניתן להשתמש עם -S. ה מבחר תחביר הוא רכס[,רכס,...] where each רכס
of items is either a single segment מספר or a range with stepped increments given
באמצעות התחלה[:צעד:]:להפסיק (צעד is optional and defaults to 1). A leading ~ יצטרך
invert the selection and write all segments but the ones listed. Instead of a list
of ranges, use +fפילה to supply a file list with one רכס לכל שורה.
-S[~]"לחפש חוּט" or -S[~]/regexp/[אֲנִי]
Only output those segments whose header record contains the specified text string.
To reverse the search, i.e., to output segments whose headers do לֹא מכיל את
specified pattern, use -ש~. Should your pattern happen to start with ~ you need to
escape this character with a backslash [Default output all segments]. Cannot be
משמש עם -Q. For matching segments based on aspatial values (via OGR/GMT format),
give the search string as varname=ערך and we will compare ערך against the value
of varname for each segment. Note: If the features are polygons then a match of a
particular polygon perimeter also means that any associated polygon holes will also
be matched. For matching segment headers against extended regular expressions
enclose the expression in slashes. Append i for case-insensitive matching. For a
list of such patterns, give +fפילה with one pattern per line. To give a single
pattern starting with +f, escape it with a backslash.
-T Suppress the writing of segment headers on output.
-V[רָמָה] (יותר ...)
בחר רמת מילוליות [c].
-acol=שם[...] (יותר ...)
הגדר שיוך עמודות אספציאליות col=שם.
-דוּ[ncols][t] (יותר ...)
בחר קלט בינארי מקורי.
-בו[ncols][סוג] (יותר ...)
בחר פלט בינארי מקורי. [ברירת המחדל זהה לקלט].
-d[i|o]אין מידע (יותר ...)
החלף עמודות קלט שוות אין מידע עם NaN ועשה הפוך על הפלט.
-f[i|o]colinfo (יותר ...)
ציין סוגי נתונים של עמודות קלט ו/או פלט.
-g[a]x|y|d|X|Y|D|[col]z[+|-]פער[u] (יותר ...)
קבע פערי נתונים ומעברי שורות.
-h[i|o][n][+c][+d][+rהֶעָרָה][+rכותרת] (יותר ...)
דלג או הפק רשומות כותרות.
-iצווארונים[ל][ססולם][oלקזז][,...] (יותר ...)
בחר עמודות קלט (0 הוא העמודה הראשונה).
-oצווארונים[,...] (יותר ...)
בחר עמודות פלט (0 הוא העמודה הראשונה).
-ס[צווארונים][a|r] (יותר ...)
הגדרת טיפול ברשומות NaN.
-:[i|o] (יותר ...)
החלף את העמודה הראשונה והשנייה בקלט ו/או פלט.
-^ or רק -
הדפס הודעה קצרה על התחביר של הפקודה, ואז צא (הערה: ב-Windows
להשתמש רק -).
-+ or רק +
הדפס הודעת שימוש נרחבת (עזרה), כולל הסבר על כל
אפשרות ספציפית למודול (אך לא האפשרויות הנפוצות של GMT), ואז יוצאת.
-? or לא טיעונים
לאחר מכן הדפס הודעת שימוש מלאה (עזרה), כולל הסבר על האפשרויות
יציאות.
--גִרְסָה
הדפס גרסת GMT וצא.
--show-datadir
הדפס את הנתיב המלא לספריית השיתוף של GMT וצא.
ASCII פורמט דיוק
פורמטים של פלט ASCII של נתונים מספריים נשלטים על ידי פרמטרים שלך gmt.conf
קוֹבֶץ. קווי אורך וקווי רוחב מעוצבים לפי FORMAT_GEO_OUT, בעוד אחרים
הערכים מעוצבים לפי FORMAT_FLOAT_OUT. שים לב שהפורמט בפועל יכול
להוביל לאובדן דיוק בתפוקה, מה שעלול להוביל לבעיות שונות במורד הזרם. אם
אתה מוצא שהפלט לא כתוב בדיוק מספיק, שקול לעבור לבינארי
פלט (-בו אם זמין) או ציין יותר עשרוניות באמצעות ההגדרה FORMAT_FLOAT_OUT.
דוגמאות
To convert the binary file test.b (single precision) with 4 columns to ASCII:
gmt convert test.b -bi4f > test.dat
To convert the multiple segment ASCII table test.d to a double precision binary file:
gmt convert test.d -bo > test.b
You have an ASCII table with 6 columns and you want to plot column 5 versus column 0. Try
gmt convert table.d -o5,0 | psxy ...
If the file instead is the binary file results.b which has 9 single-precision values per
record, we extract the last column and columns 4-6 and write ASCII with the command
gmt convert results.b -o8,4-6 -bi9s | psxy ...
You want to plot the 2nd column of a 2-column file left.d versus the first column of a
file right.d:
gmt convert left.d right.d -A -o1,2 | psxy ...
To extract all segments in the file big_file.d whose headers contain the string "RIDGE
AXIS", try
gmt convert big_file.d -S"RIDGE AXIS" > subset.d
To invert the selection of segments whose headers begin with "profile " followed by an
integer number and any letter between "g" and "l", try
gmt convert -S~"/^profile [0-9]+[g-l]$/"
To reverse the order of segments in a file without reversing the order of records within
each segment, try
gmt convert lots_of_segments.txt -Is > last_segment_first.txt
To extract segments 20 to 40 in steps of 2, plus segment 0 in a file, try
gmt convert lots_of_segments.txt -Q0,20:2:40 > my_segments.txt
To extract the attribute ELEVATION from an ogr gmt file like this
# @VGMT1.0 @GPOINT
...
# @NELEVATION|DISPX|DISPY
# @Tdouble|double|double
# FEATURE_DATA
# @D4.945000|-106500.00000000|-32700.00000000
-9.36890245902635 39.367156766570389
do
gmt convert file.gmt -a2=ELEVATION > xyz.dat
או רק
gmt convert file.gmt -aELEVATION > xyz.dat
To connect all points in the file sensors.txt with the specified origin at 23.5/19, try
gmt convert sensors.txt -F23.5/19 > lines.txt
Use gmtconvertgmt online using onworks.net services