mapproject binary manipulations
|Target version:||Candidate for next bugfix release|
|Affected version:||5.x-svn||Platform:||Mac OS X|
Seems there may be a problem when mapproject is directed to output binary in the presence of the -o specifier. This applies to Version 5.3.0_r15762
Example. Assume a simple 3-row, 4-column file (call it t.txt) with first two columns having some ancillary parameters, and the last two columns have lat and lon (not lon and lat):
1 2 10 15
2 2 12 11
3 4 16 9
Convert this to a binary file via:
gmtconvert t.txt -bo4d > t.bin
Say, we want to use mapproject to compute the distances (in km) from each point to (say) 0,0 (lon,lat), and have the output placed back in it's original order, with the newly computed distance appended as column 4. We use:
mapproject t.bin -G0/0k -bi4d -i3,2,0,1 -bo5d -o2,3,1,0,4 > td.bin
but it fails, with this message:
mapproject: Syntax error: Binary output data (-bo) provides 4 but column selection (-o) asks for 5 columns
I thought -bo5d was asking for 5 columns of output!
This example is trivial. I need to apply something similar for a file with millions of rows.