Grdcont

Apparently 3504250.tif is outside the specified region. grdimage produces an empty plot with a color bar, but see the corrections below (the plot and plotting command not shown).

grdcontour crashes with the specified region (plots normally with the region defined by the grid):

gmt grdcontour -Jx1:10000 -R505000/508000/5250000/5252000 3504250.tif -B -png test-grdcontour
ERROR: Caught signal number 11 (Segmentation fault) at
/home/mkononets/miniforge3/envs/gmt/bin/../lib/libgmt.so.6(+0x10a80f)[0x7fb62a2cc80f]
[0x55c17dff1bd0]
Stack backtrace:
/home/mkononets/miniforge3/envs/gmt/bin/../lib/libgmt.so.6(gmt_sig_handler_unix+0xed)[0x7fb62a32a51d]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7fb629fb4520]
/home/mkononets/miniforge3/envs/gmt/bin/../lib/libgmt.so.6(+0x10a80f)[0x7fb62a2cc80f]
/home/mkononets/miniforge3/envs/gmt/bin/../lib/libgmt.so.6(gmt_contours+0x216)[0x7fb62a2e18d6]
/home/mkononets/miniforge3/envs/gmt/bin/../lib/libgmt.so.6(GMT_grdcontour+0x26bc)[0x7fb62a4a8cfc]
/home/mkononets/miniforge3/envs/gmt/bin/../lib/libgmt.so.6(GMT_Call_Module+0x615)[0x7fb62a21c2b5]
gmt(+0x25c2)[0x55bd6fa565c2]
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90)[0x7fb629f9bd90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80)[0x7fb629f9be40]
gmt(+0x3393)[0x55bd6fa57393]

Correction, it was a semi-valid color bar stretching from zero to approx 905, while gmt grdinfo 3504250.tif -R505000/508000/5250000/5252000 gives v_min: 717.440002441 v_max: 906.679992676 name: z

Another correction, the grid is not completely outside the region, one data column is included, more from the above mentioned gmt grdinfo:

3504250.tif: x_min: 504999.5 x_max: 505000.5 x_inc: 1 name: x n_columns: 1
3504250.tif: y_min: 5249999.5 y_max: 5251000.5 y_inc: 1 name: y n_rows: 1001
3504250.tif: v_min: 717.440002441 v_max: 906.679992676 name: z

with -R504999/... it’s two data columns and grdcontour is not crashing anymore:

gmt grdinfo 3504250.tif -R504999/508000/5250000/5252000
...
3504250.tif: x_min: 504998.5 x_max: 505000.5 x_inc: 1 name: x n_columns: 2
3504250.tif: y_min: 5249999.5 y_max: 5251000.5 y_inc: 1 name: y n_rows: 1001
3504250.tif: v_min: 717.409973145 v_max: 906.679992676 name: z