Skip to content

Allow contour files to only list contour level#6522

Merged
PaulWessel merged 1 commit intomasterfrom
allow-cont-only
Apr 5, 2022
Merged

Allow contour files to only list contour level#6522
PaulWessel merged 1 commit intomasterfrom
allow-cont-only

Conversation

@PaulWessel
Copy link
Member

Since it is awkward to create a list of desired contours and add the character C to the end, this PR allows a plain single-column file of contour levels to be accepted in -C by grdcontour and pscontour and the type defaults to plain contour (C) only. Currently we just get an ugly read error. This is useful if you have some custom contours, e.g., want to contour close to zero but not exactly, then every 1:

echo 0.001 > cont.txt
gmt math -T1/10/1 -o0 T = >> cont.txt

This avoids having to awk to add C or to suffer a crash,

Since it is awkward to create a list of desired contours and add the character C to the end, this PR allows a plain single-column file of contour levels to be accepted in -C by grdcontour and pscontour and the type defaults to plain contour (C) only. Currently we just get an ugly read error.
@PaulWessel PaulWessel added the enhancement Improving an existing feature label Apr 5, 2022
@PaulWessel PaulWessel added this to the 6.4.0 milestone Apr 5, 2022
@PaulWessel PaulWessel requested review from joa-quim and maxrjones April 5, 2022 09:12
@PaulWessel PaulWessel self-assigned this Apr 5, 2022
@anbj
Copy link
Contributor

anbj commented Apr 5, 2022

Very nice. Reminds me of #559!

@PaulWessel PaulWessel merged commit 42c666e into master Apr 5, 2022
@PaulWessel PaulWessel deleted the allow-cont-only branch April 5, 2022 12:44
@maxrjones maxrjones added the add-changelog Add PR to the changelog label Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

add-changelog Add PR to the changelog enhancement Improving an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants