Skip to content

Commit

Permalink
Long-lasting bug with seniority finally killed in gmt_crossover funct…
Browse files Browse the repository at this point in the history
…ion (#8188)

* Call gmt_crossover with ge = false for contour labels

WHen we use -G to create creat circle lines and wish to annotate the contours where those two line-types intersect we did this:

1. Create the helper lines in geographic coordinates then convert to plot coordinates
2. COnert contour lines to plot coordinates.
3. Call gmt_crossover with geo = true;

Hence, gmt_crossover would look for periodic data and jump even though there is none in the Caresian x,y.

This PR passes false instead of GMT_M_is_lon (GMT, GMT_IN) since that is not correct.

No change to any tests, but is homing in on the missing label (for macOS only?) in greenspline_5.sh test.

* Update gmt_support.c

* Update greenspline.dvc

Update PS file
  • Loading branch information
PaulWessel authored Dec 12, 2023
1 parent 4ee805e commit 3e22029
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/gmt_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -15436,7 +15436,7 @@ uint64_t gmt_crossover (struct GMT_CTRL *GMT, double xa[], double ya[], uint64_t

tx_a = ta_start + fabs (xc - xa[ta_start]) * i_del_xa;
tx_b = tb_start + fabs (xc - xb[tb_start]) * i_del_xb;
if (tx_a < ta_stop && tx_b < tb_stop) {
if (tx_a < ta_stop && tx_b <= tb_stop) { /* Equality means the crossing occurred on the second data node */
X->x[nx] = xc;
X->y[nx] = ya[xa_start] + (xc - xa[xa_start]) * slp_a;
X->xnode[0][nx] = tx_a;
Expand Down
4 changes: 2 additions & 2 deletions test/baseline/greenspline.dvc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
outs:
- md5: 346061c5e8dc2a44a7fe74e6a827c4ea.dir
size: 1581934
- md5: 416c79243026ec7b60578a5bb74cf8b8.dir
nfiles: 8
path: greenspline
hash: md5

0 comments on commit 3e22029

Please sign in to comment.