Skip to content

Commit 02a7ccd

Browse files
authored
Fix -L output that was erroring when input was in geogs. (#8688)
1 parent 729e4f3 commit 02a7ccd

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/potential/grdseamount.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,7 +1601,7 @@ EXTERN_MSC int GMT_grdseamount (void *V_API, int mode, void *args) {
16011601
else /* Circular features */
16021602
major = minor = S[smt].radius; /* Radius in m */
16031603
/* Compute area, volume, mean amplitude */
1604-
shape_func[S[smt].build_mode] (major, minor, S[smt].height, Ctrl->L.value, S[smt].f, &area, &volume, &height);
1604+
shape_func[S[smt].build_mode](major, minor, S[smt].height, Ctrl->L.value, S[smt].f, &area, &volume, &height);
16051605
V[smt] = volume;
16061606
h[smt] = amplitude;
16071607
if (map) { /* Report values in km^2, km^3, and m */
@@ -1613,13 +1613,14 @@ EXTERN_MSC int GMT_grdseamount (void *V_API, int mode, void *args) {
16131613
out[GMT_X] = area;
16141614
out[GMT_Y] = volume;
16151615
out[GMT_Z] = height;
1616-
GMT_Put_Record (API, GMT_WRITE_DATA, Out); /* Write this to output */
1616+
API->GMT->current.io.col_type[1][0] = API->GMT->current.io.col_type[1][1] = GMT_IS_FLOAT; /* If set to geog Put_Record would error. */
1617+
GMT_Put_Record(API, GMT_WRITE_DATA, Out); /* Write this to output */
16171618
}
16181619
GMT_Report (API, GMT_MSG_INFORMATION, "Seamount %" PRIu64 " [%c] area, volume, mean height: %g %g %g\n", n_smts, S[smt].code, area, volume, height);
16191620
}
16201621
if (Ctrl->L.active) { /* OK, that was all we wanted */
1621-
gmt_M_free (GMT, Out);
1622-
if (GMT_End_IO (API, GMT_OUT, 0) != GMT_NOERROR) /* Disables further data output */
1622+
gmt_M_free(GMT, Out);
1623+
if (GMT_End_IO(API, GMT_OUT, 0) != GMT_NOERROR) /* Disables further data output */
16231624
goto wrap_up;
16241625
goto wrap_up;
16251626
}

0 commit comments

Comments
 (0)