Feature #1012

Let pstext support -i option

Added by Dongdong 12 months ago. Updated 6 months ago.

Status:ClosedStart date:2016-12-06
Priority:NormalDue date:
Assignee:Paul% Done:

100%

Category:-
Target version:-
Platform:

Description

-i option is very useful when users want to select which columns to read.
psxy, xyz2grd and most table data related modules support this option.

However, -i option can NOT be used in pstext. Is it a missing feature?

History

#1 Updated by Joaquim 12 months ago

  • Status changed from New to In Progress

Hmm, some mixed info. The pstext synopsis lists -i but it's actually not implemented.
Please try this to see if it works well, change pstext line L36

#define GMT_PROG_OPTIONS "-:>BJKOPRUVXYacfhptxy" GMT_OPT("E")

to

#define GMT_PROG_OPTIONS "-:>BJKOPRUVXYacfhiptxy" GMT_OPT("E")

#2 Updated by Dongdong 12 months ago

Changing pstext L36 does not working.

echo TEXT 1 4 | /opt/GMT5-dev/bin/gmt pstext -JX10c/10c -R0/5/0/5 -Baf -i1,2,0 > test.ps
pstext: Record 0 had bad x coordinate, skipped)

#3 Updated by Paul 12 months ago

pstxt is reading text records so it cannot (easily) handle -i without some special processing.

#4 Updated by Paul 6 months ago

  • Status changed from In Progress to Closed
  • Assignee set to Paul
  • % Done changed from 0 to 100

I will close this as not feasible since the text can be many words.

Also available in: Atom PDF