GenericMappingTools / GenericMappingTools/gmt
Passing in virtual files into the supplementary x2sys modules
- Dominant language
- C
- Stars
- 979
- Forks
- 414
- Avg merge
- 17h 26m
- Merged PRs (30d)
- 54
Description
**Description of the desired feature**
Crossposting from https://github.com/GenericMappingTools/pygmt/pull/546#discussion_r459366392_. The supplementary [X2SYS](https://docs.generic-mapping-tools.org/6.1/modules.html#x2sys) modules doesn't seem to support virtual files from the GMT C API yet, only ASCII, Binary and NetCDF files according to https://docs.generic-mapping-tools.org/6.1/supplements/x2sys/x2sys_init.html#format-definition-files. This is the error message when I try to pass in a virtualfile to [`x2sys_cross`](https://docs.generic-mapping-tools.org/6.1/supplements/x2sys/x2sys_cross.html):
```python-traceback
x2sys_cross [WARNING]: No time column, use dummy times
Not a valid unit: c [meter assumed]
Not a valid unit: c [meter assumed]
x2sys_cross [ERROR]: x2sys_read_file : Cannot find track @GMTAPI@-S-I-D-M-T-N-000000
(null): Error from fclose [@GMTAPI@-S-I-D-M-T-N-000000]
```
The equivalent non-virtualfile MCWE in GMT would be something like this:
```bash
export X2SYS_HOME=.
gmt x2sys_init GMT -Dxyz -F
gmt x2sys_cross @tut_ship.xyz -TGMT -Qi > tmp.txt
```
**Are you willing to help implement and maintain this feature?** Perhaps, if it's not too hard :smile:
Contributor guide
Assessment
This issue has not been assessed yet.