Multi-segment header erased by gmtsimplify

Hi,

I have this file with lon/lat :

> -Wthin,red -Sf0.2c/0.1c+l -Gred
-33.5	64	0
-26.2	65.2	0
-15.2	63.2	0
> -Wthin,blue -Sf0.2c/0.1c+t+l -Gblue
-47.5	54.9	0
-47.1	52.9	0
-50.3	51.1	0
-55	50.6	0

When I run gmtsimplify, the headers disappear… I’ve tried to play around with -h options to no avail… Any idea? (The issue doesn’t come when I use gmtselect for example)

Best,

Can you please provide a MWE?

Reminds me of gmt simplify - avoid loss of aspatial data · Issue #213 · GenericMappingTools/gmt · GitHub.

It might be but not necessarily. In that .gmt issue the segment headers were already empty to start with.

There’s not much to the command:
gmt gmtsimplify file.txt -T0.5d > new_file.txt
:face_with_diagonal_mouth:

Well, I was thinking more on an example file but the small bit you showed seems to be enough to exemplify the issue.

Fixed in (when merged) Keep the segment headers on output. by joa-quim · Pull Request #8527 · GenericMappingTools/gmt · GitHub

1 Like

I confirm, the update works :slight_smile: