Bug #883

gmtconvert binary io for selecting column subsets on input

Added by Gregory over 1 year ago. Updated about 1 year ago.

Status:ClosedStart date:2016-04-05
Priority:NormalDue date:
Assignee:Paul% Done:

100%

Category:-
Target version:Candidate for next minor release
Affected version:5.1.x Platform:

Description

When using gmt5.1 or gmt5.2 gmtconvert with binary input to select a subset of columns, the last selected column is repeated in the output. This is incorrect.
The -i option should operate the same as the -F option in GMT4:

Example: GMT4
gmtconvert -bi4 poo.xyzw
4.24975 89.93914 -1.9269 1
8.42786 89.95624 -1.8424 1
etc

gmtconvert -bi4 poo.xyzw -F0,1,3
4.24975 89.93914 1
8.42786 89.95624 1
etc

but in GMT5,
bash-3.2$ gmtconvert -bi4 -i0,1,3 poo.xyzw
4.24975 89.93914 1 1
8.42786 89.95624 1 1
and the binary output -bo3 switch still outputs four columns, which is incorrect.

This repeated column 3 can be overridden by specifying -o0,1,3

With ascii input of a four column table, the expected behavior on input results:
gmtconvert -i0,1,3 /tmp/poo -V
gmtconvert: Processing input table data
4.24975 89.93914 1
8.42786 89.95624 1

Associated revisions

Revision 16353
Added by Paul over 1 year ago

Address issue #883

History

#1 Updated by Gregory over 1 year ago

platform is OS X 10.11.4, version 5.2.1 (r15220)

#2 Updated by Paul over 1 year ago

  • Status changed from New to Resolved
  • Assignee set to Paul
  • Target version set to Candidate for next minor release
  • % Done changed from 0 to 100

Unfortunately, the output dataset inherited the number of columns from a binary table instead of the number of columns selected. Should be fixed in r16354.

#3 Updated by Paul about 1 year ago

  • Status changed from Resolved to Closed

Closed as fixed - reopen if there are other problems related to this.

Also available in: Atom PDF