Questions about gmtselect in cartesian coordinate

Hi, I used to extracting data from multi-lines in the geographic coordinate system using gmt select option and it succeeded, but I encountered a problem in the cartesian coordinate system now. I simplified the scripts as follows (gmt version: 6.2.0rc2):

echo 120 30 | gmt select -Lline+d50 -V

where the file line contains:

> 
100 50
150 50

and the output is:

gmtselect [INFORMATION]: Processing input table data
gmtselect [INFORMATION]: Reading Data Table from File line1
gmtselect [INFORMATION]: Reading Data Table from Standard Input stream
gmtselect [INFORMATION]: Writing Data Table to Standard Output stream
gmtselect [INFORMATION]: Read 1 records, passed 0 records

when I changed the distance to a extremely larger one: +d5000, the output turned to

gmtselect [INFORMATION]: Processing input table data
gmtselect [INFORMATION]: Reading Data Table from File line1
gmtselect [INFORMATION]: Reading Data Table from Standard Input stream
gmtselect [INFORMATION]: Writing Data Table to Standard Output stream
120     30
gmtselect [INFORMATION]: Read 1 records, passed 1 records 

It seems to be a problem with the distance unit, and I searched for the module document and still don’t know how to modify it.

Thank you in advance.

1 Like

Thanks for pointing out this issue. It was a bug that Paul recently fixed through this pull request. You can either follow the building instructions to use the fixed gmtselect immediately or wait for 6.2.0 to be released shortly.

Thanks a lot for your reply and the update to GMT. I re-executed this example with the fixed version, and the result was very strange. The following script succeeded in filtering point(120,5) but failed in (120,4). Would you please help me deal with this problem again?Thank you in advance.

echo 120 4 | gmt select -Cline+d50 -V
gmtselect [INFORMATION]: Processing input table data
gmtselect [INFORMATION]: Reading Data Table from File line1
gmtselect [INFORMATION]: Reading Data Table from Standard Input stream
gmtselect [INFORMATION]: Writing Data Table to Standard Output stream
gmtselect [INFORMATION]: Read 1 records, passed 0 records

Could you please post the output from gmt --version? For me, that command passes both (120,5) and (120,4).

version 6.2.0 rebuilt on commit 180bbe3 of master branch (May 28)

What operating system are you using?

win10 Enterprise Edition

We added a test with your example script to the GMT test suite and it passes on MacOS, Linux, and Windows.

1 Like