-
Notifications
You must be signed in to change notification settings - Fork 401
Enhance triangulate -S with modifier +z so we can write -Zvalue in headers #7815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…aders The value can be determined via the optional argument to +z: a mean of triplet [Default] l Lower value of triplet m Median value of triplet p Modal value of triplet Upper value of triplet
| n_errors += gmt_check_binary_io (GMT, 2); | ||
| n_errors += gmt_M_check_condition (GMT, Ctrl->L.binary && !GMT->common.b.active[GMT_IN], "Option -L: Cannot imply binary node input if main input is not also binary (see -bi)\n"); | ||
| n_errors += gmt_M_check_condition (GMT, GMT->common.R.active[ISET] && (GMT->common.R.inc[GMT_X] <= 0.0 || | ||
| GMT->common.R.inc[GMT_Y] <= 0.0), "Option -I: Must specify positive increment(s)\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't change this spaces to tabs. See how they show misaligned in the Gihub display that uses <tab> = 8 spaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, updated. My editor f***s me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, still wrong (but I just fixed it). It's tabs to align with the above line, followed by spaces until align with first character of the function argument whose arguments we are breaking in multi-lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, you and your small monitors!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has nothing to do with the monitors size. It's on code alignment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Please have it as you wish - I can adjust. I just have a "spaces to tabs" substitution but this a) is for the entire file even though I selected a different region Sorry, |
Don't do that on already formatted code. That's what screws. You can see that our code remains well aligned independently of the tab size. But for that we must follow the mix tab/spaces on continuation lines. |


This PR was "inspired" by a forum post and it seemed very easy to expand -S to do more. The new +z modifier will put a
-Zvaluestring in each polygon header. Thevaluecan be determined via the optional argument to +z:a mean of triplet [Default]
l Lower value of triplet
m Median value of triplet
p Modal value of triplet
u Upper value of triplet
Added a simple test tripatch.sh which shows the various results (skipping mode since mostly will give median anyway.