Question about unit conversions in gmt info

Hello. I am one of the gmt users.
While using gmt info, I found that the output units were forcibly converted. I’m using Ubuntu 22.04 LTS, gmt is version 6.3, and I installed it via apt install.

Consider an ASCII file called foo.txt like this:

1c 1i 1p 1d 1M 1k 1 1
2c 2i 2p 2d 2M 2k 2 2
3c 3i 3p 3d 3M 3k 3 3
4c 4i 4p 4d 4M 4k 4 4
5c 5i 5p 5d 5M 5k 5 5

And if you run the following command…

gmt info foo.txt -f6d

the result is…

foo.txt: N = 5	<0.393700787402/1.96850393701>	<1/5>	<0.0138888888889/0.0694444444444>	<111.195051975/555.975259876>	<1.609433/8.047165>	<1/5>	<0.393700787402/1.96850393701>	<1/5>

The first three columns of foo.txt have dimension units appended to them. However, all output values were converted to inches. On the other hand, the distance unit is appended to the 4th to 6th columns. Again, all output has been converted to km. Lastly, the 7th and 8th columns are floating points, but only the 7th column is specified as a dimension data type with the “-f” option. Since the 7th column does not have an explicit dimension unit, it is recognized as the default PROJ_LENGTH_UNIT, that is, cm, and then converted back to inches. The 8th column has no conversion, as expected.

To summarize, dimension units are always converted to inches and distance units are always converted to km. Similar to the “-Q” option in gmt math, is there a way for the user to set the output unit directly in gmt info?

And secondly, if the dimension unit is appended to column, the unit is automatically recognized without the “-f” option. Also, in case of a column without a unit, you can explicitly indicate that it is an input data type with a dimension unit with “-f6d”, but it is always recognized as cm. In other words, what exactly does the “d” in the “-f” option do?

Thank you so much for reading my long question.

GMT provides dimension units and distance units:
Dimension units:c|i|p
Distance units: d|e|f|k|m|M|n|s|u

Extract the extreme values of column data using info. For distance results in km and for dimension results in inch.
Values without a given unit can be set through “PROJ_LENGTH_Unit”.

gmt info foo.txt -i6 -f0d --PROJ_LENGTH_UNIT=c
foo.txt: N = 5  <0.393700787402/1.96850393701>

gmt info foo.txt -i6 -f0d --PROJ_LENGTH_UNIT=i
foo.txt: N = 5  <1/5>